Pure Danger Tech


navigation
home

Don’t be stupid.

16 Feb 2010

So this morning I managed to delete an entire directory tree (actually the whole app I described in my previous post) and:

  1. I did not have the code in source control.
  2. I did not have the drive backed up in any form (even the ridiculously easy Time Machine).
  3. I was not using an IDE or editor that saved local history or backups.
  4. 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…