The value of throwing code away

Published on 
1 min, 161 words

We had a discussion at work about "throw away" code. One of our developers was very against developing any code that would be thrown away afterwards. He referred to this as a waste. In my view sometimes the biggest gain can be in developing code that is meant to be thrown away. It can be used to try things and, more importantly, learn things that can shape the code that is kept. This article sums it up much more eloquently than I can.

A lot of developers also like to refactor existing code. This usually involves the removal of code they deem can be improved. In some ways, the initial code could be viewed as a prototype and hence it is fine to throw away that code ... and at some point the code they have written will also be thrown away.

Links

Prototypes Are Worthless, But Prototyping Is Essential