How about unit-testing “Hello World!”
GILES BOWKETT IS GETTING SERIOUSLY PISSED about the FizzBuzz kerfuffle that has rocked the blogosphere as of late. I can see why: a simple test that’s supposed to weed out people totally unqualified for a programming job has become an idolatrous ideĆ©-fix with coders around the world hacking implementations in all programming languages known to man. What a waste of time, except programmers are prone to getting lured into various time-wasters (well, at least I used so).
But I’m not re-blogging his piece to argue about FizzBuzz. He received a Java implementation thereof and noticed how bureaucratic and inflexible it was, especially given the simplicity of the task. He writes:
You need to be flexible and adaptable in business. This Java solution packs layers of beauraucracy onto what might be the simplest programming problem in the world. Layers of beauraucracy have the functional result of impeding change — consider how my solution, you can change anything, whereas the Java one supports some changes and not others, and the developer’s assumptions about what changes may or may not be necessary shape the eventual range of what changes are possible.
But the sociological result of layers of beauraucracy is the real danger here. Sociology is much more important to software development than people generally realize. The sociological effect of Java, in this case, is encouraging conformity and limiting imagination. [...]
Anybody who’s ever seen a software project fail or even falter knows that if you cover every reasonable variation, you’re going to build a whole lot of options that your client or users will never ever use or even see, wasting time and money in the process, while at the same time building something which can bend at every join except the one they need to flex. You shouldn’t cover reasonable variations. You shouldn’t cover any variations. You should code the quickest, simplest solution you possibly can, even if it looks stupid as fuck, and then if your client or your users need some change, you should choose the way to do it which requires the absolute minimum of work.
Amen to that, brother.
Technorati Tags: FizzBuzz, Java, programming
comments
Additional comments powered by BackType


