Monday, March 2, 2009

What is the value of good design?

Writing code is not just engineering, it's also art. From early in our education we're taught about flexible and extensible design, patterns, good coding practice, imagining how our simple little codebase will one day become a dominant application, or perhaps a giraffe, and how we should be ready for the changes leading to that end. We strive for the perfect expression of this planning in code.

And yet, industrial software is riddled with crap. Code that handles the 3 cases we happened to care about. Code that makes special exceptions for particular fringe cases. Code that is so hard to follow that no one dares touch it for fear of completely breaking it. Were the authors of this code bad at what they do? Sometimes, yes. But, more fundamentally ....

I can't sell well-architected code for more money, the user just cares that their scenario works. It [usually] takes more thought (and time and cost) to write good code. The extensibility gained may never be used. The edge cases the bad code misses may not even be exposable. And yet, and yet, I know that writing the code well will benefit me later, will allow me to plug in cool features easily, will minimize bugs.

What's the right balance?

I think this could be the basis of a new religion.

No comments: