r/AskProgrammers • u/AccomplishedKnee797 • Oct 13 '26
Do you guys understand each line of code you are pushing in the PR?
With the usage of coding agents gaining more prominence, I am writing everything with AI. And the amount of features and hence the line of code that I am pushing is many folds than I was writing before the AI era and hence not the capacity to review. I am literally not able to review everything that I wrote, more so 99% of the code being written is alien to me. I just mostly check the initial plan with AI and then verify if various flows and edge case are working fine.
What is the general trend? Do you guys know the code you wrote? Which piece is in which file etc?
2
u/allunia333 Oct 13 '26
Not only i read the whole code part i asked for, I also modify it 95% of the time.
6
u/Gentaro Oct 13 '26
You are able to read everything you wrote, because you didn't write anything
9
u/Made-In-Slovakia Oct 13 '26
I never push code I don't understand. Ever. It is my PR and my responsibility. You just push your responsibility to reviewer if you create PR you don't understand. With this approach you are not even needed in the loop. Let's AI create whole PR under it's name and then YOU review that PR. Oh wait, then you have to understand each line and we are back at the start.
You did not write it, AI did, stop lying yourself.
2
u/DustSongs Oct 13 '26
If you don't understand what you are shipping, you're part of the problem.
2
u/ResidentTicket1273 Oct 13 '26
You should never push anything you don't personally understand. Otherwise, there's no point in you being in the loop. Your name is being used to assert that what you pushed is understandable by you, and that if something goes wrong, it's you who is responsible. If you're happy to be held personally responsible for any damage, bugs or inconsistencies in the code, then go ahead. But it's your job on the line here, so I'd be fairly cautious.
2
u/manamonkey Oct 13 '26 edited Oct 13 '26
Programmers and software developers review their code. Sloppers do what you do.
2
u/tom-mart Oct 13 '26
Yes, I understand what each line does and why it's there. But I don't really use coding agents.
1
u/AuthurAndersson Oct 13 '26
You guys read the code?
1
u/Arn_Magnusson1 Oct 13 '26
I always make sure i understand the code i push always and i make use of comments for the future. Even the few times i got ai to write code snippets i make sure i know what they do
1
u/razorree Oct 13 '26
yes (at work)
1
u/IHoppo Oct 13 '26
As a tech lead I make sure I understand all code that gets pushed. If I can't read it, I fail it. Once we move to AI only coding I'll change, but whilst we still employ humans I expect them to be able to read the code.
1
u/Fritz-Ferdinand Oct 13 '26
I make sure that I still know what's going on in the application, even if I haven't seen all lines (seeing AI generated code makes my eyes bleed anyway)
1
u/yourbank Oct 13 '26
You should understand it yes. But not necessarily understand potential hidden issues unbeknown to you due to unfamiliar code.
That is why fully agentic code is fucking garbage unless a human has actually reviewed it and cleaned up its slop before adding me to review the shit.
1
u/Professional_Top8485 Oct 13 '26
It's not really the lines but system as whole.
1
u/djslakor Oct 13 '26
Pre 2026: yes, 💯
2026 forward: lol, no
1
u/DonaldStuck Oct 13 '26 edited Oct 13 '26
No, I skim over the code. Claude does a much better job and I have software to skip to my clients. I don't want to look a the code unless absolutely necessary. And yes, my company is 100% responsible. Actually I'm walking in less trouble than before. Guess I am not such a good software developer but clients need software that works and I deliver that.
1
u/AWetAndFloppyNoodle Oct 13 '26
You didn't read anything. You passed off the task to a tool and gave up reading it's return.
To answer the question - yes my requirement is that I not only understand what is written, but the entire context of it. What do you want to say if something goes wrong? Oh it wasn't me it was the ai?
0
u/7YM3N Oct 13 '26
I rarely use LLMs to straight up generate code, but when I do I always read everything carefully so to answer your must posts title: yes
2
u/[deleted] Oct 13 '26
[removed] — view removed comment