DEV Community

Discussion on: Give one Short Piece of Advice or Wisdom to Beginning Programmers

dwilmer profile image
Daan Wilmer

Don't worry too much about optimization. First make sure you understand what you should do. Then write tests that capture that functionality. Then pass those tests. Then clean up your code to make it readable (the best code comes from planning, and planning comes from understanding, and you might not understand it until you've solved it a first time).
Only once performance is an issue or a requirement, should you worry about that.

lifelongthinker profile image
Sebastian Author

Totally agree. Premature optimization is the root of all evil (D. Knuth).