PHP Interview With Ian Barber A Developer Advocate For Google+ – Try To Dip Your Toe Into Other Languages As Well

About This Interview

This is the #17th set of PHP Interview to help aspiring PHP developers and PHP fans alike to get inspired by listening from those PHPeople who are already highly involved into the PHP Ocean and *being there* taming the waves and surfing better than ever to make themselves an Awesome PHP Expert both in their own eyes (for self-accomplishment) and for the PHP Community.

On the other side, this is an opportunity for new PHPers to get to know their “PHP Elders. I hope you will derive as much fun to read my interviews as I’m having by interviewing those awesome PHP people.

A Small Intro..

Ian Barber - phpir.com
Ian Barber – phpir.com

In this edition I talked with [Ian Barber  @ianbarber] who is a developer advocate for Google+. Ian has been working with PHP for Virgin in the UK and has an amazing run of experience in the PHP world; delivering presentations at a number of conferences – his recent talk entails “Building a Firehose” at [PHP Tek 12 @mtacon]. Some of his interesting presentations on slideshare includes:

  • How to stand on the shoulders of giants
  • Debugging: Rules And Tools
  • ZeroMQ: Messaging Made Simple

And Now The Interview…

>> Please tell us a bit about yourself

These days I’m a developer advocate for Google+, working out of the Google offices in London. Prior to that I had the pleasure of working with a lot of brilliant PHP developers on some interesting projects, and I have spoken at a number of conferences in Europe and further afield. Some of my main interests are in machine learning & search, and I’ve blogged (though not for a while!) about both over on http://phpir.com. I also maintain the PHP extensions for libsvm – a powerful machine learning library based around Support Vector Machines, and lapack, which is an excellent linear algebra library (though that extension is barely scratching the surface of the library so far). However, these days I spend a lot of my open source time around ZeroMQ – a brilliantly fast and easy messaging library, with bindings for every major language (of course including PHP).

>> How you started with PHP

