ZCE 5.3: Worth Doing?

I recently took (and passed!) the ZCE 5.3 certification. I’ve been a Zend Certified Engineer (5.0) for nearly 3 years, and I know a lot more about PHP today than I did then. Today I speak and write various things related to PHP, and also teach all sorts of topics including PHP certification. I thought I’d share my thoughts on the ZCE, and I’ll write a follow-up post on how to prepare for it.

Updated Syllabus

The main thing that annoyed me about teaching people for the 5.0 exam in the last couple of years is that it had a topic on the differences between PHP 4 and PHP 5. Personally, I have never worked commercially with PHP 4, and that’s true for lots of developers that I meet. So I ended up trying to teach PHP 4 which seemed silly! Happily that is gone now from the 5.3 Syllabus.

There are some new topics and I’m pleased to see the Web Features topic being added. This brings together some HTTP concepts and overall client/server architecture stuff that really helps round out the syllabus. I consider that studying for the exam is in the interests of all PHP developers, these topics are all useful and relevant.

Continue reading

Declaring Static Methods in PHP

I was confused recently to realise that I had accidentally called a static method in PHP dynamically from another part of my code; I expected PHP to output warnings when this is done. On closer inspection I discovered that:

  • Static functions can be called dynamically
  • Dynamic functions generate an E_STRICT error if called statically

This made a lot more sense when I thought about it a bit more and wrote some toy code:

Continue reading

Skills Analysis for Teams

When I spoke at PHPNW10 in October, I talked about teams, skills and the importance of benchmarking things in order to illustrate improvements. If you didn’t see the talk, the video and slides are linked off the conference site. In particular I talked about the importance of analysing skills in a team, then improving them, then analysing again to see how things had changed. This post is about that process, some techniques that might apply, and what to do with the results when you get them.

Continue reading

PHPUnconference Comes to Manchester

I’m very excited to hear that the PHPUnConference Europe (@phpuceu on twitter) is coming to Manchester on February 19th and 20th! So excited, in fact, that I’ve rushed out and bought my ticket (for a whole £40, that’s a good investment in my opinion). The event brings together the PHP community from across Europe to an unconference where the speakers are the presenters, and really anything goes!

A great feature is the contributions and interests section – if there’s some content that would be particularly useful to you, or a talk you think would be a good fit, then you add it on this page. All the attendees can vote for which sessions we want to see and so we crowd-source the best lineup possible :)

If you fancy some more structured PHP training then hang around in Manchester after the event because thePHPcc are bringing their PHP Days training to Manchester on the Monday and Tuesday following the weekend event, which is pretty exciting :)

Hope to see you in Manchester, all I need to do now is work out which topics I want to see/give talks about …

3 Ways to Access a Namespaced PHP Class

After what felt like years of debate over the notation to use for PHP’s namespaces, it seems like the feature itself has had relatively little use or attention since it was actually implemented in PHP 5.3. We’re all used to working without it but using it does make code neater.

Take this example (in a file called namespaced-class.php)

namespace Christmas\DaysOf;  

class PartridgeInAPearTree{ 
}

Now we have a few ways to access that class.

Continue reading

Keynoting at PHPBenelux

Have you got your tickets for PHPBenelux yet? If not then I hope you will do so because I would love to see you there!

I’ll be delivering a keynote at the PHPBenelux Conference in Antwerp in January alongside my good friend Ivo Jansch. Between us we’ve got plenty of stories to tell from our experiences in various areas of development and we’d like to share those with you! I hope you’ll come along and join us, and if you are quick you can catch the early bird prices, saving 50 euro.

On a personal note I have many great friends in this part of the world and I’m super-excited to know that I’m able to visit and see both the old friends I know well and the new friends I haven’t met yet. I attended this conference last year and it had a great atmosphere; this year the content is better again and with three tracks, I don’t know how we’ll choose which sessions to see!

Are you attending? Leave a comment and make sure to come and say hi at the conference in Belgium :)

Google Analytics Accounts API

I’m working with Google Analytics at the moment, to pull information about web traffic from analytics into another system. Google have excellent APIs and that makes this job much easier. I’m using pecl_oauth to authenticate users against their google accounts (see my post about using OAuth from PHP), but even after I have a valid google user, working out which analytics accounts they have access to and how to refer to them is a puzzle in itself, so I thought I’d share what I learned.These examples use pecl_http, since I have control of my platform and I find it easy to work with. I’ve tried to write this with explanations of the overall process in between the code snippets so hopefully this makes the process clear whether or not you will use exactly the same implementation.

Analytics Accounts

Your google account can have access to one or more analytics accounts. For example when I log in I have access to accounts which hold the data for lornajane.net, phpwomen.org, joind.in and a few other things I’m involved with. Only lornajane.net actually belongs to me, the others are accounts created by someone else and which I have access to. The first challenge therefore is to work out which a user has access to – the best place to start is the reference page for the Management API, part of google’s own documentation. In a nutshell, we build up a URL like this, being increasingly specific by fleshing out the values in square brackets on subsequent calls:

https://www.google.com/analytics/feeds/datasources/ga/accounts/[accountID]/
webproperties/[webPropertyID]/profiles/[profileID]/goals

First up then, is to get a list of accounts for our authorized user – I already have a valid oauth access token to use in this example Continue reading

360 Degree Feedback

I mentioned the 360 Degree Feedback Technique during my keynote at PHPNW10 and had many comments and questions about it since, so I thought I’d post about it in more detail

Introduction to 360 Degree Feedback

The basic premise of 360 degree feedback is that rather than being given performance feedback at work solely by your superior, the feedback comes from people all around you. This would include your manager and your peers, but could also include your direct reports, and people that you work closely with from other areas of the business. For example a developer might receive feedback from the rest of the development team, the design lead, and the project manager.

Continue reading

256 Colours in Vim

Recently I’ve been looking at different vim colorschemes, after using vimdiff and finding I couldn’t see half of the code. I’ve been using relaxedgreen for ages, and it is excellent but I find the blue really hard to see on my black background so I was in the market for an alternative.

Touring Colours in Vim

Please excuse the all-over-the-place spelling in this post, I’m British so “colour” is a word and “color” is a vim command. Confused? Me too

I grabbed two fantastic scripts – the Vim Color Sampler Pack and the rather awesome ScrollColors plugin which allows you to cycle through all your colorschemes and try them out.

Continue reading