Code Is Cheap, It's Knowledge Discovery That Costs

If we knew exactly what code needs to be written, what needs to be done and how it can be done, we would need very little time to write it. It is the discovery of the knowledge what to build and how to build it that takes all the time. Yet non-developers usually see it as an unacceptable waste to write and then throw away - and perhaps rewrite - code.



Conclusion



Do not hesitate to write throw-away code - proofs of concepts, spikes, experiments etc. - and then actually throw it away. Remember the difference between the cost of code typing and knowledge discovery. Hopefully it will make it easier to justify it to non-devs. Especially given that a N+1 attempt usually yields a better result than the previous one since we have learnt something.

Resist the evil temptation to build further on your "throw-away " code. You wrote it optimizing for learning, not for good, understandable, robust code that shall live long. We know how important a good foundation is for a house, why do we think it is different for software?

P.S.: Dan North had a wonderful talk at NDC Oslo 2013 about his "craziest" project (where business people coded with devs and devs paired with businesses people on their work). They wrote the first version of the business critical system in two weeks and then threw it away and rewrote it in a different language, building on all they have learnt.

You might enjoy also other posts on effective development.


Tags: opinion methodology


Copyright © 2024 Jakub Holý
Powered by Cryogen
Theme by KingMob