No code is the best code
Published on Jul 11, 2020 | 3 minute read
I hate writing code. Every line pains me because I know it’s another line that adds complexity to the project, needs documenting and maintained moving forward.
It would seem I’m not alone. Jeff Atwood, Effective Programming: More Than Writing Code, wrote the following:
The best code is no code at all. Every new line of code you willingly bring into the world is code that has to be debugged, code that has to be read and understood, code that has to be supported. Every time you write new code, you should do so reluctantly, under duress, because you completely exhausted all your other options.
Robert Galanakis, Practical Maya Programming with Python, wrote the following:
The fastest code is the code which does not run. The code easiest to maintain is the code that was never written.
Bill Gates’ wrote the following:
Measuring programming progress by lines of code is like measuring aircraft building progress by weight.
Before writing the next line of code, consider the following:
- Do I really need to write a new line of code?
- Can I reuse or repurpose something that already exists?
- If I do need to write something new, is it the simplest it can be?
- In my documentation, am I able to justify why it exists?