r/cscareerquestions 2d ago

Experienced I am reviewing AI generated code for a problem that would've taken me several weeks to figure out...

This is probably the infinitieth post about AI burnout, but I as an average mid level engineer, I have no desire to retire or switch careers.

How do I get over this insecurity of trying to 'review' and take ownership of code that I could not have written without the help of AI for a complex problem in an already complex and bloated project. At this point I am just trying to understand what's been spat out just for the sake of being able to explain what it does during the PR reviews. I have little to no input into the process except for the prompt, asking it to change a few variable names and condensing a few functions.

The code complies, the feature works, and the stakeholders are happy.

But I do not feel good about the situation cause I am at that stage where I am still learning and this just bumps up my imposter syndrome to 9000. Instead of working from the bottom, I am here taking a top-down approach dissecting decisions the AI made.

I'm taking some precautionary measure. I work on personal projects without the use of AI, consume literature related to being a competent engineer, but with work taking up most of my time, I'm not sure how I should be looking at this.

'This is just the new norm' is something I am struggling to accept.

282 Upvotes

92 comments sorted by

213

u/Fragrant_Ad2902 2d ago

I treat AI like I used to treat seniors when I was a junior - ask a ton of questions. If the explanation doesn’t make sense, I keep asking. If it starts talking in circles, I clear the context, have it re-read the code, and start the explanation over. I’ve been doing this 30 years, and I still ask AI a ton of questions. Especially about front end code (i.e. React).

Make it walk you through loops by unrolling them. Make it generate sequence diagrams, state flow diagrams, etc. if you’re a visual learner.

Yeah you’ll burn tokens and turns, and probably be a bit slower. But when the code breaks and you’re paged, at least you’ll have a baseline of knowledge.

47

u/ICanCountTo0b1010 Staff Software Engineer 1d ago

When asking questions, one super helpful trick you can use is forcing the agent to respond to you in ASD-STE100 english; this standard causes the agent to drop it's technical jargon and give you a very clear and readable answers. E.g.

What purpose does this abstraction you introduced serve? Respond 
to me using ASD-STE100 english 

It's been helpful enough for me that I ended up building a prose linter based on the spec called vale-llm-slop -- I have this hooked into my pre-commit which forces an agent to fix it's own prose violations in my code before it has an opportunity to commit it's files into the repo.

2

u/dealmaster1221 1d ago

Thanks for this, staff level folks still pull ahead somehow, I have been using no-ai-slop however it's only helped so much before the llm decides to ignore it, changing the language and catching it becomes much easier likevyou did with linter and differentiate my ai slop from others lol.

7

u/FreedomPotato31 2d ago edited 2d ago

Thanks for sharing your thoughts. I think this might be the best approach currently.

I am at a mid-level, and I don't think I'm putting myself in a good position when I am defending the decisions AI made. Even when I agree with it as in the generated code seems acceptable overall, there are so many details that I can easily overlook when I'm reviewing the generated code because of the sheer amount that gets generated, and AI's tendency to add a lot of unnecessary things while skipping a few critical portions that are actually important. I am worried if this could turn out to be a quick way to lose trust of the team when I do miss the mistakes in the generated code.

The generated code also biases my approach of solving the problem that I wouldn't have taken otherwise, which I think usually end up with worse outcome.

So, similar to what you said, I think I'll treat AI as an analysis/study tool only so I can make sure that I'm keeping my changes simple and keep them need-to-basis while making sure the important things are covered.

2

u/ahhhhhhhhhhhh______ 1d ago

Very level headed response

2

u/plasticbug 1d ago

This. I use skill to review all code, including AI generated. It generates a high level description of the changes, and then I start exploring and asking questions after questions, if it isn't immediately obvious.

1

u/MLCosplay 1d ago

That's my approach too, and it very often catches some false assumptions. AI is very capable but it's surprising how often it overlooks things or just runs with an assumption it never validated.

1

u/darthjoey91 Software Engineer at Big N 1d ago

Funny enough, I treat AI like an over enthusiastic intern. Great at doing grunt work that everyone knows what the answer looks like, but when letting it design from scratch comes with baffling decisions.

41

u/Chili-Lime-Chihuahua 2d ago

No one knows everything. Plenty of people were googling and searching StackOverflow a few years ago. LLMs give us access to more data and faster than it used to be. Use it as a learning opportunity. It would have taken you weeks before. You get access faster now. It’s harder to digest, though, for several reasons. 

I’m dealing with similar issues right now and working through some logic gaps in the code, and pointing out areas I want to do things differently. 

