Member-only story
Things That You Can Do to Improve Code Quality
How you can bring down the WTFs per minute
Poorly written code can be a real disaster. When the mess in your code increases, so does the time that it takes to maintain it. In the worst-case scenario, the code can no longer be maintained and the project will slowly die.
To prevent this situation you should take care of the quality of the code. You should invest time in the quality of your code. In the long run, good code pays for itself.
Quality is everyone’s job. It doesn’t matter if you’re the manager, a tester, or a developer. The delivery of high-quality, and of course working, code should be the goal throughout the development process.
Here’s a list of six things that can be done to improve code quality. Some of these things can be done as an individual, others are more of a team effort.

1. Four-Eyes Principle
The four-eyes principle is an easy principle to understand and execute. It means that at least two people, including the author of the code, review the code. One of the most popular methods nowadays is the pull request method.
Pull requests let you tell others about changes you’ve pushed to a branch in a repository on GitHub. Once a pull request is opened, you can discuss and review the potential changes with collaborators and add follow-up commits before your changes are merged into the base branch.
During a code review, several things should be taken into account. One of these is checking whether the code breaks the code convention rules. This is a process that can be automated by using a linter in a pipeline, but sometimes this check is still performed manually.
Other things that can be checked for, which cannot be done automatically, are the maintainability of the code and error handling. Last, but not least, the code should be checked for completeness. Does this piece of code contain the entire scope of the feature as it was intended to be built?