Blog


  1. Explaining MySQL's EXPLAIN


    The MySQL explain plan is a great tool to help developers and database administrators to improve the performance of specific queries happening against a database. It is very easy to use, but its output can be confusing, so I thought I'd show a very simple example.

    Read more

  2. POSTing JSON Data With PHP cURL


    I got this question the other day: how to send a POST request from PHP with correctly-formatted JSON data? I referred to the slides from my web services tutorial for the answer, and I thought I'd also put it here, with a bit of explanation. After all, publishing your slides is all very well, but if you didn't see the actual tutorial, I often think they aren't too useful.

    Read more

  3. Handling SQL Errors in PDO


    I love PHP's PDO (PHP Data Objects) extension; it gives a consistent, object-oriented interface to handling all kinds of relational database backends. One thing that annoys me is that the MySQL driver for PDO defaults to a silent error mode which can make SQL errors tricky to spot!

    Read more

  4. Simple CRUD with MongoDB


    When I meet a new technology, I like to experience it "just as it comes". I'm happy at the command line and I like to type actual commands and see man pages before I use any wrappers or helper tools. So when I met MongoDB for the first time, I did exactly that. This post shows those first steps of creating a database, and inserting, reading, deleting and updating data.

    Read more

  5. Missing Kernel Source when Installing VirtualBox


    I'm creating a virtual machine to use for my upcoming training courses to get around issues trying to get machines set up in a hurry on the day. I haven't used VirtualBox before but since it has free clients for Windows/Mac/Linux I thought I'd give it a go.

    Read more

  6. API Serving JSONP


    disclaimer: I am not a client-side developer, and I don't write javascript. However I am committed to supplying useful APIs of all kinds, and JSONP falls into this category

    Early in the development of the new Joind.In API, someone else started consuming the service to populate the javascript widgets they were making*. Since these scripts are intended to be used on many external pages, and they retrieve data from the joind.in API, cross-domain issues were a problem.

    Read more

  7. Flattr-y Will Get You Everywhere


    For many years, I've been convinced that micropayments are the way of the future. The internet has brought us so much that is freely available, but often it's nice to show some appreciation for something someone has given us. This is true both for the open source software without which I couldn't do my job, and for the excellent content that makes me think or guides me through a particular issue.

    Read more

  8. PHPCon Poland: Conference Report


    At the weekend (yes, this took all week to write), I was on my first ever visit to Poland, in order to speak at PHPCon Poland. They contacted me early in the year to ask if I would consider going along to give my talk Teach a Man to Fish.

    Read more

  9. My Book is Published: PHP Master


    PHP Master Cover ShotI am truly delighted to announce that "my" book is published. Technically it's really "our" book since I had the pleasure of co-authoring with friends and PHP rockstars Davey Shafik and Matt Turland. The book is "PHP Master" and it's a broad-ranging text covering a series of topics that we felt were relevant to PHP developers who aren't beginners, but who are looking to fill in some gaps and get a good grounding in creating whole applications in PHP.

    Read more

  10. UML Diagrams with Graphviz


    I worked on creating some plausible-looking diagrams for representing object inheritance (this is for my forthcoming book). Since I know I'll forget how I did it, I wanted to share while I can remember!

    Read more

  11. Announcing Training Dates for November


    I'm teaching some new public courses next month (in Leeds), so I thought I'd mention them on the blog in case anyone is interested. I'm super-excited because this is the first time I've delivered my own training content as a public course, so even if you aren't in the position where you work with lots of people who need the same training, you can pop along!

    Read more

  12. Ada Lovlace Day: Laura Thomson


    Happy Ada Lovelace Day! Today we celebrate geeky female role models, and I'm going to write about someone I consider a friend. It feels a bit strange to do so (and I didn't actually tell her beforehand), however having been written about before on this special day, I know I've never been offended by such flattery and so I hope she won't be either :)

    Read more

34 of 92