Post Image

Clean Code – Comments

Comments are a key element of coding, and there are good comments and bad comments this article is more of a list and heads up to have in account when you’re writing code.

Good Comments

  • Clarifies the purpose (good on tests)
  • Legal comments (in big corporations is mainly a standard to have those)
  • Informative Comments (the provide key info about something more complex – like regex)
  • Explanation of Intent (main goal, or why certain step was made)
  • Warning consequences (helps a lot to understand possible outcomes)
  • To-Do comments (to get a track of what is missing to be done)

Bad Comments

  • Noise Comments
  • Redundant
  • Position Markers
  • Closing Brace Comments (in flutter makes sense)
  • Commented-out code

This is just a overall list of what you should have in consideration.

svgKubernetes - PODs
svgYAML in Kubernetes

Leave a reply