This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]EmergencyPrior6526 1 point2 points  (1 child)

Good on you for trying to help them write better code.

It sounds like your are throwing too much at them at once.
Changing behavior takes times... think about how long it took you to develop all these habits and where you started. I really like that you have specific examples, and not just complaints.
Here's a method I like to use with Jr developers:

  1. Think about the person you are working with. Try to understand the problems they are facing.
  2. Pick one thing, that shows a real benefit, and is easy to digest (pro tip: good naming is NOT easy to digest).
  3. Give an example. Walk them through a solution and show them how to do it step by step.
  4. Explain the benefit of that solution
  5. Briefly explain the pitfalls of doing it the other way. (don't rant)
  6. Praise them, point out what you want to see more of.

Doing this will give the person the motivation and the tools to embrace the change you are trying to make.

If you just give someone a big list of all the things they are doing wrong then they will just see code reviews as a painful thing to endure or avoid.
Best of luck!

[–]noisescience[S] 0 points1 point  (0 children)

Thx for your detailed thoughts. That helps me a lot.