Of course while writing a post about why programming is hard one of the reasons came and bit me right in the behind. You see I originally started writing this list in Coda, my main code editor. About 70% of the way through I stepped aside to grab some more coffee and when I came back dove into taking care of a few other tasks. When I went back to Coda* I started tidying up a bit and closing some tabs and hit CMD+W one too many times, resulting in closing my list which had never been saved. D’oh!
Serves me right…
- Learning a language
- Math is hard
- Cosmic rays
- Talking to Computers
- Talking to humans
- Math is hard
- Human Error
- The Black Hole
- The Coding Zone
Reading, writing and speaking any new language is difficult, at least to most people. Some of us have the gift of gab and can pick up a new language rather quickly but for the majority of us, becoming fluent in a non-native tongue is difficult. Well, computer programming at its core necessitates learning a new language.
I’ve yet to meet someone who thinks math is easy.
Yes, they’re highly unlikely but as NASA recently showed us, you can do everything right and still face a random error caused by a random cosmic ray flipping your bits.
While learning a new language is difficult enough on its own, programmers must also learn to communicate with a new entity, the computer! And while we can make do with hand signs and gestures when communicating with someone in a different language, computers have yet to catch up. They’re unforgiving and if you don’t talk to them in a language they can understand they will basically ignore you.
Although coding requires communicating with the computer, at the end of the day we still (knock on wood) live in a world dominated by humans. That means you need to make your code work for the computer and for the human users of the application you’re developing.
Did I mention this already? Oh well, it’s worth noting again because math is incredibly complex. Sure we all know that one plus one is three, but there exist a plethora of math problems that our top mathematicians can’t crack. Sure, some of these high level problems don’t really matter but they still show how seemingly never-ending the field can be.
Computers need electrical juice to run, which also means they’re prone to crashes and complete failures. Unless you’re saving your work constantly (which thankfully is now done just as easily as said), you just might lose a ton of work due to a power outage, spike, or any other force outside your control. Even if you’re saving constantly those backups could go haywire at a moments notice.
We make mistakes. It’s inevitable. And no matter how sophisticated IDEs get and no matter how good we get, little tiny typos and omissions will sneak through leading to frustrating errors. All of you programmers who’ve ever spent hours reviewing your code character by character only to finally find a missing semicolon know what I’m talking about.
There’s limits to what we and computers can currently do. That means there are problems that are simply insolvable at the moment. It could be a lack of computing power or lack of knowledge about human-computer interactions or simply not enough time. Either way, we can code and code and code for hours and days and months and never come close to solving the initial problem. The black hole of modern limitations will eat up your time, energy, and resources and spit nothing out (except maybe to the alternate universe on the other side).
Athletes love to refer to something called “the zone”. It’s a magical piece of time and space where everything slows down around the athlete and each move is planned a few steps in advance of the opponent. It sounds like malarky but the zone does really exist. I’ve encountered it a few rare times, but it is real. It might be completely in our minds, a combination of extreme concentration and increased spatial recognition but it exists and is extremely helpful.
Well, programmers have to go into the zone constantly. We don’t really have a choice. Personally, if I can’t set aside at least a 4 hour block of time to sit and become ingrained in the lines on my computer screen, my productivity suffers greatly. Sure, I can still get things done but if I can’t immerse myself into the zone, it can easily take multiple sittings and double digit hours to accomplish something I could have easily done in just a couple of hours if I was in the zone.
But, today’s programmers have more distractions than ever. We need to always be on and available, and tools exist to allow just that. It’s becoming tougher and tougher to disconnect from the distractions around you and dive into the coding cave for a solid block of time. But just like you can’t really learn a language until you dive into that country, you can’t really code unless you dive in and immerse yourself in the computer. That cold, isolated stare you may see on someone whose fingers are madly typing away is not a drug overdose, it’s the zone!
*I wrote this post a long, long time ago and haven’t used Coda in 4-5 years but I wrote this post back then so I’m leaving it. I currently use combinations of Vi, Sublime Text, Netbeans and lately Brackets has been a cool new editor.