2 ms·
I'd focus on the distant goal: Getting this coworker to make higher-quality contributions in the future. (Which helps him/her in their career just as much as it
by MalcolmDiggs 11y ago
I'd focus on the distant goal: Getting this coworker to make higher-quality contributions in the future. (Which helps him/her in their career just as much as it helps your project). In that light, I think it's doing them a favor to be honest. Refactoring their code for them (cleaning up their mess) isn't really teaching them much, or setting yourself up for anything but a repeat of these events. In your position, I'd probably reject the pull request and give them a handful of pointers/things-to-work-on.
You don't have to mean about it, just be straightforward and make sure you're only addressing the inadequacies in the code itself, not attacking them as a person. I'd try to convey this message (in your own words): "I appreciate the hard work you've done. That being said, I think you're a very capable programmer, so I'd like to see you push yourself even harder. If you were less-talented I would accept the pull-request, but I'm betting that we can get even higher quality output from you."