3 ms·
How is that different from junior devs writing bad code previously? The more things change, the more things stay the same. You handle it by teaching them how t
by crazygringo 2y ago
How is that different from junior devs writing bad code previously? The more things change, the more things stay the same.
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.
- okdood64 2y ago> 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.
- crazygringo 2y agoLike 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.
- phatfish 2y agoMaybe fight fire with fire. Feed the ChatGPT PR to ChatGPT and ask it to do a review, paste that as the comment. It will even do the markdown for you!