Category Archives: Cool Stuff

Software Developer Gifts (And Other Tech Geek Gifts)

Software developer gifts aren’t easy to find.

Buying gifts for software developers can be pretty difficult for a few reasons:

  • Software developers already buy what they want before you get a chance to buy it for them.  (I know I am guilty of doing this myself.  I’m a bit impatient to wait for a gift.)
  • Developers often are very picky about a specific keyboard or headphone or gadget, so you can’t just pick one—it has to be the right one.
  • Non-software developers and non-tech people don’t understand anything about our world, so it is hard for them to know what we like.

I’m creating this list not only for gift givers who happen to stumble here through Google, but for you.  That’s right, to give yourself the gift that your friends and family failed to give you, because they just don’t understand you like I do. wlEmoticon winkingsmile Software Developer Gifts  (And Other Tech Geek Gifts)

This isn’t exactly my Christmas list, since I already have many of these items, but some of the tech type of stuff that I like myself.  (No particular order)

Turtle Beach Ear Force Z300 Wireless Amplified Stereo PC Gaming Headset

I actually just bought a pair of these headphones, and I like them quite a bit.

The audio quality is really good.  The battery life is great, and they are super comfortable.

z3001 Software Developer Gifts  (And Other Tech Geek Gifts)

I really like the idea that this wireless headset has both Bluetooth and dual band Wi-Fi wireless.  This feature makes it very versatile, because I can use it for gaming, but I can also use it for listening to music on my phone or iPad and for Skype calls.

I thought about getting a wired headset, for a bit better sound quality, but I prefer the versatility instead.  If I were going to get a wired one, I would get the

Audio-Technica ATH-M50’s though.  After quite a bit of research, it appears those are the best value for your dollar in terms of wired headsets.

ath m501 Software Developer Gifts  (And Other Tech Geek Gifts)

Netduino or Arduino

I’ve got an Arduino as well, but I haven’t really played around with it that much yet.

Both of these are basically small programmable micro-computers that you can use to build all kinds of things.  They are basically programmable circuit boards that you can attach all kinds of sensors and actuators to in order to create your own gadgets or experiment with programming machines that actually interact with the physical world.

The Arduino is programming using a C-like language and the Netduino, is programmed using C# or another .NET language.

When I bought my Arduino, I made the mistake of buying just a barebones one, so I didn’t have many projects to get me started with.  (Although this barebones one does make a very good budget gift, since it is so cheap.)

I’d really recommend for Arduino, getting a kit like this one.

516WfICIppL1 Software Developer Gifts  (And Other Tech Geek Gifts)

For the Netduino, this kit looks pretty awesome, although a bit more expensive.

netduino1 Software Developer Gifts  (And Other Tech Geek Gifts)

The nice thing about these gifts is that the price can be as high or low as you want.  The cheapest barebones boards are very cheap, but you can buy a kit or add on to the board with accessories to up the price if needed.  Also, great future gift possibilities.

Rosewill Mechanical Keyboard

I’m not a huge keyboard geek, but I do love typing on a mechanical keyboard.  It reminds me of the days when I first got into computers and most keyboards were mechanical.

I have a Rosewill myself, and I really like it.  It just feels good typing on it.  Not sure if I type faster or better, but I have much more fun doing it.

There are a few different kinds of switches, I’d recommend reading this post to understand the differences.  (There are some nice animated GIFs, if you don’t feel like reading the whole thing as well.)

rosewill1 Software Developer Gifts  (And Other Tech Geek Gifts)

If you are really hardcore, you can go with the Das Keyboard.  I have heard great things about it as well, and I know Iris Classon just got one that she loves.

61RtEiq9WNL. SL1500 1 Software Developer Gifts  (And Other Tech Geek Gifts)

Plugable UD-3900 USB 3.0 Universal Docking Station with Dual Video Outputs

Ok, this thing is awesome, but it is a bit confusing.  Let me explain what it does.

Basically, you connect this to a USB 3.0 port on your PC, or, more likely, laptop and it acts like a docking station that gives you a bunch more USB ports, a couple of audio ports, wired networking (gigabit), and TWO—yes, that is right it is not a typo—TWO HDMI or DVI connections to connect two extra monitors.pluggable1 Software Developer Gifts  (And Other Tech Geek Gifts)

What does all this mean?

It means that you can take your laptop, connect it to this bad boy and hook up 3 external screens to it in addition to the laptop’s screen.  (One of these screens would come from your laptop’s output.)

What do I use it for?

I have a Mac and PC laptop, as well as a PC desktop.  So, I can switch between all three of them and have all three of them share the same keyboard, mouse, microphone, etc.

The price is extremely cheap for what it does as well.

SwissGear Computer Laptop Backpack

I’ve got one of these backpacks, and I really like it.

It has lots of compartments to hold all my electronic devices and it feels like it is made very well.  Mine is also very comfortable to wear.

All of the SwissGear line is also very reasonably priced.  You can find better backpacks at higher price points, but as far as bang-for-buck, I’ve found the SwissGear backpacks to be hard to beat.

Here is the most popular and highest rated one on Amazon:

backpack1 Software Developer Gifts  (And Other Tech Geek Gifts)

Even if you don’t get a SwissGear backpack, a backpack is a great developer gift, because most of us are always carrying around a laptop and several other tech gadgets.

Fitbit Flex Wireless Activity + Sleep Wristband

Since I’m into fitness, you know I’m going to recommend at least one fitness related gift idea, and the one I’d recommend now would have to be the Fitbit.

I’ve got a Fitbit Flex and I love it.  The thing I like most about it is that I can basically just leave it on all the time and forget about it.  It also wirelessly syncs with its app on my phone, so I don’t need to dock it or charge it to get its data wherever I am.

The battery also lasts a pretty long time, (about 4-5 days,) which makes it much less of a hassle than the old version I used to have.

I haven’t tried the newer version of the Flex that has the display yet, but it is a bit more expensive.

Great way to keep track of your activity to help you develop a habit of being active.

fitbit1 Software Developer Gifts  (And Other Tech Geek Gifts)

