Formal verification can help flush out some of the mess from the latter.
Unfortunately the the former -- the complexity of the actual business case / problem / real world domain -- has always been much harder than people ever seem to think. Also the reason why "rewrite from scratch" is often a total failure.
Thinking clearly is hard. I'm gonna go watch TV.