Back to home

Archive

Blog Posts

Long-form writing, essays, and updates.

Browse by tag

Blog Post

Updated site and new blog

Hello, World. This site is still static HTML but now built with 11ty and hosted on Cloudflare Pages, rather than being handwritten HTML on GitHub Pages. This means it's easier for me to add content and will hopefully res…

Read more
Blog Post

Thoughts on PSR-7

PSR-7 contains interfaces for HTTP messages. These are like Symfony Kernel's Request and Response interfaces. Having these new interfaces would be great for the PHP community but there's a couple of issues with their cur…

Read more
Blog Post

Traits with interfaces

In PHP, Traits can't implement interfaces. They can, however, include abstract methods. These methods then need to be implemented by the concrete class that implements the trait. This allows a trait to provide some boile…

Read more
Blog Post

Notes on designing through mocking

My notes on Everzet's talk "Design how your objects talk through mocking" at PHPNW14 Everzet's Original slide deck Code sample here are using Prophecy to create test doubles Different test doubles: Mocks, stubs…

Read more
Blog Post

Strace

Quick strace command that I use all the time to see what files a process is opening: strace -f <command> 2>&1 | grep ^open Really useful to see what config files something is reading (and the order) or to see what…

Read more
Blog Post

Conway’s Game of Life in Canvas

I haven’t done much with Canvas, so I thought I’d experiment by making Conway’s Game of Life with a little JavaScript. Conway’s Game of Life is based on a grid of cells, which are either alive or dead. It has 4 simple ru…

Read more
Blog Post

Generators in PHP 5.5 (with PDO)

As the first alpha of PHP 5.5 has been released, now is a great time to play with its new features. The first new feature is generators. Generators are like very simple iterators. PDO’s PDOStatement class implements Trav…

Read more
Blog Post

PHP coding standards and style guides

The PHP Framework Interoperability Group (PHP-FIG) are a group representing most of the big names in the PHP world such as Zend and Symfony. The group has formed to encourage PHP frameworks to be more interoperable. They…

Read more