Fujitsu ScanSnap iX500 Scanner

This one is a bit more expensive, but totally worth it.  I’ve got the competitor to this product, the scanner that comes with NeatDesk, but I’ve been wanting to switch to the SnapScan, because it is wireless and can scan directly into Evernote.

I’ve been scanning all my documents for several years now and it really cuts down on clutter.

Best of all, since everything is in Evernote, I can find anything I need instantly, no matter where I am.

61kbLXYapNL. SL1500 1 Software Developer Gifts  (And Other Tech Geek Gifts)

Raspberry Pi

Many people get this one confused with the Arduino and Netduino, but this is a completely different thing.  The Raspberry Pi is a super cheap computer on a chip.  Not just a processor, this thing runs a real operating system and you can use it for all kinds of things.

This is a great little toy to hack around on and create a web server or tiny gaming box (MonoGame actually runs on this thing.)

And the price is extremely cheap for the starter version, but I’d recommend getting a kit like this one:

raspberry pi1 Software Developer Gifts  (And Other Tech Geek Gifts)

i.Sound Portable Power Max Rechargeable Battery with 16,000 mAh

I like this portable power charger, but there are other alternatives that are a bit lighter as well.

Everyone should have some kind of portable power charger though—especially if you travel quite a bit.

This thing will really extend the life of your phone or tablet and is great in an emergency situation when you are out of power.  I used to get backup batteries for my phone, but this is a much more versatile option.

This particular charger also allows you to charge up to 5 devices and it can charge at 2.4 Amps, which will give you the fastest charge for a device like an iPad.  (Really important to know about, because not all USB chargers charge at the same rates.)

charger1 Software Developer Gifts  (And Other Tech Geek Gifts)

Kindle Paperwhite

It feels strange to recommend this one, since I am always talking about how I just use the Kindle app on my iPad or phone now, but I just recently realized why the Paperwhite is so awesome after I got my wife one.

feature goesbeyondabook. V357570964 1 Software Developer Gifts  (And Other Tech Geek Gifts)

A few big reasons:

  • Battery life.  Yes, I can read on my phone or iPad, but when travelling it is a pain to charge those devices over and over each and every day.  The Kindle lasts a really, really long time compared to a phone or tablet.  If you travel, and bring a Kindle, it is pretty likely that you’ll never need to charge it the whole trip—this is nice.
  • Weight.  This thing is light.  This matters when you read quite a bit, especially in bed.  My iPad Mini is pretty light, but the Kindle is still much lighter.
  • Sleep.  I recently discovered that looking at my iPad before going to bed, (which is what I do since I am reading,) actually disturbs my sleep.  Without getting into all the technical details, it basically causes you to produce less Melatonin.  Melatonin is essential to getting good sleep.  Anyway, the Kindle doesn’t have that same sleep stopping light as a brightly lit screen.

I’m actually wanting to get one of these for myself now after seeing my wife using hers.

Anything I left out?

Whew, didn’t mean for this post to be that long.  I could probably keep going, but I’ll stop here.  Anything major I left out that you’d recommend?  Let me know.

Oh, and it goes without saying, but I’ll say it anyway, if you click on the links in this post and buy something, something will go in my Christmas stocking—which of course I appreciate, because that helps me keep writing this blog and producing the content I produce.

Seiki SE39UY04 39-Inch 4K Ultra HD Review (3840 x 2160)

Update: Apparently the monitor is now $400 on Amazon! Holy crap that is a hell of a deal!

A couple of weeks ago I tweeted about how I bought a 3840 x 2160 resolution monitor for $700 $400 and I promised that I would provide a review for it, so here it is.

If you know me, you know that I am a huge fan of having as many pixels as possible. I actually replaced my four 1900 x 1200 monitors with this single Seiki 4K display—and, although I hate to ruin the surprise—I couldn’t be happier.

It is a huge relief to go from a bulky four monitor setup to a single monitor that has almost the same resolution as all four of those monitors combined, and actually makes me more productive. (I’ll explain why this is the case a little later on.)

110613 1317 SeikiSE39UY1 Seiki SE39UY04 39 Inch 4K Ultra HD Review (3840 x 2160)

The stats please

Before I get into my actual experience with the Seiki 4K display, let me start off by giving you the technical details of what we are dealing with here. This is no ordinary monitor.

The Seiki SE39UY04 is actually called an LED TV, but you and I both know that this thing is really meant to be a monitor.

It actually comes in 3 sizes.

  • 39 Inch
  • 50 Inch
  • 65 Inch (looks like this one isn’t available yet.)

I opted for the 39 inch for both economic and space reasons, but I’d imagine the 50″ or 65″ would be nice as well—if you have the budget.

So, the big thing about this monitor is the resolution, which is 3840 x 2160 pixels. This means that is it basically the same resolution as four 1080p displays.

110613 1317 SeikiSE39UY2 Seiki SE39UY04 39 Inch 4K Ultra HD Review (3840 x 2160)

You can imagine this monitor as equivalent to having a 2 by 2 grid of 1080p resolution monitors.

It also comes with built in speakers which aren’t all that bad, 3 HDMI in ports, a component input and a VGA input – although I can’t imagine why you’d hook up a VGA input to this monitor.

110613 1317 SeikiSE39UY3 Seiki SE39UY04 39 Inch 4K Ultra HD Review (3840 x 2160)

This monitor indeed seemed too good to be true, giving me 8 million pixels at $700 $400, but it is indeed the real deal.

Well, with one catch.

The monitor has a 120hz refresh rate, but only when hooked up to a 1080 source. If you hook it up to a 4k, or Ultra HD source (same thing, just means 3840 x 2160 resolution,) it only runs at 30hz.

This is mainly due to the limitation of HDMI 1.2 to deliver the bandwidth needed to push 8 million pixels down a wire that fast.

What this practically means for you is that you will see some slight ghosting if you have images moving fairly rapidly across the screen. So, if you are planning on playing 3D games with the monitor, you’ll probably feel the difference between 120hz and 30hz, but if you are using it to run an IDE, open 2 chrome browsers and create a blog post all at the same time, you probably won’t feel a thing.

