1 Code quality · Good Code, Bad Code
Mục lục
1 Code quality
This chapter covers
-
The reason code quality matters
-
The four goals that high-quality code aims to achieve
-
The six high-level strategies we can use to ensure code is of a high-quality
-
How writing high-quality code actually saves time and effort
You’ve probably used hundreds, maybe even thousands of different pieces of software in the past year. Every program installed on your computer, every app on your phone, and every self-service checkout you’ve had the pleasure of contending with… we interact with software a lot.
There are also many pieces of software that we depend on without even necessarily realizing it. We trust our bank, for example, to have a well-behaved backend system that isn’t going to unexpectedly transfer the contents of our bank account to someone else, or suddenly decide that we’re in millions of dollars of debt.
Sometimes we encountered pieces of software that are an absolute delight to use; they do exactly what we want, contain very few bugs, and are easy to use. But other times we encountered pieces of software that are absolutely horrible to use. They are full of bugs, crash all the time, and are unintuitive.