‹ BackHN Continuity

Thread

ImpactGate: A merge gate that scores the structural decay AI adds

37 points · 48 comments · sagenschneider

  1. MichaelNolan · · focus · HN ↗
    Maybe I missed it, but it look like this has just a single metric. Maybe instead of making a new project, you could try to get this metric added to a existing tool like <a href="https:&#x2F;&#x2F;dekobon.github.io&#x2F;big-code-analysis&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;dekobon.github.io&#x2F;big-code-analysis&#x2F;index.html which already has dozens of metrics.
    1. sagenschneider · · focus · HN ↗
      Yes, I&#x27;m doing my own research on AI augmented pipelines <a href="https:&#x2F;&#x2F;blog.officefloor.net" rel="nofollow">https:&#x2F;&#x2F;blog.officefloor.net . I actually found most code quality tools look for bugs and complexity, but nothing much about cohesive erosion. The nice thing about this metric, is that it determine the files where the erosion is occurring. I turned it into a GitHub action to make it easier to access to get wider feedback on the metric. The GitHub action triggers on your merge request and tells you the files where erosion is occurring to refactor. This stops erosion before it gets too expensive to change (big refactors or rewrite). Yes, happy to work with others to get the metric into other tools.
      1. apercu · · focus · HN ↗
        I&#x27;ve never encountered that term before (cohesive erosion) but I like it, if I&#x27;m interpreting it correctly.

        Do you mean like the hyper focus an LLM puts on the task in front of it so you end up with drift (duplicated concepts&#x2F;multiple ways of doing things, terminology drift (e.g., now we have &quot;customer&quot; and &quot;client&quot;). That sort of thing?

        1. sagenschneider · · focus · HN ↗
          When you think about a god class or god method, it occurs over time by adding more than a single responsibility.

          Yes, there are generally complex algorithms but they usually are not things developers write (imported from libraries).

          What is usually going on in the god class&#x2F;method is that things keep getting added to it. These things should be separated out. So the cohesiveness of the class&#x2F;method erodes into doing too many things.

          The idea of the Change Impact formula is to catch this early so you start refactoring to separate out into classes with single cohesive purposes.

          The problem with AI is it handles complexity really well and will happily keep piling changes into god classes&#x2F;methods reaching ridiculous CC levels (have see over 200). Previously developers would get annoyed and do the refactor. But with AI these days, changes are happening faster. So Change Impact is to try to monitor the cohesive erosion.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.