If you want to see exactly what the difference between different refresh rates is and how they are affected by motion, check out this site that lets you simulate different scenarios.

My experience with the SE39UY04

So, you are probably wondering what I thought of the monitor overall.

I’m very impressed with it so far. So much so that I am considering getting another one and having dual 4k displays for my desktop machine. (Ok, that might be a bit crazy, but hey I never claimed to be sane.)

In all seriousness, this monitor delivers exactly what I wanted and more for the $700 $400 price tag. Equivalent monitors easily go for $3k or more and are still saddled with some of the same restrictions of HDMI 1.2 that this monitor is, (although some of them get around it by utilizing two inputs, which in my opinion isn’t really a good solution.) With HDMI 2.0 coming out and through the use of display port, I imagine this kind of problem won’t be a problem in the future as well. But, for now, for $700 $400, you can’t really get a better deal on a monitor, in my opinion.

I found the monitor to be super bright, but the color reproduction and contrast was not quite as good as some of the high-end 1080p displays that I had seen and used before.

Regardless though, it is pretty amazing to see a 4k monitor in action. I tested out some 4k videos on YouTube and Vimeo and I was blown away. Remember the first time you saw an HD TV? Seeing a 4k TV for the first time is about the same experience, but even better. Now HD looks like crap to me. I am ruined.

I also found that running my PC at the max resolution of 3840 x 2160 didn’t make the text too small. It seemed to be just about the right size where I could still read everything and make use of the extra space. Although, I will admit that I think the extra size of the 50″ version would make this experience even better.

One quick tip I’d recommend to get the most out of this monitor is to use a tool like Display Fusion to divide your screen into 4 logical screens. I use Display Fusion to create four 1080 displays out of my monitor so that I can maximize windows in those four quadrants as if I had four 1080 monitors. But, unlike having four actual 1080 resolution monitors, I can choose to maximize a window on two of the four quadrants or even all four if I wish. So, I have the ultimate flexibility with this monitor and no annoying seams between the displays.

Oh, and if you do any kind of video editing, like I do, it is pretty amazing to be able to edit full 1080 video and only have it take up a 4th of your display. You can actually see the full resolution video and the timeline at the same time. I don’t think I’ll ever be able to go back after this experience.

Video cards

One thing you should be aware of when purchasing this monitor, or any 4k monitor, is that you will need to have a video card that will support that resolution.

The general rule is:

  • Any AMD ATI card in the 7000 series or above will support 4k output.
  • Any NVIDIA card in the GTX 600 and GTX 700 series should support 4k output.

If you want an ATI card that isn’t too expensive, start with the HD 7700.

For NVIDIA, check out the GTX 660.

Final thoughts

Overall, for me, buying this monitor was a no brainer. My biggest fear was that there was some kind of mistake and that the resolution really was not 3840 x 2160 or that some graphics card wouldn’t be able to power that kind of a display, but I found that not only were most modern graphics cards able to power the display, but it also was indeed the real deal.

Now, I realize that not everyone has a $700 budget to spend on a monitor. But, did I mention this thing is actually a 4k TV as well? $700 $400 for a 4k display television is not a bad deal at all, especially if you can convince your spouse to let you put it in the living room. I also did the math and found that if I wanted to purchase four 1080 displays, the mounting arm to hold them, and the extra video card to power all 4 monitors, it would cost quite a bit more than the $700 $400 for a single Seiki SE39UY04 and take up quite a bit more space.

So, if you’ve got the cash and you are looking to be drowned in pixels, go for it, you won’t be disappointed unless you are planning on doing some serious heavy duty gaming with it, (even then I thought it looked plenty good enough for my tastes.)

Introducing The Get Up And Code Podcast!

I’m very excited to announce a brand new podcast Iris Classon and I have put together called “Get Up And Code!”

ep1 image thumb Introducing The Get Up And Code Podcast!

I’ve always wanted to do a podcast, but I’ve been looking for the right topic and right co-host and I believe I have finally found both.

Get Up And Code! (Developer Podcast About Fitness And Nutrition)

Podcast website: http://getupandcode.com

iTunes link: https://itunes.apple.com/us/podcast/get-up-and-code!/id646958161logo300x300 Introducing The Get Up And Code Podcast!

Even though I spend a lot of time talking about code and programming, fitness and nutrition are a big part of my life.

I’ve been lifting weights and running for about 18 years.  Over the course of that time, I have learned quite a bit about gaining muscle, losing weight, running and many other topics—mainly from my own mistakes in those areas.john fit Mobile thumb Introducing The Get Up And Code Podcast!

Iris Classon, my co-host, is clinical dietitian and international personal trainer who also does bodybuilding (on the fitness scale), ultra running and extreme sports.  But, if you are reading my blog, you probably know her as that pink haired coder and Telerik evangelist.iris classon fitness Mobile thumb Introducing The Get Up And Code Podcast!

We decided that our shared love for all things code and all things fitness is probably also an overlap that many other programmers and IT professionals have as well.

So, we decided to do something that hasn’t been done before—create a fitness and nutrition podcast targeted at the IT industry.

An experiment

Neither of us hosted a podcast before, although we’ve both been on Hanselminutes and I’ve been on The Tablet Show a couple of times.

This will be a bit of an experiment and things might be a bit rocky at first, but I am sure we’ll find our way.

If you’d like to support us in our efforts, please spread the news, follow @GetUpAndCode on twitter and like our Facebook page!

Time Traveling To The Future Of User Interfaces

I really dislike using a keyboard and a mouse to interact with a computer.

keyboard thumb Time Traveling To The Future Of User Interfaces

Using a mouse is a more universal skill—once you learn to use a mouse, you can use any mouse.  But, keyboards are often very different and it can be frustrating to try and use a different keyboard.

When I switch between my laptop and my desktop keyboard, it is a jarring experience.  I feel like I am learning to type all over again.  (Of course I never really learned to type, but that is besides the point—My three finger typing style seems to work for me.)

