Ada Lovelace Day: The Allies

It's Ada Lovelace day, a day when we celebrate women in technology. This year I'd like to mention a group of people who make the biggest difference in the tech life of any minority: the allies. Continue reading

PHP Learning Path from O'Reilly

I'm very excited to announce that some of my content is featured in the PHP Learning Path from O'Reilly. The Learning Paths are a good way to buy a bundle of content from different people on related topics, and the introductory pricing is always a good deal! Their newest offering is the PHP Learning Path, which has a video course on PHP and MySQL, my intermediate PHP Video course (they wouldn't let me call it "all the things Lorna thinks PHP developers need to know" unfortunately!) and also my video course Git for Web Developers which has a bunch of PHP in it as well as my best git tips and tricks.

I think it's a pretty well-rounded collection and it's only $99 for a couple of weeks, so get the PHP Learning Path here and let me know what you think?

New in PHP 7: null coalesce operator

Not the catchiest name for an operator, but PHP 7 brings in the rather handy null coalesce so I thought I'd share an example.

In PHP 5, we already have a ternary operator, which tests a value, and then returns the second element if that returns true and the third if it doesn't:

echo $count ? $count : 10; // outputs 10

Continue reading at the PHPNW Hackathon

It's PHPNW time again, and that means hackathon! This conference has a strong tradition of hands-on building as well as the usual talks you'd expect to see, and next week will be no exception to that as there's a hackathon on Friday night before the main conference on Saturday and Sunday. If you're at the event then make sure you sign up for your hackathon ticket, it's always a good experience. is one of the featured projects and I'm one of the maintainers, so I'll be at the hackathon and I'm hoping that we'll get quite a few things done during the evening. is an ideal project for events like this since it's easy to get started with it, and we have a development platform virtual machine (that we'll have already downloaded onto USB sticks so no conference wifi delay) so you can be up and running in no time. We also have a specific label on our bug tracker for items that we think are manageable for people who don't already know the system, so chances are that if you want to, you'll be able to contribute to an open source project with something finished by the end of the night. Continue reading

Git Pull Causes a Merge

If you type git pull and expect a fast-forward update, but get a merge instead, don't panic! This usually happens when we're collaborating on a branch with other people, and we've made changes on our local version of a branch, and someone else (or the other you, if you use git to sync between multiple dev platforms) has made changes to the remote version of a branch in the meantime. It also happens really frequently in teams where all commits are to the master branch ... yet another reason to have a decent branching strategy.

All that's happened is something like this:

$ git log --oneline --all --graph --decorate
* 054f163 (HEAD, branch1) Installation instructions for the application
| * 0ce808c (origin/branch1) Fixing template layout
* 927aad9 A random change of 731 to ideas2.txt

Since the last common commit, there are commits on your local branch, and the remote one. You could just let the merge go ahead but there are other options. You could also check out a new branch at this point, reset your tracking branch to the right place and then reapply your changes using cherry-pick or by rebasing and then fast-forward merging your branch. Continue reading

SOAPFault When Switching PHP Versions

I'm working on an update to my PHP Web Services book and with PHP 7 likely to release before the book even makes it into print, I'm testing all my example code across PHP 5.6 and PHP 7 ... which today gave me a weird problem with a very, very simple SOAP example. Continue reading

Debugging rst2pdf and pygments

I create my slide decks from ReStructuredText, which is a text markup format. Working this way makes it easy to add into source control, fast to work with, and also accessible since I don't use a mouse or other pointing device so traditional slide deck creation programs are kind of difficult. Text-based wins every time for me. While working on a new slide template, I ran into some difficulties and had to figure out how to inspect what was going on. I seem to struggle with this every time so I am writing my troubleshooting guide here for when I need it next. Continue reading

The Microphone Is Your Friend

This post is an adaptation from an email I sent to a friend who is doing their first few conference talks. I was asked to share more widely so here it is

The microphone is your friend, honestly :) Even if you think you can be heard, there are some definite benefits to using a mic if it's available:

  • you actually can be heard
  • even people with less-than-excellent hearing can hear you
  • the video recording can hear you as well
  • you now have the option to employ some vocal variety: exclaiming, pausing, stage whisper ... it all adds interest and colour to what you are saying

There are a few different types of mic and each one has its own quirks! Continue reading

Test Your PHP Application on PHP 7

PHP 7 is coming, which is nice, but what does it mean for the majority of PHP developers? PHP as a community is notoriously slow in adoption, some of us are still waiting for 2012's new shiny to be available as standard on our hosting platforms. However with the performance benefits and a few really nice new features, PHP 7 is well worth everyone's attention, and it's actually quite easy to get started so here's my quick howto. Continue reading

New Screencast Series: Git Fundamentals

git-fundamentals-screencastIf you're a web developer looking to improve your git skills, then I have just the thing for you. I love it when a project is finished and "out there" and I'm pleased to announce that my new screencast course Git Fundamentals For Web Developers is now available. It's mostly PHP but you'll find Python and Node examples in there as well just to show off some of the tricks that work best for different disciplines. The course is structured around specific tasks or problems that we face in creating and deploying web applications, and my best advice on how to solve them. Mostly, I just want you to be able to be awesome at what you do already without your source control tool getting in the way :)

Edit: If you're reading this before July 25th 2015, use code CFSCON5 to get a massive 50% off!
Continue reading