Thoughts on PHPBridge


Last weekend at the fantastic Lone Star PHP 2014, I (and 3 other awesome people) presented the inaugural PHPBridge tutorial. You can read more about how that went on the PHPWomen blog.

However, I wanted to take a moment to jot down some more personal thoughts on PHPBridge. Why I pushed for it, why I think it’s important, and my ultimate goals for it.

Before going any further, I do want to take a second to thank the tireless efforts of Michelle Sanver who, for almost a month, stepped up and gave up all of her spare time to work with me remotely on the curriculum. I jokingly say we pair-wrote the curriculum, but that’s pretty much the most accurate description. For about 4hrs every night we would get on a Google Hangout and we would discuss what we wanted to do, I would type it out, she would refresh — complain about Ruby syntax errors I had to fix — and she would read it back and offer suggestions and corrections. Rinse and repeat.

I was very concerned that the curriculum would only represent my view of the world, and having at least one other voice along with the reviews from others like Elizabeth Smith, Matt Frost, Daniel Cousineau and Bob Majdak Jr was essential to making a balanced offering.

I was first exposed to RailsBridge via work where we’ve hosted a number of these events in our San Francisco offices. After learning more about them, and their goals, I decided that they were a perfect role model for our efforts — albeit with the minor exception of not restricting our workshops to just women (and those who identify as women, or are invited by a woman) as this is counter to PHPWomen’s goals — though any given workshop organizer can make that decision for themselves if they feel the need. Thanks to their choice of CC-BY license, we’ve been able to use their fantastic Suggestotron idea and the Sinatra app that runs the documentation site.

It has resulted in a curriculum that I am proud of. Prior to starting on this journey, I wrote out a long document that I sent around to the folks at PHPWomen, members of the community, and the community team at Engine Yard for feedback. In it, I stated my goals, and this is a direct quote:

The primary goal with PHPBridge is to give inexperienced people the opportunity to learn to wield this tool they use probably every day for leisure. To empower and delight them by showing them that they can control this machine, and that they can use it not only to browse the web, but to build it.

However, this is the projects primary goal, my own personal goal is a little simpler:

I love what I do, and I want to share it with people that they might love it too.

One of the things we often talked about when starting out the curriculum was how and why we started programming. The why was easy: we wrote some weird words, and our computer did something. Something we made it do. It was pretty awesome! The how was a little harder. We wanted to jump-start our attendees passed some of the unnecessary things we did, while still making it feel like a natural progression from start to finish. An example of this is only presenting them with prepared queries — this is the only way forward, no miss-step, no security issues. Ultimately, however, we wanted our attendees to have that moment of delight, and ownership, not once, but multiple times.

During the creation of the curriculum we hit upon the idea of “Error Driven Development” — try something, if it explodes, try to fix it. This is how most of us started out, but for a newcomer, it can be scary — by giving it a name, and by intentionally including error scenarios in the curriculum, we teach them that errors are a good thing — an opportunity to learn and fix your issues (and we all know the pain of the dreaded white screen!)

This is why our curriculum starts out by creating an index.php, add.php, edit.php, and delete.php, all in the webroot, with one class, also in the webroot, TopicData.php. Through these, we learn basic HTML, forms, CRUD, and about using objects (though not necessarily the why of OOP, we approached this more like this is just how things are).

To move away from the tedium of having done the same thing (DB interaction) four times, we move on to implementing Bootstrap 3. This step is where most folks ended their time with us — but at the end they had a pretty darn good looking app that worked. That they made.

The remainder of the curriculum focuses on refactoring our app to a more framework-like setup, with configs, a router, controllers, models, and templated views. We use pain points to drive this refactoring — templates so we can easily add Bootstrap to all our pages, autoloaders to stop multiple require statements, routers to have pretty URLs, etc.

We end by implementing a new feature (voting) using all the things we’ve setup — our users seeing how it all comes together at that point.

Going in to the workshop I was nervous, and excited — I remembered the ah-hah moment from 30+ people the year before when I managed to demystify (and un-scarify) SQL for them, and it was one of my primary motivators.

So, PHPBridge 0.1 was a success in many ways, not so much in others, but it was a starting point I am happy with. I have many goals for the progression of PHPBridge:

  • Revise the curriculum to solve the issues we discovered at Lone Star PHP (and of course, this will be an always evolving document)
  • Work with user groups, companies, and conferences to host more workshops
  • Provide daycare for attendees (rather: for their kids!) — this is a major barrier for some
    • While we know it won’t always be possible to provide, we do want to provide some framework around it, such as requiring that it always be licensed child care professionals, etc. Attendees should know that if it is provided, it meets a certain standard, and if it cannot be free, will have a reasonable cost.
  • Provide loaner hardware for attendees. Another major barrier, especially for disadvantaged minorities, is lack of access to a laptop.
  • Provide transportation assistance. Similar to the laptops.

On the curriculum front, I want to review and revise the Frontend curriculum from RailsBridge. I will pursue better ways to collaborate on this as it’s completely backend language agnostic.

I’d also like to move on to an Intermediate Curriculum, and then finally on to a kids curriculum. Currently, there is the amazing Young Coders for Python, and KidsRuby, and I’d like to also bring this to our community too!

