2008-02-27

Build One To Throw Away, You Will Anyhow

From Knowing.NET:

Such [i.e. the title: "Build one to throw away, you will anyhow"] was one of the many pieces of advice of Fred Brooks in The Mythical Man-Month and while others of Brooks aphorisms have stood the test of time, completely scrapping a codebase is today seen more as an aberration than a painful but necessary part of the process.

Andrew Binstock, who's been developing a modern typesetting language (a TeX for the new millennium), has decided to do just that with his 20K LoC, multiple man-year codebase. His recognition that "the more I code, the more I see that I am adding top floors to a leaning tower. Eventually I'll topple it" may seem startling coming from a vocal advocate of unit-testing, especially to younger developers who probably have had pretty-good success developing Web-based applications.

Andrew pinpoints the critical issue:

It's extremely difficult to figure out where your architecture is deficient if you have never done the kind of project you're currently undertaking.

Nowadays, most of us do our professional programming in pretty well-worn niches -- Web-based database-driven this, Smart-client semi-connected that, etc. Because of that, we (or our team) tend to make pretty good architectural choices. So good, in fact, that nowadays you don't hear nearly as much concern about application architecture as used to be the case. So good, in fact, that lots of people think you can refactor your way out of the wrong architecture; Andrew's decision is surely painful, but I think it's vastly less painful than architectural refactoring...

Just a quick follow-up... Here's the direct link to Andrew Binstock's blog posting: Restarting the Platypus and the Lessons Learned. Based on a remarkably clear-sighted forensic autopsy of his own project (surely not an easy thing to do!) Binstock enumerates a number of valuable lessons - in addition to the one noted above. E.g. "When it comes to modularity for input and output processing, plug-ins are an excellent design model," and "Unit testing delivers extra value when you're writing difficult code."

Yes, very much worth reading. And absorbing.

No comments: