Monday 13 April 2009

Repositize it!

If you write or maintain code for any number of projects on an ongoing basis, then you should be using a version control system. If don't already use one, then quite simply, you're needlessly working without a net. Shame on you!

The benefits of using a version controlled code repository include:
  • Keeping track of changes in source code/documentation
  • Maintaining historical versions of source code/documentation
  • Stopping developers from tripping over each other's changes
  • Assigning authorship to changes
  • Storing comments regarding each change
  • Branch and tag management
  • Rolling back to "clean code"

There are a number of version control systems available with the most common being Concurrent Versions System (CVS) and it's assumed successor Subversion (SVN). Subversion is my preferred system due to it's atomic commits (they either completely succeed or completely fail).

Golden rules to using a version control system
  • Always update from the server before you commit your changes
  • Always comment your changes (I like to use the "line 36: fixed text typo" format)
  • Use logins and passwords
  • Don't forget to back up your server regularly

Related links:
Tortoise Windows shell extensions
If you're working on Microsoft Windows you should check out TortoiseSVN and TortoiseCVS. These free clients integrate into Windows Explorer. TortoiseSVN won the SourceForge.net 2007 Community Choice Award for Best Tool or Utility for Developers.

No comments:

Post a Comment