Top
Best
New

Posted by rzk 16 hours ago

Ask HN: How to deal with shipping AI-written code you don't understand?

I saw this LinkedIn post from a Meta engineer and it resonated with me:

https://www.linkedin.com/posts/ali-hamie_im-an-engineer-at-m...

> I'm an engineer at Meta and I never felt this uncomfortable doing my job. I'm writing code these days and it all feels like a black box. This new standard of shipping with AI is moving so fast that if we're going to spend our time checking each line of code, it's going to take forever. That means you can end up with systems you've built where you don't truly understand how all the code works. You understand the high level, but not every detail. And maybe this is becoming the new standard. It goes against every instinct of being a software engineer. I'm used to understanding what I'm building. Now I'm trying to figure out how much I need to understand before I'm comfortable moving forward. Are other engineers feeling this too?

How are you handling this?

288 points | 430 commentspage 9
alfiedotwtf 1 hour ago|
If you never LGTM’d when a colleague dropped a hefty PR on your lap, why would you do the same if it were a robot
chromak 6 hours ago||
I love using AI, but any feature it creates I test the hell out of it, i become the QA testers I hated and do all sort of ways to break the app, and after 100 or so hours, I have a bug free and fully working app, now will this app scale as I add more features that to be seen.
adamddev1 6 hours ago|
That is the problem. Because it's not a clearly abstracted and well designed system, it's not robust for adding features and changing things around. When you try to add something or move something around the big fragile ball of tests breaks and you have to spend forever re-piecing things together or burning heaps of tokens for little changes.
YorickPeterse 7 hours ago||
By taking responsibility of it, maybe by saying "Hey this is not a good idea", and if that doesn't work perhaps by switching jobs if that's an option?

The mental gymnastics developers are willing to go through just so they can avoid standing up for something is quite perplexing.

Barrin92 8 hours ago||
>How are you handling this?

easy, don't write code with LLMs. If my job forced me to do so I would quit.

pizzafeelsright 7 hours ago|
I have many questions. This seems shortsighted.
Barrin92 7 hours ago||
Short-sightedness is quite literally the reason people are using these systems to begin with. If you care about the health and integrity of your code base years down the road you wouldn't be shipping endless amounts of slop you don't understand, Fred Brooks taught us this half a century ago.
scooblydoobly 6 hours ago||
But it seems short-sighted to think that "years down the road" will look _anything_ like the present. I can't imagine a future (say, 5 years from now) where we are worried about the code choices we made in the past.
filoeleven 4 hours ago||
That's because you're still getting $8,000/month of compute for $200/month!
sunir 4 hours ago||
I'm building a high level code explorer, like the CASE systems of a long time ago I suppose. I also built a facility called zork that lets me and an agent explore the code system together like a dungeon, taking notes as I go and if you want to take the metaphor too far, 'invoking spells' or rather commands like code references, call flow, data flow, exception flow, profiling, labelling design patterns and validating implementation, etc.

With zork I can also just start typing in a code file and leave instructions for the agent to fill in or fix parts of the code while I'm editing it. So I can lay out what I want the class shape to be and don't have to implement all the annoying little parts. This feels more like the GitHub Copilot days.

I honestly believe more of us will pair program with agents, not just yelling at a chat window.

8note 6 hours ago||
if you have to maintain it, you will still have to get an understanding of it when it breaks.

not understanding the detail is quite similar to a coworker writing the code and another coworker approving and merging the changes.

icedchai 4 hours ago|
If your plan is to have AI maintain it, you really don't. Honestly I hate being forced into this position. I want to understand it.
jdthedisciple 4 hours ago||
At the end of the day it's really about developing a feel for it:

You will know intuitively if it's worth taking a closer look or if u can safely close your eyes and just commit it right away.

I usually know which meta questions are crucial to clarify with colleagues and where to check the code punctually.

ReptileMan 3 hours ago||
Drink and pray.
09127398630 7 hours ago||
An engineer from Meta not knowing what they're doing is exactly how I imagined engineers at Meta. Thank you for confirming it's an actual reality.

On the other hand, not even surprised anymore most people even try to provide serious answers to this. Welcome to the pure insanity.

willio58 6 hours ago|
Flat-out, you _need_ to understand the code you're merging. If you don't, ownership then lands on whatever AI agent you're using. Ultimately, you can't fire the AI agent in the same way you can fire the person at the driver seat when shit hits the fan and they've consistently caused incidents that force people to work late hours to resolve it.
xinu2020 6 hours ago|
I agree with the sentiment but I would add more nuance; you have to pick what is important to understand and what you can delegate; not all code is mission-critical.

In any case at the end you're the owner/accountable so you need to justify your and your agent choices.

More comments...