𝙲𝚑𝚊𝚒𝚛𝚖𝚊𝚗 𝙼𝚎𝚘𝚠

  • 0 Posts
  • 51 Comments
Joined 2 years ago
cake
Cake day: August 16th, 2023

help-circle







  • What code is doing should generally (exceptions are always possible) be evident from the code itself, through clear naming, concise functions with singular goals and proper code structure.

    Why code is doing what it does can be helpfully explained through a comment. X may update Y because of business decision Z, so putting a little bit of background info on Z can be very helpful for a future maintainer who might understand what X is doing but might not know why it’s doing so in the first place.

    If your code requires a lot of comments to make sense, the comments certainly can be a code smell.