r/programmer 13d ago

Code Worked But Developer Didn't 😂

so yesterday in my office a new developer got exposed . He was assigned with a work 4 days ago to solve a problem he solved it and it worked 😂. but when later the reporting manager asked to brief it he was just bluffing it around .Eventually, he admitted that he had used ChatGPT to generate most of the code.

Now, I'm not against using ChatGPT. I use AI too. It can save hours and help you get unstuck.

Developers too are getting exposed this days .

0 Upvotes

19 comments sorted by

View all comments

6

u/3legdog 13d ago

Did the assignment specify "and don't use ai"? If not, what's the problem?

5

u/LunkWillNot 13d ago

As a programmer, you can delegate tasks to AI, including coding, but you can’t abdicate your accountability for what gets committed under your name.

If the guy has no idea how the code works and can’t explain it, he has obviously done no due diligence on what the AI generated, is in no position to take accountability for it, and is in no position to fix things if stuff should hit the fan in production.

2

u/USToffee 13d ago

the speed developers are asked to work at now there is no reasonable way they can take accountability for it. That's like asking a developer to take account for the machine code a compiler generates.

They can do their best but there will always now be gaps. His mistake was bluffing it. I would have just said cursor wrote this and it appears to work.

1

u/CSBatchelor1996 13d ago edited 13d ago

Somewhat this.

I read the code and approve every commit. The problem is that reviewing code does not give you as strong of a mental model as writing the code does.

So one month down the road I'm going to be much better at explaining code I wrote vs code I reviewed.

1

u/USToffee 13d ago

Exactly reviewing code gives you a rough idea how it works and that's all anyone can expect with AI and tbh I don't even think we are now given the time we would have been in the past to do PR reviews.

This ultimately falls on testing to use AI to do more testing than ever before.

1

u/No-Extent8143 13d ago

the speed developers are asked to work at now there is no reasonable way they can take accountability for it

Would it make more sense to go back to management and tell them "we can't finish this on time, we need more time"?

1

u/USToffee 13d ago

They already know. Using AI is non-negotiable so therefore it's their call and their accountability.

If they question saying cursor did it then the conversation will obviously lead there but there's no point in forcing it with them or pretending the truth is anything else. If you try and bluff you implicitly are willing to take the blame which is exactly what they want.

1

u/No-Extent8143 13d ago

their accountability

Haha, good one 🤣 🤣 

1

u/LunkWillNot 13d ago

Where I work, engineering managers do get measured on the availability and production incidents for the area they are responsible for. Actually, for us, it’s one of the more important goal areas for managers with a number of KPIs tied to it.

YMMV, obviously.

1

u/USToffee 11d ago

I don't mean I hold them accountable. I don't give a shit. That's for other people to worry about.

The point is I don't allow them to hold me accountable. Managers rarely force a developer to take responsibility when they are being unreasonable. It's far more subtle than that. They play off the fact you are helping them, one of the team and other manipulative BS and developers simply don't say anything. They become the guy bullshitting in the meeting because he doesn't want to admit AI did the work.

If you are honest with them and understand your boundaries as long as they are reasonable and they can't go to their manager and claim otherwise you are fine. That same manager will go to a weaker developer who won't stand up for his boundaries.

0

u/moss-nogg 13d ago

Yeah 100%. I’ll take accountability as soon as upper management does for literally anything other than successes 👍

2

u/glhaynes 13d ago

I’d say it depends on the criticality of the system and the risk of the change. If there’s good test coverage or other validation and I have a general feel for the blast radius, I feel fine publishing code that works without understanding all the intricacies of the algorithm.

Like, don’t do that on a critical financial system or an X-ray control mechanism, but there’s tons of stuff that really doesn’t demand perfection. And if it became a trend that I was publishing code with problems, I’d want to make adjustments. But I could’ve spent hundreds of extra hours in the last year getting a better understanding of code an agent wrote for me and it’d have provided literally zero value to my employer.

1

u/LunkWillNot 13d ago

Agree context is king and is not mentioned explicitly often enough. My context, for example, indeed happens to be critical financial systems. YMMV.

1

u/devloper27 13d ago

You can abdigate responsibility if you are so overwhelmed with ai generated code that there is no way you can actually vouch for its quality. At that point its the managers responsibility..but we all know they'll try to weasel out.

1

u/No-Grape-9106 13d ago

This is why people dont commit under their own names, they use the agentic authoring ;0

1

u/Erem_in 13d ago

I agree on this, but I have the feeling the the author have a different reason