echo "hey, it works" > /dev/null

just enough to be dangerous

Quality PHP: Laura Thomson


PHP quality background.

Laura is the co-author of the hugely successful PHP and MySQL Web Development, and a Senior Software Engineer at Mozilla Corporation. Thanks for being the first respondent, Laura.

In terms of PHP, what does quality mean to you?
This is a great question, and one I often ask in interviews. Quality PHP is free of the usual set of code smells. It's been through code review and has a set of meaningful tests with a reasonable level of code coverage. It has minimal but sufficient documentation. You can detect good quality PHP by looking for:
  • happy developers
  • new developers becoming productive quickly
  • other users forking or contributing to your projects
  • your application being robust and not failing in odd and intermittent ways
  • devs are able to modify the code and add features quickly, without forensic spelunking to understand how it works
  • your code lacking that fragile library that nobody wants to maintain or modify in case they break it
What tools and processes do you use in your development to ensure quality?
The main things we do are:
  • Patch review. (This is common among open source projects.) Writing code that you know will be read by others ups the quality in general.
  • Security review for new projects or features.
  • Continuous integration and automated test-on-build.
  • Mozilla's awesome WebQA team run a set of automated tests using Selenium, fuzzers, and also do a lot of manual testing.
Are there tools or processes that you'd like to include in your toolbox that you haven't used yet?
We're looking at moving towards continuous deployment during the next few months and are currently exploring the requirements for that.

Quality PHP


The great thing about PHP is that it lets people put together web sites easily and quickly. Along with the vibrant community, it's one of the main reasons for the language's popularity. A side effect of this ease of production is that PHP hasn't developed a culture of quality, in the business sense.

What do I mean by quality? That software does what it's supposed to do, reliably and repeatably. It's maintainable and it's not fragile, so isn't prone to breaking when changes are made. Despite the lack of a culture of quality, some of the biggest web sites on the Web use PHP, and internally they must have processes to ensure quality.

I'd love the quality tools and processes to become more widely used in PHP, and so I've asked three questions of a bunch of Important People in the PHP community, people I respect and admire. In terms of PHP, what does quality mean to you? What tools and processes do you use in your development to ensure quality? Are there tools or processes that you'd like to include in your toolbox that you haven't used yet?

I'll post responses as I get them.

Laura Thomson

If you have a suggestion of someone I should ask, please let me know; identica, twitter, email