Is it normal to forget how your own code works?

Image for post
Image for post

Absolutely! You should always view your future self like a complete stranger reading and trying to understand your code. And you should act accordingly today, to spare your future self some headaches.

  • Write tests that document your intentions
  • Refactor mercilessly to always have the simplest possible code fulfil the current requirements
  • Use self-explaining names for variables, methods, classes. Don’t abbreviate!
  • Don’t use cool programming language tricks. Err on the side of longer but more descriptive code
  • Use common design patterns as a kind of meta language
  • Comment sparsely! Too many and long comments are usually a sign of unreadable code (readable code needs very few comments)
  • And a lot more …

Written by

Agile Coach, Business Innovator, Software Engineer, Musician

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