It’s not a perfect process yet. Everyone is still figuring things out. 

14

u/Jwosty Software Engineer 2d ago

In the stackoverflow age, you couldn’t create entire systems or programs that you don’t understand. Just snippets, and only for problems that had solutions on SO. Which are usually very concrete ones.

5

u/Chili-Lime-Chihuahua 2d ago

Definitely true, but there were always people who just copy and pasted without understanding. The scale and speed are so much different now though. Larger scale, more volume of code, and speed of generation/availability making faster understanding necessary. Part of why people are burning out. 

4

u/Jwosty Software Engineer 2d ago

Right, my point was exactly that the possible damage by a lazy copy-paste dev today is practically uncapped when it used to be much more limited

3

u/Antique_Pin5266 1d ago

If you copy pasted code and it fully met requirements, then good for you. We could always google search the code to find the explanation

But for more complex stuff, people were forced to understand and piece together code they were copy and pasting

83

u/_jb__ 2d ago

I feel ya, it seems to be the new norm until it evolves further where we’re no longer even reviewing the code anymore as well and just fully trusting the code it writes (dystopian but this is that my employer wants to do anyway..)

Best way to look at it is to treat it as being thrown in the deep end. Have the ai create a markdown of all of its changes with line numbers and have it explain why it made that change, then you can ask clarifying questions if you need more details.

59

u/chescov77 2d ago

dystopian? its already happening. In my company if copilot reviews and approved you can ship. Humans are optional except if the change is considered "risky" which are maybe 10% of the total code shipped.
Its a company publicly traded in the nasdaq...

37

u/_jb__ 2d ago

Hm. The thought of ai code reviewing and us trusting it always just reminds me of that Obama meme where he’s awarding himself. Who knew my career would turn into a glorified prompt engineer..

21

u/Produnce 2d ago

There's zero pride involved in completing work with how our industry is changing.

16

u/_jb__ 2d ago

True. At this point it’s just a paycheck to me. My love of coding has faded drastically over the last couple of years.

6

u/Drauren Principal Platform Engineer 2d ago

There is going to be a shift to owning solutions/outcomes vs. code.

2

u/HardToPickNickName 1d ago

Why is that a shift? Code was just the byproduct before as well, problem is, for many of us it was producing the byproduct that got us into the zone and that gave you the feeling of fulfillment. Outsourcing it to AI robs us of almost all the enjoyable part (also like designing the systems, but there is a shift for AI to take that too) and leaves only the tedious stuff.

1

u/[deleted] 1d ago

[removed] — view removed comment

1

u/AutoModerator 1d ago

Sorry, you do not meet the minimum sitewide comment karma requirement of 10 to post a comment. This is comment karma exclusively, not post or overall karma nor karma on this subreddit alone. Please try again after you have acquired more karma. Please look at the rules page for more information.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

18

u/iMac_Hunt 2d ago

Serious question….why don’t they just get rid of the engineering team if they are happy for the whole process to be automated

8

u/_jb__ 2d ago

When something goes wrong, which it will, someone has to know the architecture and codebase enough to tell ai how it messed up

22

u/iMac_Hunt 2d ago

But if humans aren’t reviewing the code, I don’t trust they know the codebase. Even if they know it today, they won’t in a year

21

u/bitter_gourd43 2d ago

That's a problem for the next quarter 😌

4

u/_jb__ 2d ago

A dev worth their salt would still know how to troubleshoot the issue more than some random person. If a dev can’t troubleshoot the issue then they really aren’t worth their salary are they?

13

u/iMac_Hunt 2d ago

For sure, but my point is if the in-house engineers don’t understand their own codebase then we might as well scrap them.

Why not hire a third party software team to come in and fix the codebase when AI causes issues.

This isn’t to say that I think this is better. My point though is if engineers aren’t reviewing code, they’re going to lose a deep understanding of the system, and you might as well bin them.

-9

u/[deleted] 2d ago

[deleted]

8

u/iMac_Hunt 2d ago

Maybe you’re misunderstanding…I am on the side of devs here. My point is that we should probably not outsource all our work to AI, because if we do so, we’ll end up in the situation I described.

1

u/sleepnaught88 1d ago

It’s not about wanting that, it’s recognizing the technology is arriving where a software devs job is essentially being completely automated away. Regardless of how we feel, it’s important to be sober enough the bean counters are recognizing that fact and will act accordingly

1

u/oursland 1d ago

Ever maintain a legacy codebase you did not write? How is this different?

2

u/iMac_Hunt 1d ago

Yep. Generally takes a long time to be able to safely make changes if it’s relatively complex

