|
|
|
|
|
by afandian
4946 days ago
|
|
I too was forced to do that. I too found it ridiculous. But not for long. There was a utility for generating the documentation strings (it got them right most of the time) and there's a lot to be said for consistency, even if it produces the occasional pointless-looking artefact. The reason this requirement is in the C# style guidelines is because it gives a consistent way of commenting and, of course, allows extraction of documentation and intellisense. I am no drone by any means, but this isn't so insane if you give it some thought. |
|
> allows extraction of documentation and intellisense.
These already give you type signature and function name. If intellisense already gives you "bool isValid", what possible gains do you get from an extra "boolean value indicating whether the value is valid"?
> I am no drone by any means, but this isn't so insane if you give it some thought.
Trust me, I have given it plenty of thought. Some conclusions from these thoughts:
- Code comments that merely mimic the type signature add nothing. Not for readability, not for intellisense, not for documentation extraction.
- They increase the signal-to-noise ratio of the code immensely, making it harder to read. Comments with actual useful information will now drown in the sea of drivel.
- Fuck it, I'm not working here anymore.
The main fallacy here is that More Process and More Rules can make bad programmers write good code.