Well, if you're serious about coding, a version control system is a must. You can either set up your own (git or subversion) repository, or use one of the free web-based ones.

There's nothing that makes that "O crap, what have I done?" sinking feeling go away quicker than a revert to last know good version.

Version control, don't leave home without it.