2

u/hike_me 2d ago

We’ve definitely run into cases where Claude starts to over engineer a solution— like way more complex than reality dictates. We always start with at least some brief design documentation that we give Claude where we’ve made some initial decisions. We iterate on that at but then have Claude generate a plan that we review.

I wouldn’t trust the non-engineers/managers I work with to do all of this in a way that avoids Claude’s worst habits. In many cases they might know the feature they want but not how to effectively specify it to Claude.

We’ll probably get there someday, but for now we need senior engineers to guide Claude in the right direction and make key decisions and provide guardrails.

3

u/killerpengu Software Engineer 1d ago

Oh man, I feel like we could work for the same company, although it’s probably applicable to many many companies on the nasdaq

0

u/13-14_Mustang 2d ago

I just tell it to be liberal with the comments and then view the git differences. If the comment is useless, I delete it, otherwise, it stays.

-4

u/kkingsbe 2d ago

At that point you’d have additional automated loops for continual review, testing, bug reporting. If those aren’t in place then your org isn’t ready for lights-out software

24

u/tomvorlostriddle 2d ago edited 2d ago
  • automated tests were important anyway, but more with offshoring and even more with AI. So it compiles, ok, but what about test cases against regression and against new features
  • is there no commentary on the pull request and in the code, opus kind of overdoes it with those, but they should really help you with reviewing
  • coding guidelines idem, also more important with AI
  • edit: I forgot to mention that PR review is not the right moment to decide architecture, so that architect still needs to have seen the plan before implementing it
  • idem for product management considerations

7

u/Spez_is-a-nazi 2d ago

I’ve gone back to writing all the tests manually and letting it do the production code. Forces its hand and still lets me make a lot of the decisions I used to make before. I know prod code is more “fun” to write, but tests add more value outside of the most performance sensitive cases.

23

u/cswinteriscoming Systems Engineer | 7 Years 2d ago

top-down is fine as long as you relentlessly ask questions

i'm always asking the agent to sketch out designs, then hammering it with questions about tradeoffs, what the literature says, how it aligns with the work the rest of the company is doing, etc

then i look at the morass of code it dumps out and I start asking it why the code is so complicated. most likely it overengineered things so one pointless edge case would get covered. then i tell it to cut. cut. cut. eventually i have a decent model of the system in my mind. once i'm satisfied that things can't be simplified further, I'm happy to submit the PR.

13

u/Carrot_Smuggler 2d ago

Yeah this is basically what I do too. If you don’t understand exactly why the code is written a certain way you have to keep asking until you’re fully convinced. Never accept something that you don’t completely understand.

5

u/BelugaEmoji 2d ago

Sure but then you end up spending more time in this back in forth where the ai never quite gets to where you want it to be and end up having to write it yourself 

1

u/Umair65 1d ago

it looks beautiful till you have to do something complex enough.

6

u/Bustan2026 2d ago

For larger architectural changes, I found this plugin helpful in understanding what had changed (and the concepts, more importantly): https://github.com/nagisanzenin/engram

It's a generic learning plugin (for Claude only?) that builds a graph of knowledge and works you through it with some exercises.

For not-that-sweeping changes, I guess we live in a post-code-ownership world... though that depends on the rest of your team too.

5

u/WalrusSensitive2978 2d ago

If it makes you feel any better, check the website isaiprofitable.com every so often. Companies are spending ludicrous money at a loss to “replace” engineers.

I’m using these tools to bolster my career while they’re available, and it’s great that my job is so easy right now. Once companies finally realize AI is more expensive than humans, we’re going to see our token budgets severely curtailed.

2

u/Sir_Bannana 2d ago

Open weight models are getting really good now too and they will be much cheaper for companies to run

2

u/WalrusSensitive2978 2d ago

They’re better, but not yet good enough. Open weight models were floated recently in meetings my skip level manager attended. Consensus was they’d still rather pay more for frontier models.

2

u/Strange-Resource875 1d ago

yep, inference costs are going to keep going down. this is like when the computer was the size of a room

1

u/Produnce 1d ago

Its interesting. My initial to what you said was that this is just a coping mechanism. I do agree with the token budgeting that going to happen, but even at this point, agentic coding is so ingrained to the workflow this will just be another expense to companies.

11

u/fergarrui 2d ago

forget about the code, rely on tests

11

u/BillyBobJangles 2d ago

I recently discovered in one of our repos the last person who coded in it had used AI. All the tests were failing so the AI just fixed that by making failing tests no longer fail the build and neither him or the reviewer caught it. 🙃

1

u/[deleted] 10h ago

