DEV Community

loading...

Start to spend time on refactoring

lalvesoliveira profile image Lucas Oliveira ・2 min read

Let's start with a catchphrase: Everything changes! Why your base code don't?

I've participated of many projects with million legacy code lines, so I surely can say that: any kind of project must have a huge refactoring culture, no matter if the managers think that is a waste of time. They can't be more wrong.

The "tech world" changes everyday

We have no news here: the developers biggest challenge is to keep updated about what is running on tech world.

It's not hard to a project become outdated because of many reasons and the most common is to ignore the growth of all technologies used in the entire project.

I bet that you already have worked in a PHP5 based project that can't be evolved to version 7 because "it will be a wast of time and money".

Absolutely it is losing a lot of performance, security, code health, development velocity and more. You must ever spend time refactoring some things to keep updated and enjoy the best of technologies can provide.

The dev team is ever evolving

The experience acquired while software developing is the main factor to become a better developer, so, no matter if the code was wrote a week or few years ago, it can be evolved.

dev

The project is ever growing up

Sometimes your project was developed to be X and them becomes Y, and that's OK! The problem: without refactoring, your project will be a truly Frankstein soon. It's like to build a ship then set wings to fly. It has a big chance to not work.

Obviously if big changes like that is previous noticed, and the project was planned to have that big changes, everything will be fine. Instead, a refactoring will be necessary.

Keep you code healthy! Refactor it.

Discussion (0)

pic
Editor guide