<story><title>Maintaining code quality when nobody cares</title><url>https://mkdev.me/en/posts/5-recommendations-on-how-to-maintain-the-code-quality-and-keep-your-self-development-when-nobody-cares</url></story><parent_chain><item><author>crdoconnor</author><text>IME linting picks up about 99% fluff (ooh look there&amp;#x27;s some whitespace on a blank line) and 1% potential issues highlighted (usually minor).&lt;p&gt;The reason people like to default to linting when &amp;quot;fixing code quality issues&amp;quot; is purely because it&amp;#x27;s 100% objective and measurable, not because it picks up the truly important issues. It doesn&amp;#x27;t.&lt;p&gt;Edit: I am aware that coders have OCD impulses which can be sated with a linter, but priority #1 when fixing spaghetti code is &lt;i&gt;unraveling the spaghetti&lt;/i&gt;, not sating your need to see }s in a place that makes you feel better.</text></item><item><author>dep_b</author><text>You need to get the programmers together and agree on a coding guideline, a linter and other architectural fundamentals.&lt;p&gt;Then the gardening phase begins, which means no refactoring or warning or style fixes unless you touch the code to do something meaningful like a feature or bug fix. Leave everything you touch better than before. Dissolve big classes and functions into smaller ones. Write a test or two for the smaller side effect free function you just created.&lt;p&gt;It takes a ton of time and patience but every week the kraken loses a tentacle. And once most code feels untangled you can embark on a refactor since all of the parts are movable now.</text></item></parent_chain><comment><author>simonpantzare</author><text>I&amp;#x27;d argue that there&amp;#x27;s a significant mental overhead reading code when it doesn&amp;#x27;t follow the same conventions, and that enforcing a style guide is a matter of having no broken windows. But of course there&amp;#x27;s no point trying to make shit look good.</text></comment>
<story><title>Maintaining code quality when nobody cares</title><url>https://mkdev.me/en/posts/5-recommendations-on-how-to-maintain-the-code-quality-and-keep-your-self-development-when-nobody-cares</url></story><parent_chain><item><author>crdoconnor</author><text>IME linting picks up about 99% fluff (ooh look there&amp;#x27;s some whitespace on a blank line) and 1% potential issues highlighted (usually minor).&lt;p&gt;The reason people like to default to linting when &amp;quot;fixing code quality issues&amp;quot; is purely because it&amp;#x27;s 100% objective and measurable, not because it picks up the truly important issues. It doesn&amp;#x27;t.&lt;p&gt;Edit: I am aware that coders have OCD impulses which can be sated with a linter, but priority #1 when fixing spaghetti code is &lt;i&gt;unraveling the spaghetti&lt;/i&gt;, not sating your need to see }s in a place that makes you feel better.</text></item><item><author>dep_b</author><text>You need to get the programmers together and agree on a coding guideline, a linter and other architectural fundamentals.&lt;p&gt;Then the gardening phase begins, which means no refactoring or warning or style fixes unless you touch the code to do something meaningful like a feature or bug fix. Leave everything you touch better than before. Dissolve big classes and functions into smaller ones. Write a test or two for the smaller side effect free function you just created.&lt;p&gt;It takes a ton of time and patience but every week the kraken loses a tentacle. And once most code feels untangled you can embark on a refactor since all of the parts are movable now.</text></item></parent_chain><comment><author>lloeki</author><text>We did that (rubocop). Lots of fluff, a dozen or three minor to medium issues, and a couple of downright critical ones that slipped through production cracks out of sheer luck. Not even counting the last ones, the holistic effect of having a code base normalized is unmeasurable (i.e == through the roof), because suddenly moving from one part of the code to another is consistent enough that it removes a mental barrier to seeing patterns and enabling refactoring.</text></comment>