Politics Often Hold the Community Back

Share this article

In this part of the interview series, I’m interviewing this channel’s editor, Bruno Škvorc, along with the feedback from Gary Hockin from Roave. We’ll start with Gary.

Gary Hockin

What lead you to PHP?

Simply, classic ASP. I was working as a general dogsbody in a huge steelworks in Port Talbot, and we were paying thousands of pounds for licenses, to display data from an Oracle database on lots of screens.

I started looking into ways of displaying that data on multiple screens for free – each machine had IE6 (at the time) so I explored ASP.

From there I realised that I loved the role of web development and quickly learned PHP in my own time, as I realised then that open source was where the future was.

What have been the things about PHP that bit you?

In a positive way, originally it’s the fact that you can create these amazing interactive webpages which you can push to a $10 shared host and point your friends to it to play with.

When I was a “kid” that was what kept me coming back to messing around with PHP, and ultimately why I shifted my career around it. More recently it’s the community. The community is simply amazing.

What have been the highlights or redeeming features

Of my career in PHP? I touched on it early, the community has been truly an epiphany for me. About 5 years ago I was sitting around as a Ghost Developer (http://www.troyhunt.com/2013/02/the-ghost-who-codes-how-anonymity-is.html), working in semi-object-oriented PHP, when I suddenly realised that someone HAD to have created a standard framework for building PHP applications.

A quick Google led me to a list as long as your arm, but because we were already using Zend Guard on distributed servers I decided to use Zend Framework (1). From there I found the #zftalk IRC channel, and from there I got totally immersed in the ZF community.

Since then I’ve been involved in the PHP community at large and attended and spoken at many conferences. I’m probably earning £10-15k per year more since I discovered the PHP community.

What are the compelling PHP features for you?

Of PHP, honestly, I don’t really have any compelling features. Everyone knows that PHP is the glue of the web, and it should be treated as such.

Realistically I love the way you can just push something into Redis for later retrieval, or dump some logging into ElasticSearch and forget about it. It’s compelling features are all based around how easy it is to build scalable, dependable applications.

What do you want to see added to the language?

Scalar type hinting. A contentious point I know, but honestly I think it would solve so many future problems that it would be well worth the hassle. On a side note, I’d also like to see some more standard PHP objects.

It’s crazy that every framework/library writes its own HTTP Request and Response object, surely this could be included in the SPL. Or maybe even the FIG could create some interfaces for that. FIG have done some great work so far, but I’d love to see that go much further.

Why PHP over Ruby, Python, Go, etc?

Guess – community of course. I can get answers from my peers in a few minutes and nobody wants anything back. I work a bit in Python and do a fair bit in Javascript (client side that is), but honestly I feel as if I’ve paid my dues in the PHP community (specifically the ZF community) and can get help and direction from people much, much smarter than me. Why would you give that up?

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

Never say never. I’m constantly playing around with other languages (when I get the time). Moving into Node.js seems like a given at some point. I’m not actively looking at moving into another language but I certainly wouldn’t deliberately not move just because it’s not PHP.

Do you have a custom framework/setup?

Everyone writes their own framework at some point, and I’m no different. I wrote our api at Yamgo in my own framework as an educational exercise more than anything else. Of course, I regret that now, 18 months later.

Realistically, with the advent of Composer I’m leaning more towards Slim + Packages for most of my new projects. Of course, anything that needs full stack and I’m straight onto ZF2.

How have you implemented deployment?

We have a simple git hook that posts to our deployment server which in turn does a git deployment to each of the webheads. Currently we don’t have a full deployment chain with testing, code sniffing etc, but it’s definitely something I’d like to implement in the near future.

What is in your standard toolchain?

PHPUnit and PHPStorm – daily. Ansible and Vagrant more and more. I also use thinks like Navicat for MySQL (because I bought it before I realised Sequel Pro existed) and other little helpers – nothing unique or spectacular really.

What testing tips can you share?

The whole process of UNIT Testing became much clearer to me when I realised that the UNIT in question was a single method of a single class. Of course, that’s simplifying but when I realised it was just checking that a given method did what was expected then my whole development architecture changed.

Not only does testing save you time and effort in the future, it makes you write more elegant code because it encourages you to stick to the principles of SOLID. My tip is, I spent far too long not testing due to pure laziness, I wish I’d started unit testing years ago.

Are there tools you use which you can’t live without?

Google.

How does your team work?

At Yamgo/Adpsruce we are a small team who are largely based in the office in Swansea. At Roave, we are a small team distributed throughout the world. It’s a massive difference, but honestly Roave works amazingly well because we are all around on IRC and Hangouts throughout every working day.

We actually have a persistent hangout you can dip in and out of that some people use when they just want company or the feel of office working. I don’t mind either way of working, I feel like remote working is fine as long as you trust your team to communicate effectively.


What did you think? Gary had loads to share and I know I learned a lot myself. Let’s wrap up this series with my Bruno’s contributions. I hope you enjoy it!

Bruno Škvorc

What lead you to PHP?

Ease of entry, as with most people. Then I got thrown into the fire at my first job being told to fix a ZF1 site and there’s no learning like learning on ZF1. After 2 years of fixing that mess, I became the lead developer of the team that would rewrite it to ZF2 there. In the meanwhile, I dealt with side projects, other frameworks, built my own, and basically just sort of stuck around in the PHP world.

What have been the things about PHP that bit you?

Fragmentation of the expert level community. I don’t care much for the needle/haystack problem and similar arguments others use to bash PHP, but I do mind that we can act worse than the JavaScript community sometimes. The JS community is perfectly willing and able to love a tool, then in the very next moment absolutely loathe it because a new one appeared that does things two keypresses faster (gulp vs grunt).

This bipolarity is something I’ve witnessed in PHP on many occasions – from you “can” test, to you “must” test to you “should no longer” do test-first; from ServiceLocators/Managers being awesome to them being used in an absolutely silly manner in ZF2 which completely prevented you from using a ZF2 component outside ZF2; from arguments about names of class types (Facades in Laravel), etc – irrelevant things that waste everyone’s energy because everyone has an opinion and everyone seems to change it eventually.

The experts seem more focused on arguing than on writing quality code. Then there’s the various gender and sexual orientation based wars that have taken the tech sector by storm this year and our high quality people suddenly shy away from each other because of differences in opinion, and purely because some can’t seem to separate church from state. This political situation is what demotivates me sometimes – politics often hold the community back.

What have been the highlights or redeeming features

I’d like to go with community again. While it does have its downsides, it’s undeniably awesome. Yes, for every Anthony Ferrara there will be fifty people telling you to use mysql_real_escape_string, but once you learn to separate the wheat and the chaff, the amount of mindblowing knowledge out there to be had is astonishing.

What are the compelling PHP features for you?

Well, I really like the features they’ve been adding during the past few versions. A built-in web server? Yes please! If they make it more production-worthy, I’d be compelled to actually use it. Traits and namespaces? Still vastly underused yet so powerful and versatile. But most of all, I like how easy it is to have something of high quality up and running in PHP almost instantly. With so many frameworks and bootstraps pre-built, you can literally skip all the configuration and tedium that usually comes with new projects and get right down into the logic of it. Not many other languages have that advantage.

What do you want to see added to the language?

The things Hack is doing – static typing being my most desired feature. I would also like them to upgrade the built-in server to something we can use in production, eliminating the need for Nginx and/or Apache. NodeJS can serve files to production, Dart can do it, why not PHP? Let’s go!

Why PHP over Ruby, Python, Go, etc?

I wrote about this extensively here but the gist of it is – it’s easy to learn, relatively easy to become professional at it, and it lets you build good things very, very fast. The only language I’d consider a worthy alternative right now is Dart, but it’s very clunky still and harder to get started in for a web project than PHP.

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

I moved to PHP from Actionscript and JavaScript, but eventually yes, Dart. I’ll never depart PHP fully, especially with Hack being publicly available now, but I do intend to master more than one high quality language.

Do you have a custom framework/setup?

I did build my own framework for a master thesis at uni, but I discarded it later on when I met Phalcon. I always say there’s a very specific lifecycle in every PHP dev’s career: don’t use frameworks, use frameworks, build your own framework, realize someone did it better. For me, Phalcon was the jump into the last step. Some people say there is another step, identical to the first one in that you no longer use frameworks, but I wholeheartedly disagree with that notion.

How have you implemented deployment?

Depends on the project. More often than not that ends up being a push of the production branch in Git, and a script that propagates changes across the rest of the servers when triggered. I’m looking at more automatic solutions and trying to wrap my head around all that’s on offer today, but there’s just so few hours in a day.

What is in your standard toolchain?

Definitely Vagrant and PhpStorm. Vagrant helps me get up and running with a new project almost instantly regardless of the platform I’m on, and PhpStorm lets me develop instantly regardless of the platform I’m on. My configuration settings are pulled from Google Drive and I’m ready to start working on any machine I get my hands on, as soon as I install Vagrant, Virtualbox and the IDE. This is a huge productivity boost. Add to that the fact that PhpStorm can do Dart with the Dart plugin, and I literally never have to change my development environment. There’s also the standard stuff – MySQL workbench, various code sniffing filters in PhpStorm, etc, but these are my main tools.

What testing tips can you share?

Just write tests and read http://grumpy-learning.com/ I guess, nothing else to be said. You need to write tests and that’s that. Oh, don’t skip them – don’t tell yourself “I’ll do it later”. You won’t. Do your tests NOW.

Are there tools you use which you can’t live without?

Development-wise? Vagrant and PhpStorm, without a doubt. If StackOverflow counts as a tool, I’ll mention that too.

How does your team work?

When I do have a team (rarely, as I freelance right now) we use various collaboration tools like those from Atlassian to code review, collaborate, discuss and brainstorm things. I don’t do Agile, tried it and it didn’t work. Instead, I like a component based approach – a base framework is put in place, and a map of responsibilities is drawn out. These responsibilities have quantifiers assigned to them depending on their complexity and importance, and they’re agreed on by the entire team. Each team member has a pool of points he can spend on claiming a feature, and a bug pool. If a dev has 7 points in his feature pool, he can claim up to 7 total points of features to implement (i.e. email system for 4 points, Google+ auth for 3 points). A dev can have at most three bugs, or one critical bug before they’re in “bug jail” and need to solve them before moving on with the feature pool. There are usually no strict deadlines because I’ve gotten pretty good at recognizing the skill of people I work with and the features that’ll be anticipated before the client knows it, so it’s usually rather relaxed, though, of course, things go wrong sometimes.

Wrapping Up

Though the introduction to this series had quite a provocative title, I don’t want you to see it as being a bait and switch.

My aim is to help turn the tide of negativity towards PHP and show how, especially with the most recent revisions, PHP has really grown up and is deserving of a reputation equal to other languages, such as Ruby and Python. In the end, no matter what language you use, I hope that you truly see it for the wonder it is and continue becoming the best you can be at your craft.

Matthew SetterMatthew Setter
View Author

Matthew Setter is a software developer, specialising in reliable, tested, and secure PHP code. He’s also the author of Mezzio Essentials (https://mezzioessentials.com) a comprehensive introduction to developing applications with PHP's Mezzio Framework.

gary hockenInterviewmatthew setterPHP
Share this article
Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week