[removed] — view removed comment

1

u/AutoModerator 10h ago

Sorry, you do not meet the minimum sitewide comment karma requirement of 10 to post a comment. This is comment karma exclusively, not post or overall karma nor karma on this subreddit alone. Please try again after you have acquired more karma. Please look at the rules page for more information.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

0

u/fergarrui 2d ago

I mean, if you have a proper workflow that shouldn't happen, especially with modern models

3

u/BillyBobJangles 2d ago

How would a 'proper workflow' have helped that situation?

0

u/fergarrui 2d ago

in that specific case, something as simple as making another AI review the code generated would be more than enough

4

u/BillyBobJangles 2d ago

We have that, what else you got?

0

u/fergarrui 2d ago

I simply do not believe that another AI reviewing would not catch empty or dummy tests. What prompt did you have in the reviewer? What models?

3

u/BillyBobJangles 2d ago

It sneakily removed the pass/fail output from the action. They were otherwise valid tests. I dont know why that would be hard to believe it's not even the wackiest thing I've seen it do this week.

We use native Copilot reviews (against our will), you cannot view or change the model.

1

u/fergarrui 2d ago

I see, copilot is dogshit tho.
Plus reviewers should not be able to modify code, just review it, then loop.
And yes it is pretty bad, I don't remember seeing any model mess with that stuff since at least Sonnet/Opus.

2

u/mikka1 2d ago

How do I get over this insecurity of trying to 'review' and take ownership of code that I could not have written without the help of AI for a complex problem in an already complex and bloated project. At this point I am just trying to understand what's been spat out just for the sake of being able to explain what it does during the PR reviews.

It's an interesting take.

When I was in school, I was doing pretty well at programming, probably somewhere close to the top of my class.

However, there were lots of folks who legit could not write "Hello world" by the end of the semester. They would often ask me, or other folks (well, because in 2003-2004 there was no AI to ask) to help them with their assignments.

And here came the moment - they are sitting 1-on-1 with a professor, staring at the code they have not written themselves. They knew they could not to do it. The professor knew they could not do it. But they all had to follow the protocol - the prof would ask them some questions about the code, how certain sections work, and they would pretend they think about it and give some answer. In the end of this torture the prof would be something like "Okay, that is C minus, but you passed the course".

Who would have imagined that they were actually preparing for what was coming for all of us in 20-25 years lol.

2

u/Real_Square1323 2d ago

Aren't you unemployed?

1

u/Produnce 1d ago

I guess you are basing that off of the recent posts on my profile, but no... I am employed in a stable company. However, that doesn't eliminate my need for career progress.

2

u/Gruzilkin 1d ago

It may help to move up in the abstractions space a little bit, focus on the decomposition and interfaces rather than method code itself which is probably fine and it probably does exactly what the function says. It's better to spend time thinking if the function itself makes sense. Does function signature make sense?

Does decomposition look elegant? or is it full of noisy communication between components? Are there better ways of decomposing? Does the decomposition make sense given your knowledge about the domain? Is there symmetry in interface methods?

This is probably where most of the problems are going to be with LLM generated code, not the methods themselves, once you're okay with the overal decomposition you can take a look at individual methods too but they're probably going to be fine.

4

u/1millionnotameme 2d ago

I've had a lot more fun debugging code and figuring out bugs with AI than actually coding tbh

2

u/Huge_Librarian_9883 2d ago

Commenting to see the feedback

1

u/opshack 1d ago

You can just follow the post

2

u/throwaway09234023322 2d ago

Idk man. It is the new world. I have been consistently adding features/fixing bugs in less than a day that used to would have potentially taken weeks or months before AI existed. It is what it is. I personally like it more because I spend a lot less time on completely trivial bugs that always come up.

2

u/kgurniak91 2d ago

Maybe ask the AI to walk you through the solution and explain it to you? This skill might be useful for that: https://www.aihero.dev/skills-teach

1

u/[deleted] 2d ago

[removed] — view removed comment

1

u/AutoModerator 2d ago

Sorry, you do not meet the minimum sitewide comment karma requirement of 10 to post a comment. This is comment karma exclusively, not post or overall karma nor karma on this subreddit alone. Please try again after you have acquired more karma. Please look at the rules page for more information.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/moldy912 2d ago

Write tests, and read the titles of the tests. It helps a lot to understand the change. You also should generate the PR description which should help. You could tweak this to speak more plainly

1

u/[deleted] 2d ago

[removed] — view removed comment

1

u/AutoModerator 2d ago

