So this morning I managed to delete an entire directory tree (actually the whole app I described in my previous post) and:
- I did not have the code in source control.
- I did not have the drive backed up in any form (even the ridiculously easy Time Machine).
- I was not using an IDE or editor that saved local history or backups.
- I did not have any of the files open in an editor.
As I said in the title, don’t be stupid. I was stupid. I know way better than that. Fortunately, Clojure is such a concise language that it only took me an hour or so to rewrite the app. :)
One nice tip that I did harvest out the mostly sympathetic comments on Twitter was this nice bash function to replace rm in the shell with a function that instead copies files to your Trash so they can be recovered. This is a good thing. Hope this helps someone else…