The Artisan Files: Graham Campbell


August 15th, 2014

In this weeks Artisan files I had the pleasure of interviewing Graham Campbell. Graham is a developer, coding standards advocate, and wages war against white space. ;-)

It seems like every PHP project on GitHub has at least one pull request from him.

Can you tell us a little about yourself? How’d you get into web development?

I’m currently 17 years old, and live in the North East of England. I’m about to start my final year of A- Levels taking maths, further maths, physics, and possibly chemistry. I’ve been writing software for 6 years now, and php for 2 years. I started off programming with, and later, java. I moved to php in search of writing truly useful software. My first year with php was without a framework, or any other libraries. I wanted to experiment with implementations myself without any outside input.

Just over a year ago, I came to a point where I was writing a large amount of abstractions on php’s database libraries, and thought: “There’s got to me a better way of doing this? Surely this has been done before?”. Then I discovered Laravel 4.0 this time last year, and decided that, actually, I would embrace third party libraries. From that point on I’ve never looked back, but I’m pleased that I had initially done all that work myself, because I had learnt a lot along the way, and I don’t think the time had been wasted.

With Laravel I notice you have lots of white space and code standard fixes. What drives you to do this?

Around the time I discovered Laravel, I was curious about other libraries, coding standards, and actually, how to go about using other people’s libraries in my code. At my point of entry, we were getting PSR standards and more and more people were caring about testing, best practices, and using composer. I noticed that Laravel had inconsistencies with new lines at end of file, trailing whitespace, dodgie composer version constraints, inconsistent docblocks, and wanted to help sort it out. It’s worth noting my contributions to Laravel do extend beyond whitespace fixes!

Laravel is at a point now where most of the inconsistencies are fixed, and I’m trying to ensure other pull requests don’t introduce new issues. An issue popped up on Laravel’s bug tracker the other day suggesting we need a more automated way to fix these, and alert contributors if they have cs issues in their pull. Currently, some people are complaining that they were getting too many emails due to me pointing out cs issues on people’s pulls. An automated system would be preferred where we can use GitHub’s status api to mark the commit as broken if it violates Laravel’s coding standards. Scrutinizer CI was suggested, and I’m in favour of that; I use it on my php projects.

Looking at your GitHub profile you have lots of repos. How do you find time to work on all of it?

During term time, I normally have time in evenings and weekends to work on projects. During my outrageously long Holiday periods, I have large amounts of time to work on projects, so that’s how I do it. I now have 37 repos on GitHub (excluding forks), and 23 of them are actively maintained php repos, available on Packagist. I must have contributed to a few hundred projects on GitHub by now, and it’s a shame GitHub has no way of giving me a complete list of the repos, because I’d be really interested to see it.

My flagship project is Bootstrap CMS. It’s got around 230 stars right now. My other repos that have gained the most traction are my Laravel Markdown, Flysystem, HTMLMin, and Security packages. You can check out my GitHub for a full list.

What is your typical day like?

A typical day during term time starts with me getting up at about 06:30, getting ready, and leaving for school at around 07:15. It’s a 50 minute drive to my school in Durham. The day officially starts at 08:30, and ends at 16:30, but I’m often around until 18:00. I’m an avid drinker of Starbucks coffee, and there’s one just down the road from the school, so that’s a good place to go and relax. I’ve also pushed a few commits from that starbs too. I’ll get home at around 19:00, eat, do some work, maybe write some code, reply to issues, spam whitespace pull requests, and watch a bit of telly.

Can you tell us about your local machine? What apps do you use every day?

Graham Campbell Desktop

I’m a Firefox beta user, and I mainly write code in Sublime Text 3. I use Windows 7, and most of my work is done on my laptop. I’ve got a couple of Ubuntu 14.04 VirtualBox VMs set up where I test things on php 5.5 and hhvm. I also share a droplet with a friend, and can push code to it.

Do you have any hobbies outside web development?

Besides drinking coffee, music is one of my hobbies. I have grade 8 clarinet with distinction and am working towards a diploma. I’m working towards grade 8 piano too. I heard that Taylor used to play the clarinet at school too (I think he mentioned it in a podcast). I tried golf a few years back. That was fun, but didn’t last long. We ran out of space in the lake for my golf balls! I also spent a couple of years doing some coxing for my school boat club.

If you could be a super hero what would you be and what super power would you have?

The super power of squashing whitespace. Ok, seriously? I guess I’d be Spider-Man purely because it would be ironic given my hate for spiders.

Filed in:

Eric L. Barnes

Eric is the creator of Laravel News and has been covering Laravel since 2012.