Version Control

When building software you often make a lot of changes to your code, only to find out is isn’t working anymore. What change broke the code? What was the previous, working, version like? Can I go back in time to undo my changes? And if you are working in a team: Who made the last change to the code?

All questions that cannot be easily answered, except for the ‘go back in time’ one. You can’t (yet). This is where version control comes in.

I have worked with a number of version control systems and they all have their pros and cons.

First there was manual backing up of files, before you start working on a program. This works perfectly if you are the only developer on the project and if you are very precise in what you do. Problem is when you accidently overwrite a working version of the code with a buggy version.

Then there was Microsoft Visual Sourcesafe, which was a lot better already, because before you could change a program, you had to check it out (like getting it from a safe (hence the icon)) and when you were done with it, you checked it in (put it back in the safe) so other people could see you changes and continue working on them. I made it nearly impossible for two or more people to work on the same file at the same time. Biggest problem with VSS was (IMHO) that there was only a Windows client available (at that time at least). Luckily this was the main development platform for lots of Oracle developers at the time, and my personal favorite IDE PL/SQL Developer by Allround Automations has a nice plugin available so you don’t have to leave your IDE to perform the check-out and check-in of your code.

After this there were some other tools I used, mostly in the freeware world.

At my current job we decided to use SubVersion which is open source and has a lot of clients available, for different platforms. I mainly use TortoiseSVN which has a nice Windows explorer integration. One of the main advantages of this tool is that multiple developers can work on the same file and when they check-in their changes, the tool tries to merge the files automatically. If it finds stuff it cannot merge automatically it prompts the user to decide what change should be kept.

The biggest problem when developing code in a team is working on the same file simultaneously. Most of the tools available overcome this problem either by making it virtually impossible to simultaneously work on the same file or by automatically merging the different versions.

Redgate is currently developing Source Control for Oracle. What is needed for this tool is to be decided by us, the developers. Make sure you visit the site and fill out the survey to have a better chance of you desires to make it into a version of the product.

And, if you are at KScope12, stop by their booth to see the product being used in a live development environment.

Ref:

http://en.wikipedia.org/wiki/Microsoft_Visual_SourceSafe

http://en.wikipedia.org/wiki/Apache_Subversion

http://en.wikipedia.org/wiki/TortoiseSVN

http://www.red-gate.com/products/oracle-development/source-control-for-oracle/

Leave a Reply

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