Personal Blog
Continuous Integration
On a daily basis, how many of you: Write unit tests? Perform unit tests? Check that code follows standards? Check that code is optimized with minimal repetition? Checkout, build, compile, release, and publish multiple builds (e.g. development, nightly, staging, production, training, etc.) in multiple formats (pushed live, tar.gz, .zip, etc.) Analyze results, produce, and share reports of all this?
Realize that if you are not, your presence is a high cost to the project in terms of the cascade of poor quality, and additional time you place as a burden on your customers and end-users. (see also: six sigma; cost of poor quality)
Maybe you have heard of the terms before, but you just haven’t taken the time to do it personally. Well that’s precisely the problem–you shouldn’t be the one doing it at all–your software should.
Define continuous integration: a software development process emphasizing frequent, comprehensive, and automatic integration (e.g. checkout, building, compiling), testing (e.g. unit testing, code analysis), and delivery (e.g. scheduled releases).
By automating these processes, you speed up development time and ensure important steps are being taken that are otherwise so tedious they are often avoided or forgotten.
CI is often used in, but not limited to, Agile methodology. Extreme Programming methodology teams also integrate and build the software system multiple times per day to keep all the programmers at the same stage of development. Usually each developer integrates their code into the code base at least daily.
Here I found an excellent presentation on Continuous Integration as it relates to PHP. In it, Wilco explains a few of the benefits of practicing CI in your software development projects:
- The earliest possible detection of problems in the software
- Detection of integration problems, no last minute hiatus before releases
- Early warning of broken/incompatible code
- Early warning of conflicting changes
- Immediate unit testing of all changes
- Constant availability of a “current” build for testing, demo or release purposes
- The immediate impact of checking in incomplete or broken code acts as an incentive to developers to learn or work more incrementally with shorter feedback cycles
Check out CI projects like: CruiseControl (Java), Rephlux (PHP), Damage Control (Ruby), and a whole slew of others. As well as the links off of their individual pages. Another good post about this is here.
While you’re at it you may find this list of 50 Extremely Useful PHP Tools interesting.
| Print article | This entry was posted by Mike Smullin on February 6, 2010 at 12:17 pm, and is filed under Development. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |

