I agree, that under ideal situations, code self documents. However, some of the best code bases I've seen are sprinkled with comments β lots of them. I like stating the pre and post conditions of my functions. Also, I like explaining the reasoning behind the module I'm building as well. Not only what it does, but what it doesn't do as well.
code should strive to be self documented. At least according to agile principle.
Clean code also tells you that your code should be self explanatory, that you could read code like one reads a text
I agree, that under ideal situations, code self documents. However, some of the best code bases I've seen are sprinkled with comments β lots of them. I like stating the
pre
andpost conditions
of my functions. Also, I like explaining the reasoning behind the module I'm building as well. Not only what it does, but what it doesn't do as well.Cheers,
Matt Chung
@memattchung