Dave Aring has a great post on commenting that isn't specific to VFP but in any development environment. He takes on the Scrum and Agile belief that "all comments are lies".
I will readily say it - last year at SWFox, I made the suggestion that you really don't need to comment your code (at least to a certain extent) if you are using Source code control. After all, when you change something, you check it in, explaining why you did it. (in addition, it was a diatribe against comment headers in code - don't make me read the top of a program to figure out what you did in line 4931)
After reading Dave's post, obviously trying to figure out WHY someone did something by reading through the change log might be a little tough - so you may want to comment it a little. I like Art's point : "it's good to comment *why* something was done (as opposed to commenting *what* something does)"
The problem isn't that all comments are lies or that comments don't prove value, it's that when the code changes, the original comments aren't revised! (that is the one reason why Dave does note as the problem).
It's a great read:
Visionpace: Liar, liar, pants on fire!
Now, as Dave said
"If you have made it this far, you are just not getting enough billable hours in. ", back to billable hours.
I will readily say it - last year at SWFox, I made the suggestion that you really don't need to comment your code (at least to a certain extent) if you are using Source code control. After all, when you change something, you check it in, explaining why you did it. (in addition, it was a diatribe against comment headers in code - don't make me read the top of a program to figure out what you did in line 4931)
After reading Dave's post, obviously trying to figure out WHY someone did something by reading through the change log might be a little tough - so you may want to comment it a little. I like Art's point : "it's good to comment *why* something was done (as opposed to commenting *what* something does)"
The problem isn't that all comments are lies or that comments don't prove value, it's that when the code changes, the original comments aren't revised! (that is the one reason why Dave does note as the problem).
It's a great read:
Visionpace: Liar, liar, pants on fire!
Now, as Dave said
"If you have made it this far, you are just not getting enough billable hours in. ", back to billable hours.
Comments
Thanks for the kind words. It always amazes me that there are two diametrically opposed camps in this discussion. OF COURSE, *I* am right and *THEY* are wrong. ;-)
Seriously, I can see both sides. Mainly, I comment for myself and I really, really try NOT to "lie" to myself.
Maybe the ancient saw should be, "Never discuss religion, politics, or comments."
Bestest,
...Dave