Sunday, November 1, 2009

Hudson the Watchdog

Continuous integration is a software development practice where members of a development team integrate their work frequently. Work is integrated at least once daily. Then, an automated build tool is used to verify the integration. This detects any errors/problems with the build quickly. By integrating frequently, it allows software to be developed faster with less integration problems.

Hudson was used as the automated build tool for our watt-depot-cli project. Hudson was configured to use SVN to poll for changes made to the project repository. If changes are detected, it does an automated build of the project to ensure that it is working correctly. It also sends out email notifications if a build fails. This allows developers to be aware that something is not working correctly and that it needs to be fixed. This is good so that files with errors in them are not downloaded by other team members. Sometimes, a developer may forget to verify a build before committing to the project. Hudson prevents a broken build from going unnoticed for long periods of time.

I was able to see the benefit of continuous integration with my project by observing what happens when conflicts occur. When there are conflicts, the amount of code affected is usually minimal because the differences between files are minimal. This makes conflicts much faster and easier to resolve. The longer you wait to integrate, the more differences there may be which can make resolving conflicts a long and painful task.

One bad thing about continuous integration is that sometimes it gives a false sense of how a project is progressing. Sometimes our team was working on developing a new feature for the project and wanted to help each other fix problems with the code. We uploaded the code through SVN, knowing that there were problems with the code that we were working to resolve. A failed automated build was performed and logged on the Hudson server. This added to our cumulative build count which made it appear as though our project was having issues by the storm clouds that appeared next to our project. An outsider looking at the statistics may conclude that we are having problems with our project even though this was not the case.

Overall, I found continuous integration to be a useful practice when working with a development team. It makes integrating changes much quicker and easier. I also found that the automated notifications that Hudson sent to be useful. This is a very useful technique that I can see benefitting many future projects.

No comments:

Post a Comment