Currently browsing 'Coding Blunder Mistake'
Perforce/VSS/CSV and Subversion: Mistakes Made
A Bug/Version control software story:
I figured I would share one of my most embarassing development stories with the whole wide internet. This happened about 10 years ago and never happened again since so I think I’ve learned from the mistake.
I had been working on a particularly crappy piece of code that no one else in the company wanted to do. I call it crappy because no one in their right mind would go about trying to modify MFC code to do what I was doing.
I was Hacking MFC to make tab panes for dialogs that had a particular behaviour. At the time I had barely an inkling of win32 coding at the time and modifying MFC is was a lesson in pain I wouldn’t want to inflict on my worst enemy.
After spending nearly a week or more I had just finished the tabbed dialogs and went to check in my completed work.
I had not checked in my work for nearly a week but since everything seemed to work AOK I went to check it in.
However, instead of checking in my code I mistakenly got the lastest code I checked in. It overwrote all of my work and changes up until that point.
Lets just say I had a panic attack. I’ve had 1 case before that where someone else had overwritten my code but up until that point I’ve never had that myself. In the previous case I was able to retrieve the code because it was on a FAT disk system. For whatever reason this time around I wasn’t able to get my code back. (NTFS ARGGG)
All I know is I didn’t retrieve files this time around and within a couple weeks I was out of a job.
What did I learn from that mistake?
1. Check your code in daily. If the class compiles. Check it in.
2. Use an editor that has a local history. (eclipse, etc)
That way if you do “get latest” over some file you can restore it.
Occationally I do “get lastest” over code I had not intended. However with the tools and experience
I’ve found the mistakes can be minimized.