Subscribe

Close

Thank you for visiting!

Please consider subscribing to the RSS feed or following me on Twitter.

Rules of Programming: Make Your Code Self-Descriptive

This one is really easy. Make your code clear. If an outsider takes a look at your code, it should be clear to that outsider what the specific code is doing.

How can you make your code more self-descriptive?

  • Use conventional naming. Name your classes and variables so that it's instantly understood what they are there for.
  • Comment code when it's necessary and adds value to the code. Not otherwise.
  • Make other people review your code. Ask for opinions and utilize pair programming if needed.

Rule #2 of programming:

Make your code self-descriptive.

To the top