CSS variables, test frameworks, are good tools for catching bugs -- but at the end of the day the goal is that the code should work and be easily maintainable. Best practices help you do that, but theres many instances of a code base full of bugs that has to be maintained and improved over time. Developers who turn up their nose at "fixing bugs" are of no use to a business. These ideas are great when starting a new codebase but thats not the situation a developer is going to be in most of the time in practice. And if you follow every best practice there will still be bugs that need to get fixed.