September 12, 2009
Agile & Formal Methods in Latest Edition Of Computer MagazineJust a quick note about an article I've contributed to in the September edition of Computer magazine on Formal vs. Agile methods. The basic jist of it is that there are no practical reasons why Formal Methods can't be applied to Agile projects, providing we're doing it for the right reasons and in a way that's compatible with core Agile values. If your customer has a requirement that some multi-threaded code should never fail (e.g., because lives or billions depend on it), then a technique like model-checking might actually be the simplest thing that could possibly work in that situation.
And, looking at it from the other side of the fence, there's no reason why a Formal Specification has to be "finished" before any working code is delivered. It's totally feasible to flesh out a spec written in, say, Object Z, one customer requirement at a time and incrementally deliver a working system that satisfies the current spec to get customer feedback. Indeedy-doody, it's been done, and - Lord have mercy on our souls - it was being done before anyone had heard of Agile Software Development!
In my own self-important little world, I've routinely applied tools and techniques like Design By Contract, Precise UML, guided inspections and even the very occasional proof of correctness when called for in Extreme Programming. Indeed, it seems I've been something of a pioneer in this, but that's mostly due to complete lack of inclination on everyone else's part. It's no great claim to be the first one to go to a place nobody else is especially interested in going.
Which is a shame, because, let's face it, the software being produced by the vast majority of Agile teams just isn't anywhere near reliable enough. Not even close. And I know from practical experience that it's perfectly possible to be much more rigorous while staying true to core Agile values, and that it makes absolute sense to expand your palette of techniques to include more formalism and rigor for when it applies.
Posted 9 years, 8 months ago on September 12, 2009