How Small Practices In Your Code Reviews Can Make a Big Impact
The mindset of "we can deal with it later" only results in technical debt and a ton of issues to deal with in the future.
Recently, while reviewing the code changes made by one of my client's team members, I noticed a few common issues: hard coding, unclear variable names and code duplication. When I offered suggestions to address these issues, some team members thought I was being too picky and also said tight deadlines are reasons to overlook these.
I asked them whether they can see these 3 things right now in their current application:
1. Onboarding Problems: The time to onboard new team member on their code base is huge.
2. Getting Lost in their Application: They themselves take a lot of time to work on the module their colleagues worked on and which they never worked on.
3. Hydra effect: You might heard about Hydra from Greek mythology. Anyone who attempted to behead the Hydra found that as soon as one head was cut off, two more heads would emerge from the fresh wound. The same applies to your bugs. You fix a bug at one place but due to code duplication same bug shows up at other places.
This is not their only problem. I observed in multiple places.
In both the physical and software worlds, neglecting small problems can quickly escalate into larger ones. You might see in your area that someone has thrown garbage at a particular place and after a couple of days you might have seen that whole area filled with garbage. The same applies to your application too.
Most applications are filled with bad practices like hard coding, unclear variable names, code duplication, etc. At first, people thought it was ok, we needed to build fast or we could fix it later.
As a leader or manager, it's crucial not to give in to the temptation of shortcuts. The mindset of “we can deal with it later” only results in technical debt and a ton of issues to deal with in the future.
Lay down strong foundations, address issues promptly and foster a culture of responsibility and ownership within the team.
Trust me the time you are saving now will haunt you & your team members down in the future. Because of this approach, things might take a bit more time upfront but it'll save you countless headaches in the long run.