Loading...

How to Deal With a Junior Engineer Who Is Resolute on Rewriting the Code

Roy Pereira

CEO at CalendarHero

Loading...

Problem

It is not uncommon for less experienced engineers to rush on proposing to rewrite the code. As a manager, you will have to put a significant effort into explaining to them the benefits of reusing the existing code and the dangers of rebuilding it from scratch. Whether it is caused by naïveté, the imperative to prove oneself or sheer indolence to understand the old code, managers often face a difficult challenge trying to convince these engineers of rethinking/not rewriting code.

Actions taken

My initial efforts to convince junior engineers to drop their plans was to make them aware of the broader picture. I would often instruct them to learn more about why the code was done the way it was and put themselves into the shoes of an engineer who was writing that code. If the original engineer was still around, then I'd suggest they go and chat with the junior engineer (s). If that's not a possibility then I would have them read documentation to understand why the code was built that way. I would also have them sit with Product and understand where that piece of code would fit into the larger picture of what we are building. They should understand the iterations and fluidity of the process and how the code would fit into that. I would have them figure that all out by themselves because they need to understand the “why” for themselves.

Oftentimes, their intention to do the rewrite stems from the different coding styles they acquired at their previous job. In that case, I would have them carefully read through past product requirements or engineering guidelines. Engineering guidelines should describe the company’s coding style in greater detail -- what and how to code -- and why this is relevant and how it is related to the company’s values and culture.

Also, I would have them be aware of the time it would take to do the rewrite. A common argument to support the rewrite is that it would make things faster. However, I would provide a more comprehensive understanding of time and resources. I would have them look at the sprint and all the tasks they would have to complete on top of doing the rewrite. Failing to do so would cause a more severe slow down as they wouldn’t be able to finish their sprint.

Finally, if none of my efforts to convince them would be successful, I would simply say no. I have never had to go that far, but even hypothetically, that sounds better than succumbing to wasting time and resources on something that isn’t “broken”.

Lessons learned

  • Be aware that junior engineers will often propose the rewrite as a silver bullet solution. While this may sound unreasonable from a manager’s perspective, managers should remember that they were once junior engineers and they themselves have proposed rewrites with the same enthusiasm. Put yourself in their shoes and be more sympathetic but also be clear and strong in your arguments. They don’t have bad intentions; they are proposing it because they are naive and don’t know better. As a matter of fact, your job is to coach them to know better.
  • Less experienced engineers often don’t understand the limited range of their vantage point. They are looking into a tiny sliver of the whole without realizing it. You should help them understand that their view on things often constitutes a limited portion of the whole picture and any actions without a prior effort to grasp the broader perspective would be shortsighted and even detrimental.
  • If they break the code -- which frequently happens -- they would then have to fix it. If they do the rewrite, they would also be responsible for that code and not everyone is willing to take that responsibility. That can deter some people from doing it. Also, if they build it by themselves, they will have to maintain it afterward.
  • Be patient. This is a hard lesson to learn. Wanting to rewrite code is a deeply embedded engineering instinct that engineers need to learn to overcome and some won’t be able to learn it even as senior engineers.

Be notified about next articles from Roy Pereira

Roy Pereira

CEO at CalendarHero


Engineering LeadershipLeadership DevelopmentCommunicationOrganizational StrategyDecision MakingCulture DevelopmentEngineering ManagementPerformance MetricsLeadership Training

Connect and Learn with the Best Eng Leaders

We will send you a weekly newsletter with new mentors, circles, peer groups, content, webinars,bounties and free events.


Product

HomeCircles1-on-1 MentorshipBounties

© 2024 Plato. All rights reserved

LoginSign up