3 ms·
tl;dr Don't try to fix the code, try to fix the process that produced the code. This is an opportunity to encourage and teach, berating will produce the opposit
by abannin 11y ago
tl;dr Don't try to fix the code, try to fix the process that produced the code. This is an opportunity to encourage and teach, berating will produce the opposite result.
Telling someone they are stupid is the most effective way to have them not listen to you. I would approach the situation along the lines of this:
1) This is a really good first pass. Thanks! I like how you...
2) Lines x to y seem a little messy, do you think there is a more elegant way of approaching this? (Note: y - x < 20)
2b) Maybe highlight another area for improvement?
3) What happens if the feature requirements change? Can you show me how we would adapt to that? (Response: Oh, I see. Nice. Hmm...I wonder if we treated this in a more abstract way, would it require less maintenance?)
4) I'm really excited to have your enthusiasm (or other personal trait) as part of the team. Let's go get this!
Why I would use that approach:
1) Sandwich method is a classic strategy for giving negative feedback (positive then negative then positive). It minimizes defensive and emotional reactions.
2) Do not attack the person in any way. They will get defensive and angry and insulted. They will not hear "this is how I can improve" but rather "they are out to get me and not to be trusted". Humans need a sense of safety.
3) It's very possible that they are overwhelmed and scared at this new job. Insulting them will not build confidence, but rather destroy it.
4) It's also very possible that they've been trained to write crap as fast as possible, commit, and move on. If this company has a different style, they deserve to know that.
I would also want to know how did such poor architecture get implemented. It might be good to have design reviews, before coding starts, to discuss how everything should function. It sounds like the bad code is partially a result of improper communication with the employee.
Great question!
- rancur 11y ago> It's very possible that they are overwhelmed and scared at this new job. from personal experience, biggest reason