Unofficial Hacker News companion — get notified on comment replies, and more.

The importance of understanding what is going on (opens external site)

558 points by notfried 4 days ago | blog.jsbarretto.com | 422 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (6)

  1. In my experience this is only true on a local level. Going down to individual lines of code, AI-written code looks fine and understandable.

    But on a global level, the systems created by months of prompting with many more PRs per day than ever before, slowly turn into a convoluted coupled and oftentimes near impossible to understand mess. This mess can easily be repaired if it happens in a private project without a production system and clients that rely on your software. But in the real world it often slows us down so much that we are progressing less than in pre-AI times. At least to me it’s shocking to see that only few months of turning off your brain lead to this.

    Future engineers working on those projects will have no chance at all to ever understand what is happening. They can only prompt and pray.

    Replies (2)
    1.     > slowly turn into a convoluted coupled and oftentimes near impossible to understand mess
      
      Yeah, this was already normal for many enterprise CRUD apps before LLMs. What is different now? I have worked on many enterprise CRUD apps where large portions of them were not understood by most devs on the team. I think this partly explains why there is such a push every X years to rewrite big enterprise CRUD apps in the latest tech.
      Replies (2)
      1. But it shouldn’t be normal and offloading your thinking speeds up this process so much that it becomes very difficult to counteract.

        I actually think that rewrites and refactors are a good sign as you are improving your software based on past experiences. But with code you never looked at, how do you improve it except for promoting: “make it better”? You lack the knowledge of what to improve and often don’t even have the necessary vocabulary to tell the agent what it should do. Then we are back to praying and trusting that there is some improvement being made (which I doubt).

      2. The difference now is that hundreds or thousands of lines of bad code is generated in minutes, and that's just in one PR. Every day your system gets worse. Before long only an AI will be able to maintain it.
        Replies (1)
        1. Already the case at our company. There is no way that a human would ever untangle this mess without AI support. It would take weeks to months.
    2. Uh, this is scary.

      The only thing I can imagine to mitigate this is if a senior engineer who wants to prevent the degradation invents some counterbalance system - most likely also with the help of AI - which keeps "grooming" the codebase so that it has a chance to get back into a healthy shape.

      I am thinking of something like an agent skill - integrated into CI - which calls out places where it sees this form of degradation. While creating/updating the skill, the engineer is forced to understand what the unwanted rot/degradation looks like. Intelligence can be gathered into the skill to identify it. Then at least the rot becomes visible and there is a metric which can be optimized.

      Of course, this needs mgmt which understands the necessity of this grooming process. If such mgmt does not exist, that's truly a dire situation.