DEV Community

loading...
Cover image for How to maintain software quality with minimal effort

How to maintain software quality with minimal effort

Cleyson Leal Braga
Software Engineer focused on build products in ReactJS. Living in Brazil working to Portugal
・2 min read

As software scales, one of the greatest challenges is to maintain quality to match. Luckily we have tools and techniques that can help us

This challenge does not have to be painful, and there are ways to achieve satisfactory results with minimal effort.

Tools

Before looking at more complex techniques, we can implement tools that make our software scale consistently; I usually say that quality software development is when all developers are on the same page, working with consistenty and using standardised procedures.

Linter

Linter is a tool that analyses source code to flag programming errors, bugs, stylistic errors, and suspicious constructs.
For example, when you forget a variable that has never been used.
Linting improves readability, code review discussion level, and it looks like the code was written by one person.

Code Formatter

Imagine having to remember the style guide standards like indentation, tabs vs. spaces, line breaking before column count, trailing commas vs. no trailing commas, etc.
We would certainly miss something, no matter how many Linters there are to help us.
For that, the code formatter exists, applying rules automatically for your code to follow the code style.

Test

Writing tests is the best way to know if your code really works
the way it should and helps to find bugs in advance.
Writing tests also helps to improve the implementation and thought process about the architecture you are implementing...

If it is difficult to test, it is difficult to maintain.

Typecheck

Some languages ​​already have Typecheck natively and if you work or have worked with these languages ​​you already know the power that Typecheck gives you.
Whereas other languages, ​​like Javascript, do not have natively, we can use tools like Flow, type-check or typescript - they all have the same mission for your typed code - to avoid passing incorrect strings. For example, to avoid passing a string where there should be a number or if there is any missing value in the object that was passed.
But Typecheck goes far beyond that, also serving as documentation and helping us to think better about the architecture and building of our applications.

Pre-commit

Pre commits are scripts that run all the previous tools to find out if everything is right with your code before committing to your branch, and if something is wrong it will alert you and prevent you from committing something that is not right.

Code Review

It is not a tool but a technique, the code review in my opinion is the one that most helps when keeping all developers on the same page, it also helps in sharing knowledge of the code in addition to preventing architecture problems and errors that the tools did not find.

Maintaining the quality of a software needs to be a priority for every developer who creates and maintains a code base, but using tools to help us should not be painful, I hope these tips help you to keep things in order - that's all folks

Discussion (0)