Back to resources

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

Coaching / Training / Mentorship
Juniors

12 January, 2021

Roy Pereira
Roy Pereira

CEO at CalendarHero

Roy Pereira, CEO at Zoom.ai Inc., shares how to deal with a junior engineer who -- for whatever reason -- is resolute on rewriting the code without a more profound understanding of the implications of their proposal.

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.

Discover Plato

Scale your coaching effort for your engineering and product teams
Develop yourself to become a stronger engineering / product leader


Related stories

10x engineer or 10x impact?

26 May

Hiring 10x engineers is hard for most companies. It’s a tough battle out there for talent. So how should most companies approach building their team?

Building A Team
Leadership
Hiring
Coaching / Training / Mentorship
Vaidik Kapoor

Vaidik Kapoor

VP Engineering - DevOps & Security at Grofers

Growing Through Different Engineering Lead Roles

8 May

Weiyuan Liu describes his experience moving up from an individual contributor, tech lead, and engineering manager.

Leadership
Coaching / Training / Mentorship
Career Path
Weiyuan Liu

Weiyuan Liu

Director of Engineering at Zillearn

Preparing For Your First Presentation: The Art of Public Speaking

8 May

Weiyuan Liu shares his insights on public speaking, such as how to prepare for your first presentation.

Different Skillsets
Coaching / Training / Mentorship
Weiyuan Liu

Weiyuan Liu

Director of Engineering at Zillearn

Here to Make a Recognizable Difference: How to Develop Teams

5 May

Eric Merritt, VP of Engineering at Whitepages.com, divulges on the many complexities of developing teams in management by solving problems according to their needs, and empowering teams.

Leadership
Impact
Sharing The Vision
Coaching / Training / Mentorship
Eric Merritt

Eric Merritt

VP of Engineering at Whitepages.com

How to Hire and Build High-Value Teams

4 April

Hendra Wong, Engineering Manager at Inflection, explains his tips for building teams; explaining how to hire, communicate, and set expectations for the team.

Alignment
Building A Team
Meetings
Internal Communication
Collaboration
Coaching / Training / Mentorship
Hendra Wong

Hendra Wong

Engineering Manager at Checkr

You're a great engineer.
Become a great engineering leader.

Plato (platohq.com) is the world's biggest mentorship platform for engineering managers & product managers. We've curated a community of mentors who are the tech industry's best engineering & product leaders from companies like Facebook, Lyft, Slack, Airbnb, Gusto, and more.