Whew… that was a lot of thoughts. I hope that in reading this, you can see why I am passionate about this, and are now excited about the idea of proliferating your love of our craft, and will contribute to the efforts.

Speaking at PHP UK 2014


I’m pleased to announce I will be speaking at PHP UK in London. PHP UK will be on February 21st and 22nd.

I will be giving two talks, “PHP 5.NEXT: The New Bits”, which will cover PHP 5.6 (or whatever is appropriate come February!) and “PHP Performance: Under The Hood”, which will be a performance talk with an emphasis on what’s going on in internals.

This second talk is intended as a way to get to know more about the engine, how it works, and what’s really going on with your code.

Last time I went to PHP UK in 2012, it was one of the highlights of that year, and I fully expect it’ll be the same for me next year. I hope to see you there, tickets are on sale now!

Speaking at Sunshine PHP 2014


After being part of the inaugural, and immensely successful Sunshine PHP in 2013, I am so delighted to be invited back to speak at my “home” conference in 2014.

Sunshine PHP takes place in Miami, February 6-8th 2014, and will be speaking on “MySQL HA, Recovery and Load Balancing”.

Using MySQL Server and Percona XtraDB Cluster we will take a look at several possible replication configurations for MySQL high-availability, disaster recovery and load-balancing. After comparing them for administration ease, scalability of reads and writes, robustness of the system for errors and time for data recovery as well as looking at how they impact your code-layer we will discuss the ins-and-outs of each setup, looking at the pros and cons, and what trade-offs you will need to make depending on your needs.

SunshinePHP is a great conference and the fact it’s in sunny Miami is a bonus. Tickets are on sale now!

Speaking at PHPBenelux 2014


Three years ago I heard about this awesome conference in Belgium, PHPBenelux, and for the last two years I’ve been kicking myself for missing the CFP.

Well, this year, I didn’t miss it, and I got accepted!

I will be giving my new talk, “PHP Performance: Under The Hood”:

We’ve all experienced performance issues and we would typically turn to a profiler. Whether that’s something in userland, or a tool like xdebug or xhprof, the reason is the same: to figure out why our code is slow.

This talk will take that inspection a step further and look under the hood of PHP, at the C internals, for common performance problems.

If you’ve ever wanted to know exactly what your code is doing, and why ++$i is faster than $i++, this talk is for you.

I hope to see you there!

Speaking at Nomad PHP (EU)


Hot on the heels of my ZendCon EU Keynote announcement yesterday, I wanted to invite everybody to sign up for Nomad PHP EU. Nomad PHP is an online PHP User Group for people who don’t have a local user group, or who just want to see more quality talks!

For those of you in Europe, or who want to watch the talks during work hours with your team, there is now Nomad EU. Nomad PHP EU meetings take place at 20:00 CET, which is 2pm EST, or 11am PST.

I will be presenting Introduction to Databases on November 14th.

This talk will cover the basics necessary to help you decide what data to store, where, and how.

We will cover PDO — PHP’s Data Object extension, which allows you to talk to a variety of databases, including MySQL.

You will learn how to CRUD — Create, Retrieve, Update and Delete data, database schema, and when to use indexes.

Additionally, we will look at other data storage systems such as memcache, and nosql databases.

I originally gave this talk at Lonestar PHP 2013 back in June and it was my favorite talk I have given to date — if you are new to databases, want to learn JOINs and Foreign Keys, or just want to brush up on your fundamental MySQL skills, this talk will have something for you!

Keynoting at ZendCon Europe


In a little under three weeks I will be giving the closing keynote at ZendCon Europe. This will my first keynote and I’m excited to be talking about The Evolution of DevOps.


With the rapid adoption of new software development methodologies and infrastructure as a service (IaaS), we’ve seen a new role emerge,
DevOps. The DevOp is a master of this new domain: The Cloud. But just as quickly as we’ve seen DevOps emerge, we’re seeing the role evolve as advanced platforms and services enter on to the scene. During this talk, we’ll explore how DevOps is evolving, what that means to you, and your role in the ever changing landscape of development and the cloud.

ZendCon Europe will be in Paris from November 18th – November 20th, I hope to see you there!

Everything You Need to Know About OpCode Caches


Last year I wrote a talk called “Fast, Not Furious: How to Find and Fix Slow Code” — a performance talk covering profiling, memcache and some other stuff.

As I often do — to hedge my bets — I stuck a few slides on the end “just in case” I ran through everything too quickly and needed to fill in time.

These slides were on APC, the Alternative PHP Cache, and went just a little into tokens and how APC works under the hood.

I really enjoyed presenting those 6 slides, and I’ve been wanting to expand on that topic ever since then.

Well, after a few weeks of hard work, some input from some great people, including Sara Golemon, Elizabeth Smith and Julien Pauli, I’m so very happy to publish PHP Performance I: Everything You Need to Know About OpCode Caches.

This is a 17 page document (in it’s original format), also available (in somewhat abridged form) as a 20 minute screencast (Transcript/Slides)

Alongside this, we are also releasing the Engine Yard PHP Performance Tools. This is the start of a suite of tools to aid with improving PHP performance.

As you can probably guess, this is part 1 in a series; the next in the series will be published in late October.

The video is embedded below (though I highly recommend reading the full length document also) :