by codingdave · 4y ago · 0 comments
There will always be different skills levels. As much as the people on the lower end of the spectrum need to raise their own level, those at the top end of the spectrum need to accept that not everyone will be at their level.
You need to really think about choosing your battles. Are the concerns with their work truly having a negative impact on the goals of the business? Or are they just not matching your personal style and preferences? Can the imperfections in the code be cleaned up down the road as tech debt while using that effort as an opportunity to teach? Or is the current PR truly the correct time to invoke change?
Sometimes the PR is the right time. If they are bringing in complexity that will slow down the teams ability to update the code, that needs to be fixed. When doing so, approach it as a teaching/mentoring moment, not a time to slap them on the wrist for not being you. But if we're talking about suboptimal naming, or arguing over colors... let those things go and mentor them over time. But keep notes - you do want to go back and improve the elegance in the codebase as you have time. (And if you never have time, your leadership needs guidance, not the junior devs.)
I constantly see things done by more junior team members that I would have done differently. 3 out of 5 times, I let it go and know that I'll refactor it when I next touch that code, but if it works, then it works. For the other two times, one is when it does need an immediate change and I'll call it out as such in the PR. The last is when their idea is better than mine. Junior devs are just junior, not stupid. Sometimes their new view on the world is refreshing and good, so be open to that.
> I let it go and know that I'll refactor it when I next touch that code
You accept it and then you rewrite it. Simple but as a dev, I would feel let down by the fact that my work was just temporary. This would make me bitter not more experienced. Also, I didn't learn what was the problem so the same situation make repeat.
If you discussed your opinions talk with the PR authors, then it's them who should rewrite the code, not somebody else.
Do you agree with this?