Clean code

To achieve clean code, programmers should value:

  • Simplicity over complexity
  • Clarity over obfuscation
  • Being dumb over being clever

Clean code allows others to understand how it works. This improves:

  • Readability (shared mental models)
  • Maintainability
  • Quality (confidence that it does what it’s supposed to do and not cause bugs)

If you’re given a choice between (1) code that’s prematurely optimized but hard to read and (2) code that’s less performant but easier to understand, you should prefer the latter over the former. Developers will thank you.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store