5 Reasons for Putting Your Personal Code Into Subversion

If you’ve ever programmed for an organization with multiple developers, you’ve most likely used some kind of system to synchronize, combine, and version code. Without a such a tool, changes to the same files amongst two or more people can get very confusing and hard to manage very quickly. However, even if you’re just dealing with your own, personal projects, a code repository is still a must.

1 – Versioning

One of the most powerful aspects of subversion is the ability to track changes to your code. I can’t count the number of times in the past where I’d make a change to my source and totally botch the program up. And often times, I wouldn’t realize the screw up until later on, when it was too late to remember exactly when it had started acting up. With your code versioned (using copious comments), it is easy to look through the history of changes, revert back to a version or just grab the specific lines of code you need.

2 – Multiple Backups

Though it is, of course, possible to manually back up your code, the nice thing about working with a repository is the ease in maintaining backups. First off, if you’re actively working on a project, you’ll have two copies already – your working copy, and the copy in the repository. And when you backup the repository, you’ll be grabbing all your versions and comments at the same time. Combined with having all your repositories in one location that can be easily be grabbed, this makes for an easy to manage solution.

3 – Synchronize Code Between Multiple Computers

Like many people, I have both a desktop and a laptop (well, a netbook), and when at home, I of course prefer the large screen of the desktop. But I also am a fan of enjoying a cup of tea and a little programming at the cafe around the corner from me. Because of that, having code on my netbook is a necessity. Subversion allows me to quickly and easily synchronize my code between both machines, no problem.

4 – Secure Method of Remotely Accessing Code

Related to #3, since SVN can integrate with SSH, it provides a method of securely accessing your code from anywhere in the world. Though I’ll normally sync my code to my netbook at home, if I get in a jam and ever need to grab my code from another machine, or if I forget to update my code at home, I have the ability to do so. And since it uses SSH, I simply need to map 1 port on my firewall, no crazy set up required.

5 – Integration With Popular IDEs

With Subversion being so popular, many IDEs and other tools have plugins to integrate the use of a svn repository directly into the program. Visual Studio, Eclipse, Anjuta, and Emacs all have subversion plugins/support. Additionally, Windows, OS X and Linux all have utilities to integrate SVN into the file managers/explorers (E.g. TortoiseSVN for Windows). With all these plugins, it makes using subversion a snap.

So if you haven’t already, take a day some weekend and move your source over into Subversion – it’ll take a little time depending on how much code you have, but you’ll be happy you did in the long run – it’s a fantastic tool, whether dealing with 50 developers or just yourself.

2 Responses to 5 Reasons for Putting Your Personal Code Into Subversion

  1. Chris says:

    Having worked worked with Toni, I can confirm that he has botched many programs. Of course I am kidding, but he makes a great point with subversion. I would like to add that it is also very useful when dealing with items other than source code. I am currently using it for OpenOffice files while writing a massive amount of documentation for Search Lucene API. Although I am the only person writing it, subversion allows me to easily work in multiple locations on different computers without accidentally overwriting my changes. I even have my girlfriend on subversion for her lesson plans, and it has saved her more than once in retrieving information that would have otherwise been lost and gone forever. SVN has an advanced binary comparison algorithm, so changes are stored efficiently inside the system. The bottom line is that Toni is a smart dude, so listen to him!

  2. Toni says:

    First off: Chris is the man for many reasons – two of which include: being a damn good engineer, and a Ghostbusters fan. So you should also listen to him – he has a lot of svn experience.

    Definitely a good point about non-source files as well – I keep all my electronics related files in subversion (CAD designs, schematics, firmwares, FPGA synthesis resources, etc), and documentation as well. And actually, it would be neat to see more svn plugins for non-programming related apps out there.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>