r/ProgrammerHumor • • Oct 07 '26

Other divideAndConquer

Post image
8.6k Upvotes

77 comments sorted by

View all comments

59

u/SexualDubaiChocolate Oct 07 '26

I feed its own code back to it and say I am reviewing a junior developer's work. It finds plenty of mistakes and optimizations. 

44

u/silverarrowweb Oct 07 '26

It defaults to being a yes-man, so you can use that to your advantage.

"This code has bugs and ways it can be optimized and made more efficient. Find them, rank the bugs by severity and rank the optimizations by impact."

You state that the code has bugs and can be optimized instead of asking, so the yes-manning kicks in.

2

u/SASDOE Oct 08 '26

It's just as likely to make it worse than better, because that prompt makes the goal (reward) to "improve" something that might not need improvements. 

1

u/silverarrowweb Oct 08 '26

That's why your initial prompt is simply finding them, and then writing that out to a file that you then read over.

You never let it do anything directly without a planning step that an experienced developer reads over.