Code First, Design Later

… must be the worst thing any self-respecting Software Developer would advocate. However, there is some truth to the statement. Allow me to explain.

Software development has been so many times compared to building construction, that the analogy of blueprints to software design is accepted without contention. Authoritative sources claim that no one would start full construction without the blue prints drawn up.  And it follows that we need software designs before construction.  This is all in the realm of conventional wisdom, that is inscribed and drilled into every developer’s head from the beginning of time.

But my experience was always different from this wisdom. I always found that even when software design was complete before starting to code, invariably(100%) the design would change as the code was written, the test cases written, the test cases run, after real world use. The shipping product’s design would only have a passing resemblance to the original design.

This evolving design troubled me to no end. How can a software development as a construction analogy be valid if the design evolves? I am not aware of any construction practice where the blue print changes as the construction proceeds.

The conclusion to draw is that “the design is the blue print” analogy is fundamentally flawed and incorrect for software development.

So what then is the blue print for software if it is not the design?

It is the source code itself says the insightful “Code as Design” articles published by Jack Reeves.

And, not any source code, but the source code AFTER it has passed through unit, system testing, QA, acceptance testing etc. The blue print for software is what goes into the build for the release.

This is a subtle but an important change in perspective. The important thing to realise is that software design is not complete till the code is written, all the tests pass, the QA is complete and the product is shipped to the customer. Each and every step along the way requires the same skill and importance as that is usually paid to Software Design.

Note, that this is not saying that there is no need to design first before coding, but rather, design is not a fixed phase that stops before coding begins.

Code first, Design Later. :-)

Leave a Reply