in reply to Have you ever lost your work?

The last time I lost any major amount of code was about 20 years ago in college when I was defragmenting my harddrive and it was getting really hot and I opened up the side of the case to point a desk fan at it. I turned on the fan and heard a pop and heard my harddrive spin down. Then spin up. Then spin down. Harddrive was unrecoverable, and had about two months of personal project code on it.

First lesson was never plug inductive loads into a surge protector on the clean side of a battery backup.

Second lesson was always make frequent backups of anything important. I think most people learn this lesson the first time they kill significant hours worth of their own work.

Since then, I almost always push my code changes to a remote git repo (previously darcs, previously svn) the same day as I write it. I have github for the public stuff, and my own personal Digital Ocean ($5/mo) server for the rest. I also have a local backups server that takes drive snapshot copies of everything every few weeks. (I leave it powered off most of the time to protect against surges) I ought to do that more frequently, but everything frequently-edited that I really care about is in Git.