Broken Windows

No, not a rant about a Microsoftian operating system, but about someone else’s bad code: my own.

So I’d like to say that I’ve been beavering away on the new controller code, but I really haven’t. Chipping away at it a little at a time, maybe, but I’ve found my commitment waning.

The truth is, my implementation sucks balls.

I’ve got it mostly working, but there’s still stuff to do, and I just can’t be bothered doing it. At first I thought that it was just my enthusiasm for the game in general waning, as it will tend to do at some point during any project, but then I was reminded of the Broken Window Theory. Jeff Atwood explains it very well in this entry from his blog Coding Horror, but it can be pretty much summed up as: “if you don’t fix the small problems, it’ll negatively impact the quality of the whole.” I realized that I was plowing on with an implementation which, while it would certainly work, was so inelegant and ugly that it was sapping my will to work on the project as a whole, and that if I continued on my current path I was in real danger of just running out of steam and abandoning the whole thing altogether.

So, as threatened, I’m hitting “delete”, consigning a big chunk of code to the source repository in the sky, and starting it again. It’s not a setback, just a learning exercise I had to go through, and hopefully this time round it will be fun to implement because it’s not ugly as your ma. And of course it shouldn’t take as long the second time around, since I’ve learned a lot, and it won’t feel like a horrible chore.

Leave a Reply