laptop thumb Time Traveling To The Future Of User Interfaces

When I switch to a laptop, I also have to contend with using a touchpad instead of a mouse, most of the time.  Sure, you can plug in a mouse, but it isn’t very convenient and you can’t do that everywhere.

I also find that no matter how awesome I get at keyboard shortcuts, I still have to pick up that mouse or use the touchpad.  Switching between the two interfaces makes it seem like computers were designed for 3 armed beings, not humans.

Even when I look at a laptop, it is clear that half of the entire design is dedicated to the keyboard and touchpad—that is a large amount of wasted space.

I’m not going to say touch is the answer

You may think I am going in the direction of suggesting that tablets solve all our problems by giving us a touch interface, but that is not correct.

Touch is pretty awesome.  I use my iPad much more than I ever thought I would.  Not having the burden of the keyboard and mouse or touchpad is great.

But, when I go to do some text entry on my tablet or my phone, things break down quite a bit.

On-screen keyboards are pretty decent, but they end up taking up half of the screen and the lack of tactile feedback makes it difficult to type without looking directly at the keyboard itself.  Some people are able to rely on autocorrect and just let their fingers fly, but somehow that seems dirty and wrong to me, as if I am training bad habits into my fingers.

touch thumb Time Traveling To The Future Of User Interfaces

Touch itself is not a great interface for interacting with computers.  Computer visual surfaces are flat and lack texture, so there is no advantage to using our touch sensation on them.  We also have big fingers compared to screen resolution technology, so precision is also thrown out the window when we relegate ourselves to touch interfaces.

It is completely silly that touch technology actually blocks us from viewing the part of the screen we want to touch.  If we had greaseless pointy transparent digits, perhaps touch would make the most sense.

Why did everything move to touch then?  What is the big thing that touch does for us?

It is pretty simple, the only real value of touch is to eliminate the use of a mouse or touch pad and a keyboard.

Not convinced?

I wasn’t either, till I thought about it a bit more.

But, consider this… If you were given the option of either having a touch interface for your tablet, or keeping the mouse-like interface, but you could control the mouse cursor with your mind, which would you prefer?

And that is exactly why touch is not the future, it is a solution to a specific problem, the mouse.

The real future

The good news is there are many entrepreneurs and inventors that agree with me and they are currently building new and better ways for us to interact with computers.

Eye control

This technology has some great potential.  As the camera technology in hardware devices improve along with their processing power, the possibility of tracking eye movement to essentially replace a mouse is becoming more and more real.

There are two companies that I know are pioneering this technology and they have some pretty impressive demos.

TheEyeTribe as an “EyeDock” that allows for controlling a tablet with just your eyes.

2013 03 03 13 31 09 thumb Time Traveling To The Future Of User Interfaces

They have a pretty impressive Windows 8 tablet demo which shows some precise cursor control using just your eyes.

Tobii is another company that is developing some pretty cool eye tracking technology.  They seem to be more focused on the disability market right now, but you can actually buy one of their devices on Amazon.

The video demo for PCEye freaks me the hell out though.  I don’t recommend watching it before bed.

But Tobii also has a consumer device that appears to be coming out pretty soon, the Tobii REX.

tobii rex le picture montage backfront619x220 thumb Time Traveling To The Future Of User Interfaces

Subvocal recognition (SVR)

This technology is based on detecting the internal speech that you are generating in your mind right now as you are reading these words.

The basic idea is that when you subvocalize, you actually send electrical signals that can be picked up and interpreted.  Using speech recognition, this would allow a person to control a computer just by thinking the words.  This would be a great way to do text entry to replace a keyboard, on screen or off, when this technology improves.

NASA has been working on technology related to this idea.

And a company called ambient has a product called Audeo that is already in production.  (The demo is a bit rough though.) You can actually buy the basic kit for $2000.

technology promo thumb Time Traveling To The Future Of User Interfaces

Gesture control

You’ve probably already heard of the Kinect, unless you are living under a rock.  And while that technology is pretty amazing, it isn’t exactly the best tool for controlling a PC.

But, there are several other new technologies based off gesture control that seem promising.

There are two basic ways of doing gesture control.  One is using cameras to figure out exactly where a person is and track their movements.  The other is to use accelerometers to detect when a user is moving a device, (an example would be the Wii remote for Nintendo’s Wii.)

2013 03 03 13 34 37 thumb Time Traveling To The Future Of User InterfacesA company called Leap, is very close to releasing a consumer targeted product called Leap Motion that they are pricing at only $79.  They already have plans to sell this in Best Buy stores and it looks very promising.

Another awesome technology that I already pre-ordered, because I always wanted an excuse to wear bracers, is the MYO, a gesture controlled armband that works by a combination of accelerometers and sensing electrical impulses in your arm.

two rings thumb Time Traveling To The Future Of User Interfaces

What is cool about the MYO is that you don’t have to be right in front of the PC and it can detect gestures like a finger snap.  Plus, like I said, it is a pretty sweet looking arm band—Conan meets Bladerunner!

Obviously video based gesture controls won’t work well for mobile devices, but wearable devices like the MYO that use accelerometers and electrical impulse could be used anywhere.  You could control your phone, while it is in your pocket.

Augmented reality and heads up displays

One burden of modern computing that I haven’t mentioned so far is the need to carry around a physical display.

A user interface is a two-way street, the computer communicates to the user and the user communicates to the computer.

2013 03 03 13 36 29 thumb Time Traveling To The Future Of User InterfacesSteve Mann developed a technology called EyeTap all the way back in 1981.  The EyeTap was basically a wearable computer that projected a computer generated image on top of what you were viewing onto your eye.

Lately, Google Glass has been getting all the attention in this area, as Google is pretty close to releasing their augmented reality eyewear that will let a user record video, see augmented reality, and access the internet, using voice commands.

Another company, you may not have heard of is Vuzix, and they have a product that is pretty close to release as well, Smart Glasses M100.

Brain-computer Interface (BCI)

Why not skip everything else and go directly to the brain?header set thumb Time Traveling To The Future Of User Interfaces

