Starting Off Right With Version Control
June 2nd, 2009
This past weekend, I made a mistake.
For the past couple of weeks, I’ve been experimenting with a few things in C#. I made a quick mockup of some Registry-accessing code, which turned out to be completely misguided as far as why I was writing it, but it was great for diving into unfamiliar parts of C# and the .Net framework. The code takes a file extension and retrieves the default application for the ‘Open’ command, then spits it out to the screen. It was nice to get back into ‘real’ development after spending so much time in the terrifying depths of a legacy COBOL code base, and it also segued nicely into learning a bit about the OpenFileDialog class.
One of my adventures in C# accidentally turned into the user interface of my ‘Review Manager’ project. I’ll talk about the drunken stumble to this design in a later post, but suffice it to say I really liked the way it was shaping up.
Somewhere along this journey, likely as a direct result of some StackOverflow-related procrastination, I decided that to do this project right, what I really needed was some source control.
Although Git is getting a lot of press these days, it seems good ol’ Subversion is still the recommended choice for noobs like me. I downloaded the latest version of TortoiseSVN (1.6.2) and was on my way:
- Create a new ‘Development Projects’ directory for my serious work destined for an online portfolio… Check!
- Move my ReviewManager folder out of my Visual Studio ‘Projects’ directory (which will now be used for one-off projects and some prototyping) into the new ‘Development Projects’ directory…Check!
- Create a new root level directory to hold my SVN repositories…Check!
- Create a new repository for the Review Manager project…Check!
- Check in my existing work to the new repository…Che..Wait, where’s my.. Oh God..
As I said, I made a mistake. I’m still not 100% sure what happened, but it seems my work never actually made the move out of the Visual Studio ‘Projects’ folder. In a fit of irony, I managed to completely obliterate all my work while attempting to safely secure it in my version control system.
Thankfully, all that was really in the project was mostly just some basic GUI stuff that was partially contained in one of my prototyping projects, so it wasn’t a huge loss. What it was, however, was a giant wakeup call. Even on small projects, it pays to have a nice, secure, version controlled backup of your work.
This wasn’t a total loss. I decided to restart on the right foot and have organized my project directory a bit. This structure might not be optimal, and it sure as hell isn’t complete, but it’s a nice step in the right direction:
Review Manager
├───doc
└───src
├───Database
├───DirectoryManagement
├───Estimation
├───PeerReview
└───TimeTracking
The Database directory is going to be used for db connectivity classes and the like, but the other four are the main goals of this project. I’ll talk about each of these in a later entry.
As always, all feedback (positive and negative) is encouraged in the comments. I’d love to hear what you all think of my progress!
June 5th, 2009 at 12:21 am
You may want to check out http://unfuddle.com/. I use it for my personal projects. It’s especially nice if you have multiple PCs that you work from.
June 5th, 2009 at 12:36 am
Hi Ryan,
This looks like an interesting site, but I think I’ll be alright keeping my repository on my laptop for now since it’s the only place I do any development work (for now, at least).
As the project gets bigger, I’ll probably be posting more and more code looking for feedback. Perhaps when that time comes I’ll look at hosting the repository so my readership (both of you!) can easily access the whole project.