Why Should You Write Clean Code?

Author

Government Analysis Function and ONS Data Science Campus

1 Why Should You Write Clean Code?

As a developer, you need to create a product using code. Most of the time this product will be used or modified by you or others.

By using clean code and making the code readable, it will save you and others time in the future and will enable you to add new features, test/fix bugs and collaborate with other developers.

“Code is like humor. When you have to explain it, it’s bad”

A graph showing time taken against cost per change for clean and dirty code.

Reuse

Open Government Licence 3.0