There are a few companies that are putting together technology to do just that.

I actually bought a device called the MindWave from NeuroSky, and while it is pretty impressive, it is still more of a toy than a serious way to control a computer.  It basically is able to detect different brain wave patterns.  It can detect concentration or relaxation.  You can imagine, this doesn’t give you a huge amount of control, but it is still pretty fascinating.

I haven’t tried the EPOC neuroheadset yet, but it has even more promise.  It has 14 sensors, which is a bit more intrusive, but it supposedly can detect your thoughts regarding 12 different movement directions, emotions, facial expressions, and head rotation.

So where are we headed?

It is hard to say exactly what technology will win out in the end.

I think we are likely to see aspects of all these technologies eventually combined, to the point where they are so ubiquitous with computer interaction that we forget they even exist.

I can easily imagine a future where we don’t need screens, because we have glasses or implants that directly project images on our retinas or directly interface with the imaging system in our brains.

I easily see us controlling computers by speech, thought, eye movement and gesture seamlessly as we transition from different devices and environments.

There is no reason why eye tracking technology couldn’t detect where our focus is and we could interact with the object of our focus by thinking, saying a command or making a gesture.

What I am sure of though is that the tablet and phone technology of today and the use of touch interfaces is not the future.  It is a great transition step to get us away from the millstone around our necks that is the keyboard and mouse, but it is far from the optimal solution.  Exciting times are ahead indeed.

If you like this post don’t forget to Follow @jsonmez or subscribe to my RSS feed.

The Most Complex Program of All Time

What if I told you that there is a program so complicated that is the source responsible for all other programs ever created?

Give me your most complex program and I will trump it by presenting you with the program that was responsible for creating the human who created that program.

If you haven’t figured it out by now that program is human DNA and that masterful programmer is the Creator Himself.

dna 500 thumb The Most Complex Program of All Time

Doesn’t matter what religion you are

It is pretty difficult to fail to recognize that a program as complex as a human being’s genetic code was created, not randomly assimilated.

As programmers we have a unique perspective in life.  We are able to truly understand God’s masterwork in the creation of human life.  We are able to grasp loosely the ungraspable magnificence of a program so complicated, yet executed so simply.

We also have the unique position of fundamentally understanding that complex programs could never be created by random chance, regardless of time.  We can look at a piece of code or functioning computer program and we can understand that its creation required an intelligent creator.  Other people and professionals do not have this insight that so many of us are fortunate to have.

Qualities of the code

We’ve been treating data like code recently in C# with the introduction of Lambda expressions and other languages have been doing it for much longer, but the ultimate example of this practice is right there in our own DNA.

DNA is data, a message, and code all together at once.  Just like a data structure in the memory of a computer executing a program, it lacks meaning without the context of the cell that it is in.  Amazingly though, this data is recombined in different ways that are dictated by two separate and different instances of itself to produce a third separate instance of itself that still makes sense.

Just to give you an idea of how insanely complex that idea is (despite the simple execution of it), it would be like if you wrote a webserver that could spawn new instances of itself by contacting another, but different copy of your webserver and getting 1/2 the source code payload from itself and the contacted server, then actually combining that code to create a new copy that is different, yet still passes all of your unit and integration tests.

One of the qualities we often look at for our code is the size of the code in relation to what it can accomplish.

A decent estimate is that the human genome is about .35 gigabytes of data.  That data is stored on such a small space that we can’t even see it with the naked eye.  There is no more compact form of data in the universe that we know of.

Not only is this data compact, but consider how much functionality is built into this small .35 gigabyte package?  If you had to write acceptance tests for the human body, you might spend several lifetimes doing it.  If you had to write acceptance tests for just a single cell in your body, that feat itself could take years and still not be complete.  Imagine trying to write a program that took up .35 gigabytes of data, yet contained millions of acceptance tests worth of functionality.

We certainly could go on and on about the qualities of the human code, but I want to point out what perhaps is one of the most unique and amazing… the ability for the code to create its own hardware.

In actuality the code and that hardware are much the same.  DNA replicates by a chemical reaction that causes the entire molecule to unwind and split.  RNA inside a cell is created from specific portions of the DNA in order to create different protein chains which are used to construct little machines that will replicate the DNA and cells and in turn create machines capable of doing the same.

The process is very complex and not wholly understood, but in effect the end result is that DNA contains the instructions inside of a cell to create the machinery to host another copy of itself and execute that code.

Easter eggs

Let’s not forget the little Easter eggs that have been thrown in by the designer of our codebase.

How about a hiccup or a tear?

Sadness or laughter?

There are some “evolutionary theories” as to why these things exist, but in reality they serve no specific purpose for either our survival or well being.

In my mind these are clearly Easter eggs left by the designer to show His handiwork.

Why am I writing this post now?

I didn’t want to go completely off subject and boast about my wonderful daughter that was born on April 17th 2011 at 2:33 PM, since this is a professional blog. 

0417sophiasonmez favs 16 thumb The Most Complex Program of All Time

But, there you have it.

The amazing birth of my first child reminded my of the incredibly complex code that keeps us all breathing, procreating and living life that we seem to take for granted each and every day.

Welcome to the world Sophia Grace!

As always, you can subscribe to this RSS feed to follow my posts on Making the Complex Simple.  Feel free to check out ElegantCode.com where I post about the topic of writing elegant code about once a week.  Also, you can follow me on twitter here.

Published My First Course on Pluralsight

My number of blog posts in the last couple of months has definitely been a little lower than I like, but I have a pretty good reason.

I just got my first course published on Pluralsight!

logomedium thumb Published My First Course on Pluralsight

The course is called Android Development for .NET Developers and it covers most of the basic knowledge you would need to go from knowing nothing about Android development to being able to create a fairly simple application and publish that application to the Android Market.

If you haven’t checked out Pluralsight, it is a really good site for a wide variety of developer training videos.  They really managed to get some very good content on the site and there are videos on just about every .NET topic you can think of.

