Re:CriticGPT: Finding GPT-4's mistakes with GPT-4
by okdood64 on Thursday June 27, 2024 @02:41PM
(#40813619)
> How is that different from junior devs writing bad code previously?
Because if it's bad, at least it's simple. Meaning simple to review, quickly correct and move on.
Re:CriticGPT: Finding GPT-4's mistakes with GPT-4
by crazygringo on Thursday June 27, 2024 @03:19PM
(#40814027)
Like I said, with "object-oriented mostrosities", it's not like it was always simple before either.
And if you know a solution should be 50 lines and they've given you 500, it's not like you have to read it all -- you can quickly figure out what approach they're using and discuss the approach they should be using instead.
You handle it by teaching them how to write good code.
And if they refuse to learn, then they get bad performance reviews and get let go.
I've had junior devs come in with all sorts of bad habits, from only using single-letter variable names and zero commenting, to thinking global variables should be used for everything, to writing object-oriented monstrosities with seven layers of unnecessary abstractions instead of a simple function.
Bad LLM-generated code? It's just one more category of bad code, and you treat it the same as all the rest. Explain why it's wrong and how to redo it.
Or if you want to fix it at scale, identify the common bad patterns and make avoiding them part of your company's onboarding/orientation/first-week-training for new devs.