From The Blog

Testing API calls in PHP with Guzzle Mocks

I'm working on a CouchDB library for PHP, and so I needed to write some tests for it. CouchDB has an HTTP API so I'm basically making web requests and while I could certainly set up a test database and run full-on integration tests, there are a few limitations with that approach. Firstly: it means I'm testing the database as well, which isn't what I want and brings extra dependencies that make the tests harder to run. Also: I want to be able to test error cases, rate limiting and so on, that would be difficult to recreate reliably. Continue reading

Live Demo: Risks and Rewards

I'm not a huge fan of the live demo in conference talks - it's really hard to do well so I see a very large number of bad ones. Also, it's super hard work to include them in my own talks in a meaningful way because they are so difficult to pull off. I could write a very long list of reasons not to ever live demo (nobody wants to watch you type, now you are talking to your laptop, conference wifi rarely works, you could tell me three much more useful things in the time you've spent doing this ...) but in truth as developers we love the "new shiny" and it can be super helpful to get an actual walkthrough of how to do a particular thing. So if you absolutely must live demo, here's my own general plan and tactics: Continue reading

Connecting PHP to MySQL on Bluemix

Most of the PHP I write runs on Bluemix - it's IBM self-service cloud, and since I work there, they pay for my accounts :) There are a bunch of databases you can use there, mostly open source offerings, and of course with PHP I like to use MySQL. Someone asked me for my connection code since it's a bit tricky to grab the credentials that you need, so here it is. Continue reading


Talks, Articles, Podcasts, and More

Slides

The Future of Functions


CodeMotion Milan, November 2017
Slides

Becoming Polyglot


CodeMotion Milan, November 2017
Slides

PostgreSQL: Beyond The Basics


PyCon UK, October 2017
Slides

Fun with Serverless Python


PyCon UK, October 2017
Slides

Fun With Serverless JavaScript


International JavaScript Conference, October 2017
Slides

Queues With RabbitMQ


International PHP Conference, October 2017