Blog > IT Aphorisms - The root of all evil

September 4, 2021
... premature optimization is the root of all evil (or at least most of it) in programming.

Computer Programming as an Art, Association for Computing Machinery (ACM) 1974 Turing Award Lecture, Donald Knuth.

The root of all evil. Quite an statement.

Donald Knuth saw it clearly (either him or Tony Hoare, sometimes said to be the author of this aphorism). The complete quote elaborates it a bit a bit more:

The real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at the wrong times; premature optimization is the root of all evil (or at least most of it) in programming.

This warning can help on your programming session: do not introduce optimizations while you are laying out your design. Keep it simple or you will regret it later.

I have learnt this the hard way; now I try to code based on the functionality I want to achieve (and that I need now), rather than consider future enhancements and optimizations.

See all IT aphorisms.