[Xcircuit-dev] Why I didn't attempt a rewrite-from-scratch

Kuba Ober kuba at mareimbrium.org
Fri Oct 15 10:29:41 PDT 2010


Just in case anyone asked why wouldn't I attempt a rewrite from scratch, given that
pretty much all of the code will be affected by porting, and a lot of it will be removed,
and so on.

I wholeheartedly agree with the arguments presented by Joel Spolsky in his essay
Things You Should Never Do, Part I [On Software Rewrites]
<http://www.joelonsoftware.com/articles/fog0000000069.html>

For me, though, the biggest, absolute deal-breaker argument is that I mostly have code
that works: every few hours of hacking away at the code I strive to have something that
runs and behaves just like original Xcircuit did. That's a big motivator. I can use it. I can
work on porting, but when I feel like it I can also add new functionality -- not merely redo
from scratch what has been already done.

So, yes, the code can be "messy" -- a personal feeling only, it can be obtuse, it is often
full of copy-and-paste functionality, but the proof is in the pudding: it works. I guess it only
adds to Tim's achievement that in spite of the code quality, the damned thing still works
and does what one wants it to do. Having a nice, working project with by-the-book codebase
is one thing, having something that has survived endless organic improvements at the
cost of some code degeneracy is another thing. It makes it so much harder to work on it,
and Tim surely often had to make a choice between adding functionality and refactoring.
Faced, as one in a user capacity would, need for new functionality *now*, refactoring and
cleanup had to be on the backburner, and I understand it. I have plenty of my own code
that is messy simply because I use it and if I find time to work on it, it's just to add new
functionality. So is when life has a finite timespan, I guess.

Cheers, Kuba





More information about the Xcircuit-dev mailing list