Re:Code quality: a concern for businesses, bottom lines, and...
by nradov on Wednesday October 20, 2021 @11:38PM
(#28939921)
The tools will catch issues like excessively long methods or use of "magic numbers" instead of named constants. Most programmers would agree that those are maintainability issues, although I don't know if it's ever been proven. You can disable any rules you don't want.
[ Parent
| on HN ]
Re:Code quality: a concern for businesses, bottom lines, and...
by goto11 on Thursday October 21, 2021 @05:03AM
(#28942063)
Yeah but such rules are still just unfounded opinions which have been codified and human judgement have been removed. What is an "excessively long" method, for example? If a method conforms to good design principles like separation of concerns and low coupling high cohesion, no particular length is too long. If a tool force you to split a cohesive method into multiple methods, then you have increased accidental complexity. So the tool will tell you you have improved some arbitrary "code quality" metric, but actually you have decreased maintainability.