I guess that now the code is gone, i can have a second attempt at it, but this time make it better than the first time.
I feel your loss! This kind of thing has happenned to people since the dawn of computers, I think.
After having it happen to me several times waaay back in high school (on the cheapo Apple 2e floppy drives that would croak if you looked at 'em sideways), I started making backups of everything I did.
Today I have a fileserver (using http://freenas.org/
) that is separate from all the other computers in the house sitting on my network. Every hour (also at shutdown and reboot), each workstation backs up its home directory (plus any others I care to add) to a central location on the fileserver, which has 800 GB of storage. At some point soon I am planning on adding another drive to have that server auto-backup to, but so far this system has worked out well.
In the worst case, I will only lose an hour's worth of work, which is acceptable to me for my work patterns.
One time I did have a failure (using a different backup system, but about the same nonetheless) where my hard drive croaked in one of my workstations; after a trip to Fry's Electronics and a few hours of work, I had my system back up with all the data (minus the time between it dying and the last backup) back in place.
Such an automated backup system is well worth the investment of time and money, IMO; if you didn't want to go to the expense of a complete file server (I use mine for other things as well - MP3s, videos, document sharing, reference repository, etc - it serves all the workstations in the house), then even a portable/pocket hard drive (heck, even a large thumbdrive) can be used; if you are on Windows like most people, I think there is a built-in simple automated backup system (hmm - looking at XP right now, there is something called "backup" under System Tools; that would probably be it).
All of my workstations at home run Ubuntu, so I use the simple incremental backup system it comes with (plus some custom scripting and cron setup to make it work right - as well as on shutdown/reboot).
There is likely something just as easy to use on Macs.
Let this be your "wake up call"; invest in a backup solution (even if it is just a second old hard drive inside your case) - learn to use it, learn to love it, learn to quit worrying (ok, you never quit worrying - like I said before, I am now thinking of a backup solution for my backup solution).