Skip to content

Blog: Why is clean code so important in business?

Jul 8, 2019 5:05:00 PM

Ilias Galanopoulos

View all blogs

Clean code for yourself

Ajenta is a dynamically growing company and innovative ideas are an essential part of our business. In our development team, we develop something more than code; we develop innovative ideas. Our code repositories contain quite a few experimental projects: prototypes for new tools and applications, tests for new frameworks or technologies, demo projects for new customers.

For most of these experimental projects there comes a moment when for several reasons they must be put on hold. But what happens when you must jumpstart a stalled project? Personally, I have found myself several times, in the very depressing situation of not being able to recall essential information about a project that I have built. I might have spent hours designing and writing the code for it, but after a few months it looks so “unknown” that I have to read the code again; as if it was somebody else’s project.

And here comes the moment when you either admire or hate yourself and your code. Good documentation, meaningful (but not verbose) comments, naming conventions for functions and variables, clean and modular design and a DRY (Don’t Repeat Yourself) approach can make the difference and help you make a quick refresh of the project before you start working on it again.

Clean code for the team

The greatest challenge for a Team Lead is to get the most out of the team members. In order for the new developers to be productive, it is essential that they become familiar with the existing code. But, writing code can be relatively easy. Reading is hard.

Therefore, writing clean code is one of the best ways to increase the productivity of the whole team. As soon as all team members can have a clear idea of the existing code, everyone can easily be involved in an existing project and everyone can contribute in code maintenance. There are no bottlenecks in the team process and the team does not rely on the person who originally wrote the project code. In other words, clean code can make a team work as a team, rather than a loose group of individuals.

Everybody involved in the IT world knows that the notion of bugless code is a fallacy. Even if I was so confident about my skills and I believed that I can write totally bug-free code, nobody can guarantee that the libraries or the third-party APIs that we are using will not contain bugs. Moreover, there is no guarantee that our software will be compatible with any operating system, browser or mobile device.

Therefore, there will always be bugs in the code. There will also be unhappy users discovering them and nervous customer success operators who have to deal with user complaints.

The realistic goal for every developer is to write software that is easy to understand and maintain. Clean code can help developers find the root cause of the problem quickly. It can also help them provide a fix with minimal effort without affecting any other components or causing an even greater issue.

After all, developers do not have huge headaches trying to find the bug, operators can give to customers definite answers with accurate time estimates and users can see their problem fixed thus keeping everyone satisfied.

Digital Teaching & Learning - Lessons from Lockdown

This webinar, hosted by FutureScot, in association with Vscene, discusses digital teaching and learning – lessons from lockdown.

Watch Video