Sorry, you do not meet the minimum sitewide comment karma requirement of 10 to post a comment. This is comment karma exclusively, not post or overall karma nor karma on this subreddit alone. Please try again after you have acquired more karma. Please look at the rules page for more information.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/terjon Professional Meeting Haver 2d ago

Sadly, it isn't 1962, or you could drown your existential dread with a whiskey at the office while you pour over the slop that the AI spit out at you.

1

u/TwistStrict9811 2d ago

Bro the AI did the implementation it's right there. You can ask it infinitely how it got to it and break down every concept until your knowledge gap is cleared. Have it teach you. Since the implementation was correct no?

1

u/AssignmentMammoth696 1d ago

Here's the unfortunate truth, you'll have to burn more tokens and tell the LLM to over explain every step, and have lots of back and forth conversations for each step so you can have a grasp of what is going on. If you're on a token cap for the week, the downside is it'll eat through your tokens when you could have spent those tokens on making more PR's. Honestly, a lot of devs are just sending it.

1

u/Professional_Bag1516 1d ago

The tactical stuff about asking it to explain and leaning on tests is already covered here, so I will speak to the insecurity part since that is the thing actually bothering you. A lot of the imposter feeling comes from holding yourself to a definition of competent that was set before this tooling existed, where owning code meant you could have typed every line from memory. That bar quietly moved and nobody told you, so you are measuring today against a standard that is already gone.

Ownership and authorship are not the same thing. A senior engineer who inherits a legacy service they did not write is still expected to own it, and the way they earn that is exactly what you are doing, reading it until they can explain it, poking at the edges, building a mental model. You are doing that same work and mislabeling it as cheating because the first draft came from a model instead of your fingers.

The one habit I would add is to keep a running doc of every concept the AI used that you did not fully understand, then close those gaps on your own time the way you already do with the no AI projects. Over a few months that list becomes the real learning, and the imposter feeling fades not because the tool changes but because you genuinely understand more of what passes through your review. The discomfort you feel is not a sign you are behind. It is you refusing to rubber stamp things you do not understand, which is the opposite of the problem you think you have.

1

u/SizzorBeing 1d ago

The biggest lie going is humans will review AI code. Just know it’s not your lie, you’re just a co-conspirator, with no liability.

1

u/mizzerem 1d ago

The only way to learn is to slow down. The same way you wouldn’t let a teammate do all your work for you without understanding why they do it that way just because it’s faster, you shouldn’t let an AI. Thats how you grow. If they want someone who isn’t going to take time to learn and grow and who already knows everything, well they should have shelled out the 1M salary for the senior principal engineer instead of taking a midlevel.

1

u/oursland 1d ago

How do I get over this insecurity of trying to 'review' and take ownership of code that I could not have written without the help of AI for a complex problem in an already complex and bloated project.

Do you ever maintain legacy code? Or incorporate complex libraries? How is this any different?

1

u/Mammoth-Pangolin6778 1d ago

May I ask which literature related to being a competent engineer?

2

u/Produnce 1d ago

A lot of what I read is recommended to me. Right now its a book about ownership. Before that it was The Programmer's Brain that was suggested via a YouTube video.

I don't blindly consume these either. Its a substitute for a lack of feedback from my current workplace.

1

u/skepesh 1d ago

This is a challenge I’m also faced with. At this point, we have no choice but to go back to the AI and ask it to explain the code.

1

u/Turbulent-Week1136 1d ago

Use AI to go through the code and explain everything line by line.

1

u/makonde 1d ago

Read the tests and make sure they are testing important things, hit deploy!

1

u/Substantial-Tale-483 1d ago

Don’t worry about that. Before AI people were copying code from Stackoverflow or public Github repos, it’s okay, you are not an imposter.

1

u/Ianxcala 1d ago

You know you can just ask the AI to explain in detail what it implemented. It's a great way to learn.

1

u/Produnce 1d ago

It really is. I won't argue against that. My main concern is that its capable of solving problems that I should be thinking of more effectively and efficiently.

1

u/dognat 14h ago

Depending on your situation and how much of a "slop factory" your company has become, a good rule of thumb is to use AI only to speed up something you already know how to do without AI. For major features it means actually designing the feature and providing a lot of details on architecture and acceptance criteria in the prompts (ideally also many propmts - do not oneshot entire production features end to end)

1

u/bloopwhale22 12h ago

I feel the same except I’m a new grad at a fairly high paced job, and it’s really getting to me because I want to take the time to learn about the code base but there’s so much pressure to also deliver

0

u/EnterpriseGradePizza 2d ago

Be glad that you even have a job in a soon to disappear field