As developers from our first years we are taught by our masters: “Comment your code you should, my young apprentice”. I even found this article, that outlines 13 rules, on how you should comment your code. I only have two rules for that:
- Don’t comment what your code is doing. If you find it necessary, it’s a code smell, and you should start thinking about refactoring it, so that it’s obvious.
- Do comment why your code does what it does.
Other than that, merry Christmas and happy new year everybody.