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

just enough to be dangerous

Why I buy books from #abookapart


I just bought A Book Apart's Designing for Emotion and Mobile First as a bundle. In fact, I've been buying all the titles from A Book Apart as they become available.

I buy them because they're about things that interest me, they're well written and readable, they're concise and fluff-free.

But most of all, I buy them because the authors all just seem like such nice people.

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

Logging Lithium queries


A nice tip from Nate yesterday on #li3 IRC. If you want to know the actual queries that Lithium issues, you can use a filter to dump them.

Connections::get("default")->applyFilter(
  "_execute",
  function($self, $params, $chain) {
    var_dump($params['sql']);
    return $chain->next($self, $params, $chain);
  }
);

Habari, it's the vibe


Owen Winkler has responded to Jacob Santos' post outlining why he wouldn't move to Habari with a point-by-point attempt to change Jacob's mind. Owen was a long-time developer of WordPress and a founding member of the Habari team and so has much experience of both communities. I've only been involved with Habari for a short time, after paddling around the edges of WordPress for a little while, so my perspective is much more as an outsider.

Jacob complains about the complex file and directory structure of Habari. I've hacked the core, worked on themes and plugins, from scratch and extending others, of both WordPress and Habari. I've done a fair bit of coding over the years, but I certainly wouldn't call myself an expert. All that said, and not wanting to denigrate WordPress, there are two things that stand out for me that make Habari very attractive. First, writing themes and plugins, even in this very early stage of development, is a joy. I find things "just work" often. To me, that structure makes that hacking a lot simpler. Second, the community is simply awesome. The energy, inventiveness and support that's been flying around just in the last couple of months has been a joy to behold.

Frankly, I don't care what's happening on other projects. I'm just enjoying working on this one, even in a very minor way.

(I do think Habari could use some more tests. I don't have much experience with testing, but if someone sets up the framework and a couple of examples, I'll certainly add a bunch of tests.)