Published by breki on 20 Jun 2010 at 05:10 pm
I’m working on some new Maperitive commands and they require a bit of an extension of the command-line interface. I’ve tried to extend the existing command-line parser code, but it feels like tearing off fingernails. The funny thing is that I’ve rewritten this part of the code a couple of months ago, but it still smells. It’s a typical case of having to extend some functionality slowly bit by bit and not doing it properly, and the crappy code piles up.
So after considering all the options, I’ve decided to do a new rewrite of this code. It’s going to take some time, but it will make me feel better – and that’s the most important thing.
Luckily I have a dozen of existing unit tests which will be very helpful in making the new code run correctly. This is one of the best reasons to write unit tests, people!