Traffic engineers use decades-old manuals that ignore safety in favour of driver convenience. This has to change. Streets built by them are a huge public safety issue.
We should never accept crashes that result in serious injuries or deaths as if they are an inevitable force of nature or something. They're merely a predictable outcome of a badly built system.
Use it as an opportunity to learn how to better store and edit your code (e.g. a VCS and a smart-ish editor). For me, a simple Ctrl-Z would be enough to get my code back.
Sounds like it's not so plain after all. My Android never does this.