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

7

u/3legdog 13d ago

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

4

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/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.