Matthew is a freelance technical writer helping businesses win over developers by creating documentation developers need, to really use their platforms to the full. He's also the editor of Master Zend Framework, where you can learn everything there is to know about Zend Framework.

Matthew's articles

  1. Getting Started with Go

    Unless you’ve been living under a rock these last few years, you’ll have heard of Go (sometimes referred to as Golang), a language originating from Google, some years ago.

    Go is slated as:

    …an open source programming language that makes it easy to build simple, reliable, and efficient software.

    Quoting another source, Go

    is a statically-typed language with syntax loosely derived from that of C, adding automatic memory management, type safety, some dynamic-typing capabilities, additional built-in types such as variable-length arrays and key-value maps, and a large standard library.

    Available for most modern operating systems, including Mac OS X, Linux, BSD and Microsoft Windows, it was conceived and initially created at Google, back in 2007, by Robert Griesemer, Rob Pike, and Ken Thompson. Each of these three developers have quite impressive pedigrees.

    Robert Griesemer was involved in Google’s V8 JavaScript engine and the Java HotSpot virtual machine; Rob Pike and Ken Thompson both worked at Bell Labs implementing the original UNIX operating system.

    Most programming languages, especially one with such a strong C heritage, can be difficult to get started with. Go on the other hand, is quite the opposite. And in today’s tutorial, I’m going to show you how to get started developing with Google Go, right from installation to a running application.


    Whether you’re on Mac OS X, Linux and FreeBSD, or Windows, Go is easy to install and configure. I’m assuming in this tutorial that you have a UNIX/Linux operating system. When I first installed Go, being on a Mac, I used the latest package file.

    But you can just as easily install, from source, using the following commands:

    tar -C /usr/local -xzf go1.2.1.linux-amd64.tar.gz
    export PATH=$PATH:/usr/local/go/bin

    If you’re not familiar, these will extract a copy of the go files, from go1.2.1.linux-amd64.tar.gz, to /usr/local/go in your filesystem, and add the bin directory within it to your profile path.

    Alternatively, if you’re on Windows, download and run the MSI Installer.

    When the installer’s complete, you’ll find the installed files under c:\Go; and the installer should have added c:\Go\bin to your PATH environment variable. You may want to check, just to be sure though.

    Configuring Your Environment

    With that done, we have the binaries required to begin. But we need to ensure that our environment’s also ready, which requires one more step and a bit of background.

    Go development uses the concept of a workspace, which contains the source files (src), compiled binary files (bin) and packages (pkg).

    The source file directory structure, generally, models open source code repositories, such as Github. So a typical source directory could look as follows:


    You can see that under src, I’ve linked to my Github repository, called sitepoint, and in it is one file, hello-world.go.

    I could have multiple repositories, and link to multiple hosts, including Bitbucket and Codebase. By taking this approach, I believe that Go inherently keeps code very well structured and organized.

  2. Interview: Tom Oram and Rob Allen

    This entry is part 2 of 2 in the series Can Great Apps Be Written In PHP?

    In our second interview, we talk to Tom Oram, who works for a small development firm in Wales and Rob Allen, from Nineteen Feet.

    These two developers have a solid wealth of PHP experience and knowledge and have helped me refine my ideas and approaches on many occasions. With that, we’ll start with Tom.

    Tom Oram

    What lead you to PHP?

    A job. I was offered a job using a language I knew nothing about called PHP. It was PHP version 3 at the time, so much less advanced than it is now. Since then, I’ve been using PHP almost every day of my working life.

    What have been the things about PHP that bit you?

    In previous versions I’ve had various things which have caused confusion and frustration, most notably references and object copying in PHP 4.

    However in PHP 5 I don’t really have anything that really catches me out. There are, however, things which I think could be improved or added to make the language easier and more consistent to use.

    What have been the highlights or redeeming features

    I guess the best thing about PHP is the speed in which you can get going. You can have an idea and very quickly try it out while at the same time it’s very well suited to larger and more complex projects as well.

    What are the compelling PHP features for you?

    For me I love interfaces and the fact that static typing is becoming more and more possible while still allowing dynamic typing.

    What do you want to see added to the language?

    • Type hinting for scalar parameter types
    • Type hinting of return values
    • Nested classes

    Why PHP over Ruby, Python, Go, etc?

    Honestly I think they all have their own pros and cons. In many ways I think the other languages are designed better and are more consistent.

    However if you’re used to programming in a statically typed language (especially Java) then PHP might seem easier to relate to than Python or Ruby.

    Do you see yourself moving to another language in the future?

    I use other languages all the time, and if a job is better suited to another language I will use that. However for web-based projects I always reach for PHP first, I currently have no intention of changing that.

    Do you have a custom framework/setup?

  3. Can Great Apps Be Written in PHP – An Interview Series

    This entry is part 1 of 2 in the series Can Great Apps Be Written In PHP?

    I read an old post, circa 2010, on the MailChimp blog a little while ago, about their experience using PHP.

    It struck a chord with me, because the sentiments they shared I’ve felt myself, and heard echoed many times over the years. What are these sentiments, you may ask?

    They’re the ones which infer that PHP, despite all its successes, really isn’t a true programming language. They’re the ones which intimate that, no matter how good you are, no matter what you’ve achieved, if you’re a PHP programmer, well, you’re really not a true developer, yet.

    They’re the ones which suggest, or is that presuppose, that you should really become one of the cool kids developing in Ruby, Python, or Go; basically anything other than PHP. After all, what can you really do with PHP, right?

  4. Composer Cheatsheet

    Unless you’ve been living under a rock, today’s PHP isn’t your grandmother’s PHP; it’s an entirely different, much more elegant and mature language with countless improvements and additions.

    One of the key additions is Composer, the de facto standard for managing PHP project dependencies which, by default, gives you access to hundreds of ready-made libraries, via

    I’m not going to go over how to use Composer, as it’s been covered so well here on SitePoint already; especially by this article, by Alexander Cogneau.

    Instead, I’m approaching it from a different angle, taking you through the excellent Composer cheat sheet, which I came across recently.

  5. Build Virtual Machines Easily with PuPHPet – Part 2

    In part one of this series, we considered the problem of how to create and manage development environments in a way which was simple, repeatable, and (even) efficient. It's a problem which I'm confident we've all run in to from time to time. The solution was a relatively new tool called PuPHPet. If you missed […]

  6. Build Virtual Machines Easily With PuPHPet

    Does creating and managing development environments frustrate you, slow you down, or distract you from development? Do you have issues because your development and deployed environments differ? If so, I've got the solution for you – PuPHPet! Introduction I can't speak for you, but one of my pet peeves about software development is environments. Whether […]

  7. One-click App Deployment with Server-side Git Hooks

    Synopsis This post shows the user how to deploy a simple website using no more than a git post-receive hook. It covers just enough background information so that the reader can go further and expand their knowledge as their time permits. One-Click Deploy How often do we say preach the mantra of one click deployment? […]

  8. Inattention Blindness – Missing the Obvious

    You’ve been staring at your code for hours, trying to figure out why it’s broken, when a coworker comes over to help and finds the problem in an instant. Why was the problem so obvious to him but not to you? Let’s discuss the interesting phenomena related to your ability to perceive things: inattention blindness.