Ask HN: How to deal with shipping AI-written code you don't understand?
630 pointshttps://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?
Comments (767) 238 threads
Show all comments
Showing thread 19 of 238
Picking battles: I lean heavily on AI for the mindless, boilerplate changes that used to take 2-4 hours; but instead AI can do it in 2-4 minutes. Then, I pay closer attention to performance critical areas, or areas that require deeper thinking. Finally, I lean on AI to review the changes. It gives me a better review than a human, and often thinks through things that require "superhuman" intelligence.
Refactoring after the fact: This is similar to working with a team of subordinates or lower-cost contractors. They (people or AI) write the first version, get it working, and then I pick the few areas that need cleanup. I work closely with AI to refactor it to be more readable; possibly to handle corner cases that weren't anticipated earlier in the design.
I'm also not afraid to make changes by hand when needed: The fact is that sometimes, changes are so minor or otherwise require a particular understanding that it's easier to do the change by hand instead of describing it to an AI. I hope where you work understands this and supports it.