How to survive a ground-up rewrite without losing your sanity How to survive a ground-up rewrite without losing your sanity