←back to thread

258 points signa11 | 10 comments | | HN request time: 0.831s | source | bottom
Show context
kirubakaran ◴[] No.42732804[source]
> A major project will discover that it has merged a lot of AI-generated code

My friend works at a well-known tech company in San Francisco. He was reviewing his junior team member's pull request. When asked what a chunk of code did, the team member matter-of-factly replied "I don't know, chatgpt wrote that"

replies(16): >>42733064 #>>42733126 #>>42733357 #>>42733510 #>>42733737 #>>42733790 #>>42734461 #>>42734543 #>>42735030 #>>42735130 #>>42735456 #>>42735525 #>>42735773 #>>42736703 #>>42736792 #>>42737483 #
1. deadbabe ◴[] No.42733126[source]
I hope that junior engineer was reprimanded or even put on a PIP instead of just having the reviewer say lgtm and approve the request.
replies(2): >>42733168 #>>42733515 #
2. WaxProlix ◴[] No.42733168[source]
Probably depends a lot on the team culture. Depending on what part of the product lifecycle you're on (proving a concept, rushing to market, scaling for the next million TPS, moving into new verticals,...) and where the team currently is, it makes a lot of sense to generate more of the codebase by AI. Write some decent tests, commit, move on.

I wish my reports would use more AI tools for parts of our codebase that don't need a high bar of scrutiny, boilerplate at enterprise scale is a major source of friction and - tbh - burnout.

replies(3): >>42733431 #>>42733542 #>>42736479 #
3. bradly ◴[] No.42733431[source]
Yes and the team could be missing structures to support junior engineers. What made them not ask for help or pairing is really important to dig in to and I would expect a senior manager to understand this and be introspective on what environment they have created where this human made this choice.
replies(1): >>42733843 #
4. XorNot ◴[] No.42733515[source]
I mean if that was an answer I got given by a junior during a code review the next email I'd be sending would be to my team lead about it.
5. not2b ◴[] No.42733542[source]
Unless the plan is to quickly produce a prototype that will be mostly thrown away, any code that gets into the product is going to generate far more work maintaining it over the lifetime of a product than the cost to code it in the first place.

As a reviewer I'd push back, and say that I'll only be able to approve the review when the junior programmer can explain what it does and why it's correct. I wouldn't reject it solely because chatgpt made it, but if the checkin causes breakage it normally gets assigned back to the person who checked it in, and if that person has no clue we have a problem.

replies(2): >>42735128 #>>42737983 #
6. ◴[] No.42733843{3}[source]
7. KronisLV ◴[] No.42735128{3}[source]
> I wouldn't reject it solely because chatgpt made it, but if the checkin causes breakage it normally gets assigned back to the person who checked it in, and if that person has no clue we have a problem.

That's a fair point, but regardless of who wrote the code (or what tools were used) it should also probably be as clear as possible to everyone who reads it, because chances are that at some point that person will be elsewhere and some other person will have to take over.

replies(1): >>42741841 #
8. GeoAtreides ◴[] No.42736479[source]
> Write some decent tests, commit, move on.

Move on to what?! Where does a junior programmer who doesn't understand what the code does moves on to?

9. solatic ◴[] No.42737983{3}[source]
Not being willing to throw out bad/unused features is a different trap that organizations fall into. The amount of work that goes into, shall we say fortifying the foundations of a particular feature, ideally should be proportional to how much revenue that feature is responsible for. Test code also has to be maintained, and increasing the maintenance burden on something that has its own maintenance burden when customers don't even like it is shortsighted at the very least.
10. not2b ◴[] No.42741841{4}[source]
True, but you're talking about the difference between "only one person understands this, that's a risk!" and "zero people understand this".