5 Code quality enforcement

 

This chapter covers

  • Standardizing our code’s format by using formatting tools and linters
  • Reducing bugs and vulnerabilities in our code by introducing static code analysis tools
  • Automating quality checks before pushing code to a repository
  • Organizing our code and documenting it for clearer usage and reuse
  • Creating a culture of learning through code reviews

“As you can see, we can structure our projects in a way that empowers our developers to deliver quickly, efficiently, and with quality, while lowering costs. We have written and deployed a new version of our translation application in a day with flexible deployment options along with automated quality checks.”

Your project manager is smiling from ear to ear as they say this and sit back down. Your demo went really well. Without going into the nitty-gritty details, you were able to demonstrate your new application and even push a live change during the demo to show the quick turnaround you can achieve. Your CTO looked intrigued but not convinced.

“What you have demonstrated looks promising, but I’m not convinced this will scale. We have a bunch of other developers, an entire QA team, and an operations team that all need work. I need to see a plan that shows me how we can spread this throughout the organization. I need to see how you can integrate with existing systems, teams, and developers before I consider doing this company wide. Can we meet on Friday to have these questions answered?”

5.1 Reviewing code

5.1.1 Keep it small

5.1.2 Keep an open mind

5.1.3 Keep it moving

5.1.4 Keep it interesting

5.1.5 Keep it the same

5.2 Constraints on development

5.3 Standardizing our code through format and lint checks

5.4 Static code analysis

5.5 Code documentation

5.6 Git hooks

5.7 Flow

Summary