Focus Quality | Digg
“At the end of the week with Sebastian Bergmann, we had a functional test harness coupling our code to PHPUnit, and we also created tests for a few of the classes from our core framework. This resulted in tangible benefits: we have lowered our risk because of smaller code changes, and have decreased the time to release.“
Prone to errors and hard to test
“Any team that has tried to create a product of any size or consists of more than three or four engineers has experienced pains similar to ours before we adopted agile methods.“, remembers the team at Digg from the time before Sebastian Bergmann from thePHP.cc assisted them. “We needed to speed up development, shorten the time between releases, and reduce the number of bugs. When something went wrong it was fixed in a rush – instead of fixing it right. This, of course, lead to code that was quite risky.“
And the code that needs the most tests usually is the hardest to test. This was also the case here. Digg called in external assistance for solving the problem.
“We decided to contract a profound expert. As the creator of PHPUnit, Sebastian Bergmann has the skills we required in both unit testing and PHP. We asked him to assist us in moving to PHPUnit and beginning to use Continuous Integration, and booked him for his first available week. A month later he flew out from Germany to our office in San Francisco, where we spent a week with him in a meeting room massaging these new practices into our existing code base.“
Increased Quality Through PHPUnit and Continuous Integration
“The review of the existing test code made it clear to me what action was needed. I assisted with the introduction of PHPUnit through training that covered the basics for team members that had not used PHPUnit before, as well as advanced topics that were relevant to the whole team.“, Sebastian Bergmann explains his mission at Digg. “Together we planned, installed, and configured a Continuous Integration environment. I trained the team to make sure that the information collected and reported by the Continuous Integration system was understood and could be acted upon in the best possible way. Building on this foundation, I presented and explained software development processes to the team that are enabled by Continuous Integration. Finally, we wrote tests together for their software to transfer the knowledge from theory into practice.“
Clear improvements thanks to the right tools
The team at Digg got a lasting benefit out of this week of assistance from thePHP.cc: “The process itself wasn't terribly difficult, it simply required time, effort, and focus. At the end of the week we had a functional test harness coupling our code to PHPUnit, and we also created tests for a few of the classes from our core framework.“
For Digg, moving to an agile process has resulted in tangible benefits. They lowered their risk by making smaller code changes, and have decreased the time to release. “We have found having the right tools is crucial – they need to work well and should be easy to use for developers to adopt them.“
PHPUnit has proven itself as the perfect fit for the large PHP code base maintained by Digg's developers, and for the test-driven development process they wanted to implement. In the act of creating unit tests, they discovered quite a few bugs that they were able to fix relatively quickly. The number of issues they encounter during the QA stage has reduced dramatically.
The clear advantage for Digg is that code can now be developed and deployed rapidly. Digg's place in an aggressive, fluid market means that this ability to react to both internal and external factors is vital.
About Digg
Digg is a place for people to discover and share content from anywhere on the web. The social bookmark service was founded by Jay Adelson and Kevin Rose and quickly grew to be one of the leading offerings in the English-speaking market. As the business model of Digg is based on the social dynamics of the web, the size and behavior of their user base are constantly changing. This results in a high change frequency in order to stay competitive in an aggressive market.
Stefan Priebsch can offer advice when PHP projects have become confusing and unclear. Based on his extensive experience and knowledge, he will offer solutions to your problem.
- 2012-06-06
- 2012-06-06
- 2012-06-06
- 2012-06-06
- 2012-06-06
- 2012-07-16