I have also really enjoyed working with the guys that run Pluralsight, they are all very friendly and very knowledgeable.  Thanks to David Starr and Fritz Onion for all their help getting my course ready and published.

You never really learn something till you teach it

teacher point thumb Published My First Course on Pluralsight

This simple truth became more apparent to me than ever during the process of making this course.

I thought I had a pretty good understanding of the Android fundamentals, having published a fairly complex application, PaceMaker.

What I became quickly aware of is that there is a huge difference between having knowledge and having understanding.

I equate knowledge as possessing a formula to be able to do something, but lacking knowing why or how to make modifications to the process.

Cooking provides an excellent example of this.  There are many people in the world who know how to cook a large number of dishes.  But many of these people only have the knowledge of cooking.  They have a large collection of recipes which they can follow to produce the desired result.

A professional chef on the other hand, has a true understanding of cooking.  This person might have knowledge of many recipes, but they also understand why the particular ingredients are used and can make modifications to those ingredients and steps.  They may even create something without preset steps because they understand what they are doing, not just have knowledge about it.

It was great to have the experience of creating these videos because I was able to acquire an in-depth understanding of Android development, not just a knowledge of what to do.

If you ever have the opportunity to teach, I definitely recommend you take that opportunity.  Even if you don’t think you are qualified to teach a subject, by the time you have prepared what you are going to teach, you will be qualified.  Trial by fire perhaps, but well worth the outcome.  Plus you’ll be helping others in the process.

Much harder than I thought

I do have to admit though, recording training videos is definitely much harder than I had originally anticipated.

In order to get 40 minutes of video, it might take 6 hours worth of work or even more depending on the prep work involved and how much editing after getting the raw footage.

I really expected that it would take about as much time as it takes to record something to produce that something, but I definitely learned that is not the case.

I often found that I had to draw a line and stop trying to refine a video because you can literally spend an unlimited amount of time editing and tweaking a video.

Another revelation that might be apparent to everyone else, but was quite an epiphany to me was that you can edit “umms” out of video very easily.  You can’t even notice where they are cut out!  My first video, I didn’t even realize I could edit anything, and I ended up taking like 50 cuts until I could get it right.

Overall though, great experience, lots of fun

I felt like I’ve been stretched in a different direction, as I had never done any video or audio recording before and had never really spent much time in a room talking to myself pretending to talk to other people, but it was a good kind of stretching.

I really actually enjoyed the process and I will definitely be doing more of this kind of work in the future.  Probably going to take a bit of a break before I start my next course though.  I want to make sure I take some time to get a good retrospective of the process and sharpen my saw a bit so my next videos can be even better.

As always, you can subscribe to this RSS feed to follow my posts on Making the Complex Simple.  Feel free to check out ElegantCode.com where I post about the topic of writing elegant code about once a week.  Also, you can follow me on twitter here.

Objective-C Here I Come!

Have I blabbed enough about the PaceMaker app I released for Android yet?

First month of sales are over, and it was much better than I had expected.  About 75 purchases in the first 30 days.  Not a huge amount, but that is almost with no advertising, most people who found the app found it in the market.

So what is the next step for PaceMaker?

Well, with the iPhone coming to Verizon this month, I think it is pretty obvious that it is time for the iPhone version.

Only problem is…

I know nothing about iPhone development!

Well I didn’t last week, but I am slowly learning.

iphone thumb Objective C Here I Come!

I bought my first Mac ever last week, a MacBook Air.

I have to say, the operating system on Macs has come a long way since I last used one.  (Did I mention I also don’t even know how to properly run a Mac?  But I know Unix, so I should be ok.)

I feel like the Mac interface is so much more polished and uniform than Windows, but it is pretty scary inside when you consider all the low level C and Objective C code.

Then again you have to consider that the wonderful .NET CLR is written right on top of a really crusty win32 API layer which is a bunch of scary C code that is about 20 years old.

So I am setting out on a brave new quest to learn Mac, iPhone and Objective-C and somehow port my application over to the platform.

Objective-C is kind of like an alternate universe

I was trying to think how I would describe Objective-C and here is what I came up with:

Objective-C is like one of those movies where there is an alternate universe where the same people exist as in this universe, but in some areas their technology is really advanced, but in others it’s really ancient.  Like a bunch of people flying around in flying cars, but their weapons are still bows and arrows.

I used to be a C++ programmer, so not too many things scare me, but some of the magical constructs in Objective-C are very frightening indeed.

I was just reading about a strange construct today that allow you to basically create the equivalent of a C# interface, but in Objective-C it is called a “Protocol.”  This seems fine and normal until I read the paragraph that says you can define some of the methods as “Optional.”  What?

Let me put it in C# terms so you can understand it.  In C# it would look like this:

public interface ILovePuppies
{
   private void HugThem();
   private void SqueezeThem();

   perhaps Corpse KillThem(); // Implement this one
                              //only if you feel like it.

}

This is not a joke.  I still can’t quite figure out what this is for, but it is kind of interesting.

Another thing I found interesting is Objective-C has this thing called a “Selector.”  It is not a function pointer, it is a variable that references the name of a method.

How is this different than a function pointer?

It is actually the name of the method being referenced.  So if you have a class Dog that has a method “Wag” and you have a class WildGuesser who has a method “Wag”, passing them the “Wag” selector will cause very different results.  How bizarre.

It’s weird to get sucked into the Mac world

It’s actually kind of funny.  Here were all us Java and C# programmers off basically doing the same thing; creating our interfaces and arguing about dependency injection and mocking our unit tests and these Mac geeks with their bow ties and designer jeans were going a totally different direction.

It was only by random chance that our two parallel universes should violently collide.  The iPhone came out and suddenly all these strange “Mac boys” were teaching us this new old language and reminding us to free up own memory again.

FOR GOD’S SAKE I JUST IMPORTED A C HEADER FILE FOR THE FIRST TIME IN 10 YEARS!  THIS IS CRAZY!

But, I have to admit it is actually kind of fun.

Sometimes a change of pace is refreshing

I don’t mean my harsh language to be derogatory towards you Mac heads out there.  You know you are cool, your boy Steve is leading this century’s computing revolution.

I honestly mean that.  Good job guys, you may just take over the world.

I’m actually enjoying this experience and beginning to think that if I come out alive, I will have gained some very valuable insights into programming in C# and Java.  It is good sometimes to view something from a totally completely different perspective.

Who knows maybe I’ll get to write that Objective-C vs Java vs C# post I’ve been dreaming of.

But what about…

MonoTouch?

Meh.  If I am going to program for a platform, I am going to program for that platform.  I’m not going to half learn how to program for the iPhone and learn on the C# crutch.  I didn’t do that for Android and I’m not going to do it for iPhone either.

Why?

Because I am stubborn and cranky?  Partially, but I actually have a few sensible reasons also:

  1. MonoDroid and MonoTouch both implement another layer over the phone’s framework.  Adding this additional layer makes it harder to do low level stuff, and with something as low level as a phone, doing low level stuff is often important.
  2. You are still using the underlying framework for either Android or iPhone.  It is not like using C# code behind the scenes allows you to write a Silverlight UI that you can use on any of the mobile platforms.  You still have to learn the entire phone development framework, which dovetails into point three…
  3. It is much easier to get help and find resources for raw Android or iPhone development than for MonoX development.  Not trying to bash the Mono projects here, but most of mobile programming is spent googling for how to do things.  By sticking with C# you are really limiting yourself in terms of finding answers.
  4. Change and learning different things is good.  I’m not sure you can fully appreciate the design of a framework or platform unless you develop against it the way it was designed.  I could be wrong, but I think there is a potential “lost in translation” problem in using C# on the iPhone or Android platforms.

After I learn iPhone development, I might try MonoTouch and see if it makes my life easier, but I need a good baseline first.

Well, I’m off on my journey.  Going to head on to the back of the wardrobe in the “Spare-Oom.”  I have to meet Mr. Tumnus, we are having tea with Mr. Wozniak and Mr. Jobs.

mrtumnus thumb Objective C Here I Come!

As always, you can subscribe to this RSS feed to follow my posts on Making the Complex Simple.  Feel free to check out ElegantCode.com where I post about the topic of writing elegant code about once a week.  Also, you can follow me on twitter here.

Using Var + As, a Neat Little Trick

Perhaps this is something everyone already knew about, but I recently came across this little C# combo that solves one of my major outstanding issues with the var keyword.

I consider var to actually be quite a useful language feature to reduce repetition and make your code slightly more flexible for refactoring, but I’ve always had one little problem with it.

What if I want a base class type or interface?

I most often run into this problem when I am working with lists.

Have you ever written some code like this?

var myList = new List<int>();

 

The problem with this code is that we are stuck with the concrete List implementation for our variable myList, because we don’t have a way of specifying that we actually want an IEnumerable to be our reference type.

The solution is so simple that I am a bit surprised I didn’t think of it earlier.

I had always assumed that I just couldn’t use var there and would have to declare the type like so:

IEnumerable<int> myList = new List<int>();

 

But we can actually just use as to keep our var in place if we want to.

var myList = new List<int> as IEnumerable<int>

 

So it’s actually a little more verbose, but I think it is a bit more clear, and it is more consistent if you are using var everywhere else.

There has to be a better use

I’ve been racking my brain trying to come up with more useful ways to use this little combo, but I can’t really seem to come up with anything.

It seems like there has to be something else you could use this combo for.

What do you think?  Any ideas?

A Simple Wrapper To Make Things More Fluent

This post is really a continuation from my last post on using a method that takes an Action to address cross cutting concerns, like logging, without having to go to a full blown AOP implementation.

Someone mentioned in the comments that it wasn’t very clear exactly what was going on with the final code.  I tend to agree that this:

LogOnError(_riceCooker.Cook);

… is not very clear.

Really, there are two problems with this code that I can see.

  1. It is not clear what this is going to do or whether or not LogOnError or Cook is the method we are concerned about.
  2. It’s not very self-discoverable at all.  If we had a library of useful wrapper methods like these, we wouldn’t have a good intellisense way to know what they are.

I can solve both of those issues, but doing so starts to move us into a weird zone where I am not quite sure I feel comfortable.  But, nevertheless, in the name of science…

wrapped thumb A Simple Wrapper To Make Things More Fluent

Let’s start backwards

Liking fluent interfaces, here is the kind of syntax that I would prefer to be able to use:

Wrapper.Wrap(_riceCooker.Cook).With.LogOnError();

It is a little bit longer syntax, but I like it for a few reasons:

  1. It clearly indicates what is going on here.  We are wrapping a method call using a wrapper.  We are wrapping with a method called LogOnError.
  2. You get intellisense all the way.  The correct implementation of this, should let me Type With + ‘.’ and then see a list of all the possible wrapping methods I have implemented.  This makes the wrapping set of methods self-discoverable.

I really like the idea of being able to easily change the functionality of the wrapping just by changing the last part of the line.  For example, if we had implemented a wrapping method that was LogAndAbortOnError(), we could change our code to use that pretty easily.

Wrapper.Wrap(_riceCooker.Cook).With.LogAndAbortOnError();

If we implement this correctly, intellisense will give us our options.

Making it so

Creating a fluent syntax in C# can often involve quite a bit of magic and voodoo.  I always like to gather my reagents before embarking on such a journey.

So grab a live chicken, a stapler, and a sharp knife and let’s go!

First step, let’s simplify this.  The With is nice, but it is just for flow, we don’t really need it.  So let’s figure out how to implement our syntax without the With and add it in afterwards.

Wrapper.Wrap(_riceCooker.Cook).LogOnError();

First the easy way.

  1. Create a static Wrapper class with a Wrap method that takes an Action and returns an Action.  (We’ll use this to convert whatever we pass in to an Action, so that we can use a Lambda expression or any method call there.)
  2. Create a static extension method that operates on an Action.  Call it LogOnError.
public static class Wrapper
{
    public static Action Wrap(Action action)
    {
        return action;
    }

