quality is empirical
daily
Ask 100 developers if they write enough tests and you’ll get 99 variations of “no.”
Ask them why they don’t write enough tests, and you’ll start to see some divergence.
Some don’t have enough time. Some don’t know how. Some write hundreds of pointless tests to meet some test coverage KPI.
But it’s not really a divergence at all. Because those 99 developers all work in company cultures that don’t actually value quality. They might value “not having production disasters” in theory, but they don’t value quality.
Quality is different from good code. Quality code is code that does what it’s supposed to. They are related, and you don’t often find one without the other, but they aren’t the same thing. You can have a tangled mess of god functions and side effects, but as long as you can demonstrate that it does what it’s supposed to, it meets the threshold for quality (even if it’s unlikely to stay that way).
It’s the demonstration step that matters here. Can you prove that your code does only what it’s supposed to? Do you even know what you need to prove?
Quality culture is really, really hard. It requires dozens of little shifts in mindset. The only way to achieve it is to make one of those small steps at a time.
The first one is this: quality is when you can demonstrate that your code does only what it’s supposed to.