Every experienced developer knows this scenario - you're coding all day, churning out all kinds of code, feeling really productive, and then WHAM!
You run into a problem that grinds all that productivity to a halt. Sometimes for the next day or two, or worse.
I call this Something Stupid, as in "I've been stuck for the last three days on Something Stupid".
by Dizzy Girl
Something Stupid is characterized by some innocuous coding error that creates a severe problem - could be a missing semi-colon, a stray tab character, or a missing XML tag. Something Stupid is usually accompanied by bizarre and misleading error messages and strange behavior. Unfortunately, you don't usually realize it's Something Stupid until you waste a few days diagnosing the problem.
Usually when I'm stuck in the midst of Something Stupid, it seems like some kind of hard problem. Sometimes, I have the hubris to think that there's a subtle bug in some library that I'm using. I remember once in college I was totally convinced that gcc had a bug when it was something in my own code. In Java, 9 out of 10 times it has something to do with something wrong with the classpath. (Always remember this, java developers.) If the code is dealing with J2EE, it might be 95 out of 100.
Be careful to recognize the signs of Something Stupid and deal with it as such. Use the principle of Occam's Razor to look for low-level problems instead of complex ones. In the worst case, restore your code to the last known working state and redo your changes.
Wasting a lot of time dealing Something Stupid with is often a sign of something wrong with your development process. Maybe you need to use better source control practices, or to create some build/deployment scripts, or should take advantage of unit testing more effectively. Avoid things that generally cause strange problems, like using spaces in file and directory names.
The new breed of frameworks are not immune to this phenomenon. Ruby on Rails has been touted as a framework that offers at least 10X the productivity of other web frameworks. It's been sold as being free from the configuration hassles associated with frameworks like J2EE. It is indeed very fast to develop in Rails, but don't be fooled into complacency - Ruby/Rails is just as prone to Something Stupid. Perhaps even more so. Because of the dynamic nature of ruby and the heavy use of conventions in Rails, Something Stupid can be even harder to hunt down than in other environments.
Recent Comments