3 Reasons Why Refactoring Your Code Before Submission Will Make You Stand Out As A Software Developer

2nd Sep 2022

  • Personal Development
  • Code Quality
  • Best Practices
3 Reasons Why Refactoring Your Code Before Submission Will Make You Stand Out As A Software Developer

Photo by Boris Smokrovic

A consistent refactoring habit, before asking a colleague to review your code, is the most powerful step to improve your awareness as a software developer.

The problem is, before opening a pull request, some software developers don’t ask themselves:

  • Is my solution clear?
  • Have I actually completed the task at hand?
  • Are there inaccuracies I can easily fix?

And so they never take the time to reflect over their code and understand which side they should focus on to improve.

In this post I will explore 3 reasons why you should take the time to thoroughly refactor your code before submitting it for review - and how this can make you stand out as a software developer.

1. It shows that you care about your craft

Every time you release a piece of code, you make a statement for the software developer you want to become.

As an architect takes pride in the design of a beautiful facade, you should strive to design a piece of software to the best of your ability. You should pay attention to following sound design principles, agreed naming conventions and general team guidelines. This is why reviewing your own code, after you have made it work, helps you visualise a birds-eye view of your own design decisions, and amend them accordingly.

Use your development process as a tool to drive the team work ethic.

2. It shows that you respect your teammates

You should always write code like it is your last day at the company.

Although it feels safe to have the chance to explain verbally how a piece of code works, you should strive to let your code speak for itself. Even more, the need for a part of the code to be explained is usually an indication that that section could be improved and made more declarative. Replace comments with better naming, choose specific over vague and make your code do one thing well rather than several things average.

Treat code as a form of inter-team communication rather than a just a means to an end.

3. It shows you know “I will fix it later” is an illusion

There is always going to be a task in the pipeline that will take priority over investing time on good quality software.

It’s common to feel overwhelmed by tight deadlines and intense schedules, which can lead to postponing a final review of your code and leaving it for later (when you’ll be less busy). But the truth is, you will always be busy. So, integrate an iterative refactoring step within your own development process to make it almost unmissable.

View quality code as an intrinsic value to meet rather than a “nice to have”.

In software development, it’s easy to fall into the trap of learning to code, without learning to think. So, before releasing your code, focus on being the best communicator you can possibly be.

Your teammates will thank you for that.