    public static void LogOnError(this Action action)
    {
        try
        {
            action();
        }
        catch (Exception exception)
        {
            // Log the exception here
        }
    }
}

 

Not too bad.  Not a large amount of magic going on here.  Just using an extension method.

But, we already have a problem.  Using a plain old Action is going to give us too many choices in the intellisense drop down.  It could make it hard to know what our real options are and when we try and add the With syntax later we will need to use a property off of an object we return from the Wrap method.

Making it better

We can fix this by actually wrapping the Action with a custom type that we can add our methods to.

Instead of Wrap returning an Action, it will return a WrappedAction.

public static class Wrapper
{
    public static WrappedAction Wrap(Action action)
    {
        return new WrappedAction() {Action = action};
    }

    public static void LogOnError(this WrappedAction wrappedAction)
    {
        try
        {
            wrappedAction.Action();
        }
        catch (Exception exception)
        {
            // Log the exception here
        }
    }

    public class WrappedAction
    {
        public Action Action { get; set; }
    }
}

Looking better.  Now when we put a ‘.’ at the end of our Wrap call we only see LogOnError as an option.

We can be sure now that if we create an extension method for a WrappedAction, we will make sure that method is self-discoverable.  Before, the generic Action extension method could make our method show up places that we don’t want it to and can get lost in the other methods on Action.

Making it done

The last thing we need to do is add the With.

Ideally, when we hit the ‘.’ on the end of the Wrap method, we want to see With as an option.  When we hit the ‘.’ on the end of the With property, we want to see LogOnError as an option.

In order to accomplish this we need to:

  1. Add a With property to the WrappedAction.
  2. Have the With property be of a new type (WrappedActionTarget) so that we can add our extension methods for that new type.
  3. Change the extension method to operate on the new type.

Here is what we end up with:

public static class Wrapper
{
    public static WrappedAction Wrap(Action action)
    {
        return new WrappedAction() { Action = action };
    }

    public static void LogOnError(this WrapperMethodTarget target)
    {
        try
        {
            target.WrappedAction.Action();
        }
        catch (Exception)
        {
            Console.Write("Logging this error");
        }
    }
}

public class WrapperMethodTarget
{
    public WrappedAction WrappedAction { get; set; }
}

public class WrappedAction
{
    public Action Action { get; set; }

    public WrapperMethodTarget With
    {
        get
        {
            return new WrapperMethodTarget() { WrappedAction = this };
        }
    }
}

 

Now we can use the syntax of:

Wrapper.Wrap(_riceCooker.Cook).With.LogOnError();

We can move that LogOnError method out to another class, or create new extension methods somewhere else.  I just put it in there to avoid creating another class.

Is this really practical?

I don’t know.  To be honest, I was playing around with creating extension methods that work on Actions and I came up with this way to use them.

I could see making a wrapping library that had different kinds of ways you would wrap method calls built into it.  It could allow you to specify how you log in a configuration and then you would get all of this common stuff automatically.

Even if it is not practical, it’s pretty fun, and it demonstrates the power of Action, or rather functional programming in general.

Aspect Oriented Programming with Action<>

Aspect Oriented Programming (AOP) is a pretty great concept.

It is a little difficult to implement though.

To be honest, I don’t think I’ve ever really seen it successfully implemented.  I mean sure, I’ve seen examples of how you could use it for “cross-cutting” concerns like logging.

mad scientist thumb Aspect Oriented Programming with Action<>

The problem is it is usually pretty difficult to use and the only real practical application I can ever come up with is logging.  I know, it is probably just my lack of knowledge in the area, but if you bear with me I’ll show you a neat little trick you can use to address cross-cutting concerns by doing something similar to what AOP does using Action<>.

Putting it all in one place

The main problem AOP tries to solve is taking aspects of your software that exist in many different places and condensing them into one place for you to maintain.

Exception handling and logging tend to be the most infamous of these cross-cutting concerns.  Many places in your code you no doubt have many instances where you catch an exception and the only thing you can really do is log it.

I’m going to show you a little easy way to do that using Action<>.

Giving credit where credit is due, I got this idea from some code that a coworker of mine, Subha Tarafdar, wrote.  (He is a genius.)

He wrote some code to basically do what I am going to show you, but with retrying database queries.  He was able to reduce many places in the code base where we had repeated logic to retry executing database queries when getting a deadlock or timeout.

Does this code belong to you?

public void MakeRice()
{
    try
    {
        _riceCooker.Cook();
    }
    catch (Exception exception)
    {
        // Don't care if this fails,
        // there is nothing we can do about it.
        Logger.Log(exception.Message);
    }
}

Ignore that I am catching a general exception here.  It is a bad practice, but sometimes all you are going to do is log whatever bad thing happens and move on.

It’s pretty common to do something in a try block and catch an exception only to log it.

Think about how many times this code or something similar to it might be sprinkled throughout your code base.

Action<> to the rescue

If you’re not familiar with Action<> take a look at this post I did that gives a very simple explanation for how it works.

We can take the logic of the try, catch, and log exceptions and put it into a method that only varies by what action we do.

public static void LogOnFailure(Action action)
{
    try
    {
        action();
    }
    catch (Exception exception)
    {
        Logger.Log(exception.Message);
    }
}

I’m not a big fan of static methods but in certain cases they make sense.  The alternative is to have all of this code sprinkled throughout your code base.

Now that we have this method, we can do anything we want and know that if there is an error it will be logged.

Check this out:

LogOnFailure(_riceCooker.Cook);
LogOnFailure(KickACat);
LogOnFailure(() =&gt;
                    {
                        Wakeup();
                        SmellTheRoses();
                    }
            );

And if you decide you want to change how you log the error or what you do on it, you can change it all in one place.

Not just for logging

You can apply this kind of solution in many places where you have cross cutting concerns in your code base.

Here are a few suggestions for places you might consider this kind of a solution:

  • Retrying on failure logic
  • Using an alternative service for a failure (web service “A” failed, but we can use web service “B”)
  • Database connection and connection closing logic.  (Open connection, do something, close connection.)