Sometimes, when you're a lone developer on a project you skip some of the important facets of developing as a group. Like iteration planning, bug tracking, and source control. Well, I'm here to tell you that having source control is the most important part of your application (that's not written by you, that is). Here are three great reasons why you should never develop without it, in desc order of importance.
You sporadically do really stupid crap.
Let me illustrate with a story. One time I was getting ready to go out with my girlfriends., this was a few years ago . I had just gotten out of the shower, so I was wearing a towel. I was simultaneously on the phone and putting the stuff I needed on the floor in front of my mirror, for instance my makeup, and a hairbrush, threw my curling iron on, and lay out my clothes. I chatted some more with my girlfriend and sat down to start prettying up. Well, I guess we all can see where this is going, I sat on the curling iron. It's a salon curling iron, so it gets up to 400 degrees. For the rest of my life I will be literally branded by this colossal momentary lapse in judgment. Now, if you asked me a year beforehand “Sara, do you think you should do something to take precaution for sitting on hot styling tools?” I would be like, “Why, that's the craziest thing I've ever heard.” Well, guess what, you've done something just as stupid (get off your high horse, you SO have) and though you're thinking “Why, I would never trip over a rabid squirrel and toss my laptop in the sewer” it just COULD happen. Then where would you be? Source control is important because you never know what can happen and you always want to have a backup.
As programmers, sometimes our brain writes checks our fingers can't cash.
“Why, I think I should which from Castle to LINQ this weekend.” “C# looks cool, let's switch from Java this week” “Wouldn't it be great if we created a new utility project and condensed all our object methods into one big class arraigned by related data by page this afternoon?”
My father is one of my four favorite men on the planet, however, one of his hobbies is starting projects around the house. His hobby often doesn't include finishing protects around the house. He's really done some beautiful work on their home, however, my mom has had to explain to guest swhy we had a half of a deck, no bathroom tile, and, when he decided to get aluminum siding, a black tar-paper house. I'm sure she would have loved it if my father had checked in early and often so she could just roll back his changes after a few months.
Listen, sometimes doing something new can be fun, and great ideas occur to us all the time. When we get to implementing things we can make a bigger mess then we intended. When we ensure we can bring back “the last time things worked” before we started gutting things. Or, we could just decide we liked our earlier solution and revert back to it. Either way it's a good call.
You obviously care about your development as a talented programmer. I mean, you're active online you pay attention to the blogs, you keep up your skills. Wont it be nice a year from now to look back and see just how far you've come? I mean, I know we tend to run into those things in our code ever so often, but usually we fix them as soon as we can. It's always great to reflect, and chuckle a bit at prior naiveté. The other day I was going through my stuff and looking at the LONGEST if statement since the beginning of time I think, and I realized, I didn't need any of it. That one line took care of the whole thing. Seeing my application like it is now will probably make me smile down the road.
There are a ton of other reasons to use source control as a lone developer, but those are the top three in my book. Though you may not take the time to set things up it's invaluable. It took me two days to set up svn for the first time (I also had to set it up on the mac's of the designers as well because I had hoped they would use it for cataloging designs, these hopes were quickly dashed). It was an investment, but worth it and in the end I learned a new skill. I could do it again now in much less time.
So, take care of it, because I don't want to hear you whine when you DO get attacked by that rabid squirrel, because it will be too late.
That was a really good post. Reminds me of Jeff. Except where in the beginning you say five great reasons ;)
ReplyDeleteYou've seen the equation 2 + 2 = 5? The idea is to use large values of 2. Therefore, one would also have to make the assumption that given large values of 1, the following is also true 1 + 1 + 1 = 5.
ReplyDeleteYou only do stupid crap sporadically? Wow, I'm impressed.
ReplyDeleteIt's a rare day for me when I *don't* do something stupid.
haaaa thanks, Wes.
ReplyDelete@Tom, I have no earthly idea what you are tlaking about.
I'm currently working on a project by myself and at first I was using source control (Source Safe), but eventually I stopped.
ReplyDeleteThe reason was the project was in such a state of flux that it was too time consuming to keep the source control stuff up to date.
Things like checking in/out code in many projects, renaming source files, adding/removing source files, etc. really adds up and becomes time consuming when things are changing so much.
What I ended up doing instead was keeping full backups of my main project folder (which contains all of the source code) on a secondary drive. This way if my primary hard drive crashed I would only lose what I had done since the last backup. I do these backups after about an average of 20 hours of work.
Of course my house could burn down, or someone could steal my computer, so I also backup less frequently to my AOL XDrive account on the internet. With this strategy, my pc would have to go poof and my XDrive would have to go poof at nearly the same time to lose almost everything (I do have some other backups in other places, but they are very infrequent and old). I think the key is to back up in multiple places so if something goes wrong short of a giant meteor hitting the earth, you can recover without losing too much.
My short-term backup process is very easy. Ctrl+C on my main project directory. Go to my D drive's saved projects directory and rename the last Project folder ProjectN, so that it becomes the last numbered folder, and then Ctrl+V, wait a little and it's done. Sometimes I've had to go back and look at old code, and it's not difficult to find what I'm looking for with this backup practice.
Just wanted to throw this out there as an alternative method that's worked for me to keep things safe and backed up when you are working on projects by yourself.
I better rank higher than Dad.
ReplyDeleteHaving onsite source code as a lone developer is such an invaluable resource as is defect tracking. If you are a consultant more then you have a responsiblity to your customer to be able to historically track and manage your projects. It also can be the kick you need during billing time to remind you of the work completed each day. While it is possible to backup your folder structure an re-open the project and revert back, structurally it slows down the process. Free tools exist as well so cost does not need to be a hinderance to implementing SC in the single developer environment.
ReplyDeleteGreat post. I blogged on this not long ago if its any help to any one. a href=http://martinsantics.blogspot.com/2009/01/five-thirty-club-source-control-for.html title=Matins AnticsSource Control for Noobs like me/a
ReplyDeleteIt's always great to reflect, and chuckle a bit at prior naivet.
ReplyDeleteYou need to have a look at some sort of spam control on your blog as they are having a field day above :(
ReplyDelete