4 ms·
What I don't like, is when companies adopt a policy that is checked for before code check in, such as in Java where there are many tools to perform the auto ana
by laythea 8y ago
What I don't like, is when companies adopt a policy that is checked for before code check in, such as in Java where there are many tools to perform the auto analysis of code.
When one of these rules is "thou shall comment all declarations", it results in the developers polluting the code base with verbose drivel, to avoid the review-loop.
- aiisjustanif 8y agoMeanwhile I dislike the opposite at my company where all comments are banned.
- fiddlerwoaroof 8y agoOne of the reasons for this sort of policy often is that IDEs for untyped languages parse special comments for type information so they can provide autocomplete. (E.g. I’ve worked on PHP codebases where javadoc-style comments were required)
- laythea 8y agoThat sounds horrible. I hate code filled with that £(£U*$U&%", autocomplete or not :)
- userbinator 8y agoIt's the same with C#, and that naturally gives birth to tools like GhostDoc, which will automatically generate comments to satisfy those idiotic checks, even if the comments are completely useless to actual humans. (IMHO any comment that can be automatically generated has no value.) Thus the proliferation of comments like this: // FooBar - Foos the Bar // @param baz The baz. // @param quux The quux.
- goostavos 8y agoWe have comments in our code base enumerating the arguments due to this very reason. "Foo is the second argument and should be a string Bar is the second..." It blew my mind the first time I encountered it. A group of adults who just... gave up to the process.