Not just how to write software with fewer defects
Sympathetic to your viewpoint. However, I feel you’re missing the bigger picture - but first off, some QA definitions:
Verification error - The code doesn’t do what the spec says it should.
Validation error - The spec was wrong.
(The latter is usually far worse, because it often results in large portions of the code base being binned, due to building totally the wrong thing!)
So rather than Documentation, Sequencing and Phase-Gating, Agile Frameworks are based on the principle of Empiricism, and Empiricism rests upon the 3 Pillars of Transparency, Inspection and Adaptation.
To help you understand this purer form, let me ask you why you are running tests against your source/executable code? You’re inspecting it, that’s why. But why are you doing that? To gain transparency of your code’s quality and suitability. But why? So that you can make corrective changes (adaptations) if there are problems. In short, it’s all about Feedback.
So will your coding practices help you if the Business Analyst totally misunderstood what the customer wanted? (Or, more truthfully, if the customer didn’t really know?) No, of course not, and so your approach will not prevent Validation Errors.
You may then retort, “They would have found it in UAT!” But a typical Scrum Team gets feedback after just 2 weeks; your Waterfall approach is going to have to wait until the whole thing is finished (typically 6 months to 2 years later). So how much extra code is going to get binned? How much more rework is going to be necessary? (And let’s not forget that the Scrum Team didn’t waste 3-6months writing this useless specification in the first place!)
So this, amongst many other reasons, is why Agile is upwards of x4-to-x10 faster because it removes so much unnecessary waste from the processes. (It’s not just about fewer bugs!)
I see that you’ve used the words “a strong suspicion” – this sounds rather like you’ve never experienced Agile for yourself? Am I right? Psychologically, I think the behaviours of yourself and other commenters on here can be explained as not wishing to feel stupid again, having to learn something new, and so your egos are preventing you from seeing the truth.
The thing is, reality doesn’t care about your feelings.