Ooops! Today, I accidentally copied over some program files I'd been working on. I hadn't checked the code into the version control repository yet, and hadn't backed it up, either. I began recreating the functionality that the new, now non-existent code had implemented.
A few lines in, I had an AHA! moment... on Wednesday, I had been quite proud of the solution I'd come up with for entering a custom value into a form element, and I wrote a
blog entry about how I did it. In that entry, I included a few chunks of the source code, so that other developers could get an idea of how I implemented my solution.
Yay! It turns out, those few blocks of code are about 90% of the work I'd overwritten. So, I just went back to that blog entry, and copied the code blocks and pasted them back into the old files. BAM!