Debugging – A tale of 2 centuries- 3 mins
Love it or loathe it, debugging is a large part of software development. Plan code, write code, test, debug code, refactor code, test, debug code, write code…… You get the picture.
It’s safe to say that debugging is important, especially when learning a new language or framework. In recent months I’ve been creating apps with Ruby (Rails) and Swift (iOS), two languages and frameworks that are new to me. Both have had their issues, but after many hours of debugging and rewriting code, things are starting to fall into place.
In Malcolm Gladwell’s ‘Outliers’, the story of how Bill Joy became a computer genius is touched upon within the context of the 10,000 hour rule. He attended the University of Michigan in the early 70’s before going on to help create UNIX and vi before becoming a founder of Sun Microsystems.
Bill Joy studied during a period of time when computing was changing rapidly, moving from Punch card programming of the previous years to a screen based system that we would recognise today. No longer would computer scientists need to punch holes in a piece of cardboard, before waiting a week before the results came back from the lab. As part of the story, debugging was covered.
“Programming with cards did not teach you programming. It taught you patience and proofreading”.
I’m youthful enough to not remember that far back. Development has always been within a text editor of some kind and results have always been near-instantaneous compared to the sixties. The worst it’s ever got for me was having to use FrontPage for creating web pages (I’m claiming that as a badge of honour).
Whilst reading ‘Outliers’ my mind was thrown back to early in the week, specifically a long and tedious debugging session. After picking through the code, placing debug statements and inspecting variables, I found the solution after an hour or so. At the time I felt this was a really slow process, but in comparison to the punch cards I was moving at light speed. All of a sudden that hour plus the 10 seconds to compile the application was not so bad. The thought of having to wait a week to find out if changes had worked as expected sounds awful.
Today, programming is a combination of memory, intuition, Google fu (or should that be Alphabet fu) and banging your head against a wall. Whilst we no longer have a really long compile time, complexity has increased exponentially. During the punch card era a program would be written in a single language.
Next time you find yourself stressing about debugging and compile time, just be thankful that you’re not programming in the 60’s.