To be honest it’s a little hazy, but I believe it was while I was at university – I used to play a lot of Quake 3 online, and got involved with the leagues at Barrysworld, a “gaming service provider” – they offered the servers and various other bits and pieces for playing Q3, Counterstrike, that kind of thing. I ended up helping out a little on the CMS that powered some the league sites, which was a custom PHP app called Neville, which I believe was written by one of the Barrysworld guys. Trivia: I know at least one other PHP person came out of those leagues: [Ozh Richard @ozh] (http://planetozh.com/blog/), a notable WordPress plugin developer and author, and lead on the YouRLS URL shortener.

>> Your LAMP stack comprises.. ?

For personal use I generally use a Vagrant basebox ubuntu VM, plus whatever versions are current in base for Apache and MySQL. I spend enough time messing with extensions I tend to have the latest version of PHP built from source with the debug flags turned on. For professional use my preferred option would be NGINX+PHP-FPM on a debian based distro, but I would say the majority of my projects have ended up being RHEL and Apache based, for various reasons. I’m not overly picky most of the time!

>> How do you find PHP now as compared to when you first started

It’s hard to say, as I (hopefully!) have a broader view of PHP now than when I started. That said, I don’t think there can be any argument that PHP itself is faster, more efficient, more stable, and more powerful than it has ever been. Features like closures, traits, and maybe now generators are all opening up new ways of writing code, and it’s great to see that come through. I think the role of PHP is changing as well – as we see more mobile application and Javascript based web applications, we’re seeing a shift to providing data rather than providing markup, which pushes and tests different parts of the language and puts different requirements on developers.

>> Based on your experience, what are the good and bad parts of PHP

The good part is definitely the speed with which you can get going. The fact that PHP is designed for the web just makes it incredibly easy to start building sites with. The documentation is also a massive benefit, it’s comprehensive, and backed up with a huge number of blog posts, books and tutorials. In general the fact that PHP is so popular means there are always people who’ve hit problems you have, and have written open source code or articles that cover your area.

The bad side is that the language itself is a bit of a mess, as it has been assembled from many different sources. This can make it confusing for developers – the functionality you want isn’t always predictably named, for example. It also make it difficult to do things like provide alternative implementations – if you look at something like Quercus or Hip hop, there’s a always a line of support, and plenty of
room for edge cases.

>> What would be the Top advice to a PHP beginner

Work with the best people you can – if you can pair or be on a team with them, all the better. If not, get involved with an active open source project: nothing improves your coding faster than timely specific feedback about real world code. Try to dip your toe into other languages as well – particularly Javascript.

>> To someone who wants to become a better PHP developer..?

In general, the same as above. It’s also worth saying that beyond a certain level of experience, it’s less about being a PHP developer, and more about being a developer. The design and structure of software, the method of releasing and managing applications, the testing and verification of systems, all of these topics are general skills that transfer very well between languages, and are just as important as depth of knowledge in the language and framework being used. At the end of the day, the point where you type code into an editor is the tip of a spear, and it’s driven by all of the other skills and concepts that you build up over time.

>> The best PHP book you’ve read

That’s difficult, as the language changes fast enough things go out of date quickly.

  1. Sara Goleman‘s Extending and Embedding PHP is wonderful for anyone interested in how PHP itself works,
  2. and I really enjoyed [Derick Rethan @derickr]’s Date & Time book – it’s a slim volume, but very helpful if you are hitting timezone issues.
  3. For beginners, I’d recommend [Lorna Jane Mitchell @lornajane], [Matthew Turland @elazar] and [Davey Shafik @dshafik]’s PHP Master – it seems like the perfect introduction if you want to start off doing things right.

>> A PHP blog or resource you highly recommend

[Chris Cornutt @enygma]’s [http://www.phpdeveloper.org/ @phpdeveloper] is a wonderful source for curated news and articles from across the PHP community – he puts a lot of effort into selecting the best stuff, and I’d highly recommend it to anyone developing in PHP.

>> The IDE that you use

I do most of my coding in Textmate, largely because I switch between different languages reasonably often, and TM gives me a nice experience doing so. I’m also pretty comfortable using vim, if I’m not working on a mac. I am not a great person to look to for IDE advice
though – I’m always in awe of the guys that have mastered their editors of choice, and constantly intending to sit down and really do so.

>> How do you debug your PHP code?

  • I tend to use XDebug and a lovely little mac client called MacGDBp – it gives you all the step debugging, breakpointing and so on, wrapped in a nice GUI package.
  • For something extension or library related, I do use GDB on the command line a lot, and the joy that is valgrind.
  • It is only fair to say that I am not above var_dumping out a bunch of stuff as well.

>> A unit test framework you recommend using?

  1. I’ve used [PHPUnit @phpunit] a lot, and it’s certainly my go to library.
  2. [Marcello Duarte @_md] has been putting in a bunch of work on [ http://www.phpspec.net/  @phpspec] – and I would certainly take a look at that if starting a fresh project! It’s a BDD based framework, so it requires a slightly different way of working.

>> One function that you like (or which you tend to use frequently)

Hard to pin it to one function, but there are some things which I think PHP does better than almost anything else. Streams, Datetime, filter_var and hash are all examples of really powerful functionality that is really easy to use, excellent developer experience.

>> One PHP person that you admire and what strikes you about him/her

This is a community filled with great people! Just to subvert the questions somewhat, two people I have really come to admire this year are:

  1. [Laura Beth Denker @elblinkin]
  2. [Chris Hartjes @grmpyprogrammer]

– they’re both excellent advocates for software quality and testing, and capable of sharing their ideas in novel and interesting ways, which is such a big part of getting them across.

>> Are you part of any PHP User group?

I try to go along to the [London PHP user group @PHPLondon] as often as possible – it’s a really great community with a lot of attendees each month and some fantastic talks.

In August Dave Gardner spoke about distributed IDs, and I believe for September [Nils Adermann @naderman] is talking about Composer. The site for the group is http://phplondon.org, and it meets the first Thursday of every month.

>> Which was the worst programming mistake you did?

There’s a lot of mistakes to choose from! Many of them center around failing to check basic assumptions. For example, the other day I was building an application in Go on Google AppEngine. I hit a problem in development, and figured it might be because my version of AppEngine was out of date. I grabbed a new one, started playing around and immediately everything blew up! I checked through the stack trace and saw that it wasn’t setting up the Go environment properly. After about an hour of searching for various error strings and getting nowhere, I eventually twigged that I had downloaded the Python AppEngine build.
Downloading the right one immediately fixed the issue.

On that note I can strongly recommend the book Debugging by Dave Agans – the best guide to fixing stuff you’ll ever read!

>> Things that you’ve learned from being part of The PHP Community

  • I’ve learned that a technical community can be warm, funny, exciting and unpredictable.
  • I’ve learned that people will give up their weekend and evenings to explain something, fix something or help someone, and that there are people who will still give them a whole lot of crap for their trouble.
  • I guess, more than anything else I’ve learned that the people who make a difference are the ones that show up and stick it out.

>> If you could change one thing with PHP, that would be…?

If we’re talking wild, blue sky, throw logic to the wind type changes, I’d have the string and array search functions use the same haystack, needle parameter order.

>> If you had to go back in time, would you still choose PHP? What would you do different?

I would absolutely choose PHP again – it was, and remains, the right tool for the kind of jobs I was doing. I don’t think PHP is the right tool for every job, and I don’t think any programming language will fit that bill. One of the things that I appreciate about the PHP
community is how open it is to new ideas, and how unconcerned it is with the origin of those. No one in the PHP community would bat an eyelid if you wrote your app in PHP, tested it with Java, deployed it with Ruby and maintained the systems with Python. That attitude is
very powerful, and not as universal in software engineers as it could be.

>> The best conference you attended would be..

That’s an incredibly tough question! Each conference has it’s own flavour, reflecting the local community and the organisers’ intents, so it’s often a bit of an apples to oranges comparison.

Given that it’s right on my doorstep I have to give some love to the [PHP UK conference @PHPUKConference], which is in London every February and has been getting better and better every year, and also to [PHP Northwest @phpnw], which is the next PHP conference I’m speaking at and is always a really great time – that’s coming up in October, in Manchester.

>> Can you please share the good, and may be not so good moments, of being part of all the conferences you attended

The good is undoubtedly hanging out with smart people, getting to know developers from all sorts of different companies and backgrounds, and getting to share some thoughts with other people. The downside is usually spending time in airports on the way too and from. Other conference failures are usually my fault – such as misjudging the footwear required given the snow in Montreal at Confoo one year!

>> What are the main aspects of conferences that can really help a PHP guy to get better in his progression

It’s the exposure to a diversity of ideas. It only works if you actually hear those ideas though, so it’s important when at conferences not only to go to the talks, but to speak to people in the breaks and around the sessions as well. Try to go to some sessions that don’t seem like they’re relevant or that valid for you, or that you have no idea about – they’re they ones where you might learn something new that gives you a great tool for the future. In general, it’s hard to fully grok something at a conference, so you just want to be a sponge collecting as many new concepts and tools as possible for more investigation later.

>> How do you time manage all the stuffs that you do, coupled with your personal life?

Pretty badly! I am a big fan of the Getting Things Done system, but one thing I have realised is that knowing what you have to do next is not the same as actually doing it. That means if you get in the mood to do something, it’s well worth taking advantage of that and getting as much done as you can. The other thing is just creating a space to focus – don’t try and worry about doing too many things at once. A half hour of quiet time in front of a computer without email or social networks is worth 3 hours on the sofa with a laptop in front of the TV.

>> The day you realised “You’ve made it to the A-List PHP arena” ?

I doubt that I’d fall into anyone’s “A-list”, but I do remember the first time someone told me they had built something after seeing me speak about it – there is very little more satisfying than seeing ideas you’re interested make a difference to someone. I’m always massively grateful to the people who come along to a talk or read something I wrote, because they’re giving an idea a chance.

>> Why you are successful and why others are not?

I don’t think anyone really falls into a successful/unsuccessful bucket like that. There are always people who write better code, or make more money, or are better known than you. When I look at the people who have been doing this a long time, the thing that strikes me is how much they’re still interested in new things, still looking for challenges, still willing to put in work to get things done, and still, generally, having fun!

Now Do Your Part!

1) Help diffuse this interview to the PHP ecosystem – Share, tweet and spread the word to your audience ==> That would be a FREE way to thank me 😉

2) Make a comment below using the comment form – I’m sure you can at least say 1 word about this interview

{I’m thankful to your response(s)!}


2 Comment(s)

  1. “I’d have the string and array search functions use the same haystack, needle parameter order.”

    I couldn’t agree with you more!

    Having said that, I still love PHP and use it for anything web application related, though I do end up writing more Python at my job these days 🙂



Leave a Reply to Suman Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.