PHPNW11 – a review – Day 1

I recently attended PHPNW conference again (I have been to all but one since it started), this has become another one of my annual geek pilgramages and thought I would drop a few notes down, *Disclaimer: I was a volunteer helper, which means I don’t have anything to do with the organisation, but sometimes the session I am in is not one I would have immediately chosen. Also I did not get chance to go to the un-conferance part, shame that. Please note these individual reviews are marked up with hReview and are therefore freely and easily available for you to share if you so wish.

5 out of 5 stars

The awesome conference that is PHPNW.

Reviewer: Shaun Hare Oct 9th 2011

OK, the title/summary probably says enough, I thoroughly enjoyed the conference,as I have on previous years.

The change in venue this year to the former Ramada Manchester, was actually beneficial I think, as I managed to secure a room there
having the conference 4 floors down from your own room was extremely useful, I never had to queue for the gents, a big conference problem
as these things are largely full of geeky men. That puts me on a tangent – more women needed, if you are a woman reading this please attend these type of conferences if you can. They are great and you will come away with a great deal of info and I know there are some awesome women developers in our industry. I go to conferences to learn from awesome developers I don’t care what sex you are. There were a few there but really they are underrepresented at every conference I go to. As far as I am aware there was only one woman speaker, see review later. Anyway it’s up to you guys(ladies etc) but all I can say is I would welcome more women over to the geeky white side.

There were a range of exhibitors, and I was impressed by the content, even though a lot of them were recruiting and I wasn’t looking for a job they were still happy to chat. If you were looking for a job in PHP and weren’t there then sorry you missed out, it was definitely the place to get a good PHP job. One thing I like about this a other geek conferences there was a good selection of books for sale, in this case thanks to O’Reilly, at reduced prices. So that was good too.

I came away with a interesting coffeescript book – as that is something I am playing with at the moment. CoffeeScript

Registration is often challenging at conferences and as I was helping out I am going to have to say it was good, but I do feel we got a lot of people through with minimal confusion.

So what for next year would I suggest if anything. Maybe the conference organisers Emma ,Ian , Jeremy and his team if they remain at the venue could try and swing some exclusive room rates. And maybe relocate the tea/coffee stations or have more smaller ones, during the breaks as this area often got crowded.

All in all as before I continue to urge people to attend it is well worth it.

Ian Barber’s Keynote speech How to Stand on the shoulders of giants

Ian’s keynote slides
5 out of 5 stars

Ian surely know’s his stuff, I have seen him speak before and thought that too. He used skate video production to demonstrate how the particular talents involved there improved by inspiring skaters to “land that trick” because others before them had and push things just that one bit further. He inspired with a mix of historical computing references, and obvious knowledge to encouraged people to work with and build on what has gone before. Definitely inspiring stuff and I certainly came away from it eager to do just that.

Rest and HATEOS by Ben Longden

4 out of 5 stars

Ben Longden’s slides are here

Ben gave us a run down on the HTTP protocol and the role that plays in REST, and an example of creating a REST service, using his site (fdrop.it) as a example. It was good, there were a few takeaway messages, I learnt a bit about using media types and the role of hypermedia in a restful service and picked up the use of RestConsole a chrome add-on as a tool. I feel actually it could have been a bit more in depth about differing output formats and problems associated with, the examples of it on his site were good but that appeared to be only outputting one format type (application xml/xhtml), when we are building these services we tended to use multiple formats.
But the concepts were definitely there and presented well. Personally I did not need the lesson on HTTP protocol and hopefully others didn’t too. If people are not aware of the basics then they should be, if they call themselves web developers<rant>.

PHP Testers Toolbox Sebastian Bergman

4 out of 5 stars

I have used PHPUnit for quite a while and advocate unit testing to anyone so this talk was a must see for me.

Sebastian kicked off by saying he may be bias so set the tone. But overall gave a good roundup of the tools out there. I was introduced to a couple which until that time I had not heard of Atoum and Behat. I am starting to look into Behat as I feel I could use it, as I would like to do some BDD (Behaviour driven development). But ultimately this does not replace just enhances test driven development in my mind.

PHPUnit came out on top, in my opinion, of the others, and that was not because of speaker bias. Whilst the talk gave comprehensive coverage of the tools, I felt the example used to demo some was a bit weak and for others there was no example.

But ultimately introduced me to more things beyond phpunit , job done.

Note see my review on the Behat talk for more info into one of the tools.

Varnish your application Make it Fly by Alistair Stead

Alistair’s slides on Varnish here
4 out of 5 stars

As I was room manager for this talk I may have not got as much out of it as if I had paid full attention.

A good round up. It included code samples and good solid explanation of when to use varnish, and the types of configuration. I felt we could have had a little more on basic installation and configuration and as I am not familiar with Magento the code samples whilst good I did not quite understand where to implement them or even if they were needed at all.

All round a very good presentation and the slide takeaway is very useful (and hosted on speakerdeck a much nicer service than slideshare IMHO), I will be looking into this further.

Acceptance and Integration testing using Behat -ben Waine

Ben’s slides on Behat and as a bonus Sample code here
6 out of 5 stars

I thought this talk was very good, Ben presented well and gave a simple thorough understanding of a topic that to me at least is relatively new, and I think in PHP circles I am not alone. His enthusiasm was apparent through the delivery of the topic and the examples were very good and readily understandable.

A few people noted a couple of typo’s in his slides, but the fact they could spot these I think shows how well the speaker explained the facts. The slides were obviously specifically prepared for the conference and
time and effort had gone in to them.

The use of Behat was clearly show and the examples increased with complexity as the talk progressed.

Ben was obviously very knowledgeable on the topic and was also ably assisted by a colleague in the audience on a couple of questions (thankfully not too much as I feel that would have been a distraction). For me the best session of the day.

Are your tests really helping? Laura Beth Denker Etsy

3 out of 5 stars

I thought this talk was interesting, I have kind of admired what Etsy have done with the whole continuous deployment process. Pushing code every 20mins is certainly admirable.

Laura’s experience showed that she knows her stuff. I am not sure I was a fan of her presentation style though (personal opinion), it was a bit shouty/relaxed and sometimes confrontational. Sadly it appears others agreed with me

It was billed as “we will look at coding and testing patterns inspired by a real PHP project. We will also discuss how to identify patterns and make small adjustments where testing is and is not helping.” I did not find that. She explained she had created a code standard for monitoring testing and had a view of what should be tested which I found refreshing, I imagine seeing more of that would have helped. I was certainly interested in that part. Overall not the best of the talks on testing on the day, and it seems I attended quite a few.

In summary day 1 was excellent and after the free food and beer that followed the talks, spurned many interesting conversations with some talented phpists.

PHP NW conference tickets on sale

This PHP North West Conference is happening again this year on October 7th through 9th in Manchester, UK. I have attended 3 PHPNW conferences and they have all been brilliant in every way. Jeremy Coates ( @phpcodemonkey) certainly has and continues to produce a great event. The conference this year will be split over two days on the 8th and 9th of October with 3 full tracks on the Saturday and 2 tracks on the Sunday. There will also be tutorials this year.
If you are into PHP I urge you to go to this event. So yet again I have purchased the blind bird ticket which went on sale yesterday.

JSP Views not rendering objects – Portlet MVC

It appears there is an extra requirement with Liferay portal at least (probably others) but this has caught me out a couple of times so I thought it was worth jotting down to prompt my greymatter when this happens again.

turns out if you want jsp’s to process expression langauge you need to tell them not to ignore it.

<%@ page isELIgnored ="false" %>

Who would have thought it.

Spring Unit tests – Maven – Application Context not loading

I more than often nowadays split my time between Java and PHP and try to adopt the best practices I know, in both areas.
This typically starts with ensuring I can carry out

  • Test Driven Development
  • Continuous Integration

I have just started to use a framework in Java and have opted for the Spring Framework.
Recently whilst working on a Spring Framework project – I was happily writing Integration tests and testing within the IDE and being new to the framework feeling very happy with my progress. However when I came to committing the code and running it through our Bamboo CI engine I was getting tests failing. (That didn’t fail in the IDE?)
The report showed

java.lang.IllegalStateException: Failed to load ApplicationContext

Turns out the clean I was performing (as you would ) before tests in Maven was causing an issue. So I did a bit of digging and trying to resolve.

So this is here as a reminder and help for other people with the same issue.

You need to ensure you load your files from the classpath.

My code :


@ContextConfiguration  (locations = "classpath:/FormControllerTestCase-context.xml")
/* Note that if no file is specified to @ContextConfiguration, it is derived as -context.xml, */

@RunWith(SpringJUnit4ClassRunner.class)
public class FormControllerTestCase  {

    private FormController controller;

    @Before
    public void setup()
    {

         controller = new FormController();

    }

    @Test
    public void testIndexViewShownOnConstruction()
    {

And the key to it all was ensuring the context files and any associated property files were stored in /src/test/resources/

This is the default location Maven pulls from apparently.

Web losses

I was saddened when geocities closed and yet again I am saddened by the news of the latest BBC cuts which will remove lots of web real estate.
About half of the 400 stand-alone websites and webpages will close. Among the sites facing the axe are the youth-orientated BBC Switch, Video Nation and a number of forums, blogs and message boards, including the 606 community football site.

And these are digital resources containing our memories , for example literally the BBC asked the public to contribute their memories of World War Two to a website between June 2003 and January 2006…” and five years later someone has decided to bin them. The BBC’s decision to actively delete old content (rather than simply allowing it to take up some space on a server) I think is the wrong decision and it made me think what we should do with web content past it expiration date (if there is such a thing) or more likely no longer commercially / economically viable?

Convention vs Configuration in PHP?

As a programmer I often question the design paradigm “Convention over configuration” many developers I am sure do the same thing.
I really like writing code and the interesting part is solving the problems and acknowledge some of it is not interesting.

More and more I find myself coding by convention as I rely on framework code.

I do this a lot in Java, largely because of the lack of underlying knowledge, I still have to think quite a lot about the basics, but with PHP this is different, so I thought I would write down my thoughts on the whole thing, so next time I question should I do this I might look back and take my own advice.

I have created a lot of stuff and earned my badges creating a lot of the standard design patterns from scratch.
So once you have solved the basic problem should I revert to some ready made solution, that is likely to have done it better than I had anyway.

If I need to build a quite large complex system or even one that I know is going to grow quite significantly. There are a number of advantages to using a framework, for the reason I can use other well tested code to achieve large proportions of the functionality,but largely to me code organisation and separation of concerns are the big pluses.

As I write a lot of stuff for internal use and most of the stuff is going to integrate with other systems I seem to have a knack of finding the quirks that make that hard work using the framework code, on both sides, there is a enough to do anyway.

So if I am writing a system should I use a framework — YES

If I am writing a small script forget it – even though I am tempted.

As to which, well that depends on the current trends and functionality you need.

I was not wrong – WordCamp a round up

Having attended WordCamp last weekend, and tried to embrace it with the attitude I will do as much as I can to listen,learn,help and have a good time. I can confirm it did not disappoint.
Not quite sure what the core organisers prefer to call it but this is a conference in my book, it is billed as a mix between that and an un-conference, and now a must on my conference calendar and should be for anyone interested in WordPress.

It was a good weekend, and I am thoroughly pleased I attended, first the downsides, the un-conference bit did not really work in the venue. A series of lecture theatres do not make a good space for conducting an un-conference, it did not seem to flow and made it difficult I felt to run the sessions I did (WordHack). I also felt the quality of some of the presentations I attended could be improved but personal opinions and all that.

Overall the venue was well organised, credit has to go to Chi-chi Ekweozor for that I think, who was tireless and ensuring people’s needs were met. There were certainly a few highlights for me which could be summarised as

  • WordPress in the Enterprise II (David Coveney) from Interconnectit
  • Working with some awesome people on WordHack
  • Being introduced to Custom Posts
  • Some interesting stuff from Peter Westwood – one of the core developers
  • being stimulated to think about BuddyPress – even though I did not attend any sessions on it

Wordcamp Uk 2010

Photo by Benjamin Ellis

Oh and of course WordHack was an excellent adventure- that produced a whole self sustaining WordPress based site in a very limited amount of time, more can be learn’t about the process on the wordcamp wiki and the actual site is live at openaid.org.uk

So overall I think it was a good event, made so by the people involved. I will certainly be looking to go again next year.
If any one is thinking of getting involved with Wordcamps I would recommend it. As would I that you look out on wordpress.tv for videos from the weekend.

WordCamp UK

On the 17th and 18th of July I will be attending Wordcamp UK, for the first time. I am looking forward to it.

Wordcamp UK 2010

Wordcamp UK 2010


Is this an advertisement for Wordcamp – yes it is kind of . (Disclaimer I am helping out) You should go , tickets are still available although at time of writing I believe that is only about 30 and the ticket close deadline is less than 24hrs away, and the schedule is really shaping up – see the wiki – If you wish to subscribe to the schedule I have drawn together a webcal / ics WordCamp UK Schedule version here. Which is HTML5 so beware it looks OK on nice browsers and even mobile devices but it may not play nicely with IE.

However I attend quite a few events throughout the year but I have missed WordCamp so far, I did follow online last year but it is never quite the same. Which is really the point of this post.
There is a trend at the moment for online conferences and yes whilst these have environmental benefits there is one big, quite obvious lacking I think, having attended both. - interaction with like minded people
summed up quite recently in a tweet by Craig Rowe


visit their blogs, download podcasts, watch screencasts. Value from conferences come from meeting people, serendipity and socialising.. imholess than a minute ago via TweetDeck

Even if you don’t engage with people much, there is a certain atmosphere with the Geek community, people are welcoming and you can often just eavesdrop on some awesome thing, from some extremely clever people, that are not speakers, that spark ideas for you in your situation. It is kind of social learning. Maybe it is my my lack of Psychology knowledge shows through here but as I understand J.B. Rotter’s theory of Social Learning I think this is reinforced in these environments. We do flourish and adopt behaviours/ideas later, as suggested the “effect of behaviour has an impact on the motivation of people to engage in that specific behaviour”. I usually come away from these events brimming with ideas and enthuisiam. So I suggest especially if you have not gone to one of these type of events before you give it a try. If you have read this and see me there let me know what you think.

Science Hack Day

This weekend I attended Science Hack Day at the Guardian Offices, organised by Jeremy Keith (@adactio). I was unsure whether I could originally make it, loitering on the wiki maybe list for a while, and was relieved when I found I could get there. Long story short I was not disappointed and this was an excellent event with the atmosphere of other successful hack events (Mashed 2008, Open Hack London etc) and some awesome people and really interesting hacks.

I liked the idea of mixing a theme with a hacking event, that helped me draw inspiration, previously at other similar events, people would tell you I would rarely finish hacks after procrastination for far too long over what I wish to do.

The Guardian offices make for a good location and around 80+ geeks and scientists (yes some proper scientists) descended. The atmosphere was good, with the usual welcoming geeks and a band of familiar faces. I decided to start hacking a little early and was putting together a small statistics dashboard for the weekend on the way down. I had the idea I may put together some statistics on the weekend gathered through a variety of sources, gathering inspiration from a awesome product, the chirp dashboard I had seen demoed by Remy Sharp. I however had a slight twist in that the data I collected from a number of sources, Google Spreadsheets,Flickr,Github,Pachube and of course Twitter, was to be compared against research statistics from lots of animal species. This could allow the testing of a number of hypotheses, e.g. Is there a significant difference between the amount of sleep that a typical geek has at a hack event and say a Lesser short-tailed shrew (2.6hrs by the way). Basically it was just a bit of fun.

The talks were inspiring Stephen Friend greatly inspired and a group of sponsors explained the merits of their systems and API’s we could play with and there was a video message from Jill Tarter on SETIquest, in th style of some “your challenge if you choose to accept it”. As it is kind of familiar territory to me I was interested to see some of the API’s available from publication and research paper databases. So after more than adequate free lunchtime grazing I was ready to hack.

Rather than continue with the dashboard, in my usual fashion I started procrastinating about the options. My theory is hack days for geeks is equivalent to putting a small child in a sweetshop. So many tempting API’s,inspiration and enthusiam about you just don’t know which way to turn. I had a few other ideas inspired by the talks and got my machine set-up, suitably close to the seasoned hackers in case I needed some help or inspiration and started chatting with Mindy from Elsevier about the possibilities the newly released Scopus API could offer. After further chats with Jud and Michael from Elsevier B.V. this was the start of an hack. So the itch originally to be scratched was trying to help researchers solve the problem of locating citations amongst the many out there and especially try and handle cases where people may move around from institution to institution and there publications drop through the cracks. So demo API key in place I was away.

The API was interesting, I am used to REST interfaces or even SOAP when I have to but this was originally presented in a way I had seen but not really worked with. They exposed a Javascript object which made a number of calls to thier backend systems. It mainly returned HTML but you could overide that. I was mainly interested in working with JSON directly so I started to see if this was possible. Probing the Javascript object showed indeed it was handling JSON so it should be straight forward. IP restrictions incorrectly applied and a few initial hiccups about parameters to pass to the backend system and we were away just getting JSON returned, when the helpful Elsevier guys who had been communicating back with the office had the IP restrictions sorted.

So after all this I was away, but still not quite with an idea, however I did have a problem that I had discussed with some colleagues this API might help solve. So what did I end up building, a tool to help researchers who are writing papers keep alerted about publications made available, by author(s) or title keyword(s) or even affiliation (i.e University) right in the place where they are writing the paper, within a confluence wiki. I thought this may be useful. Then I finished off my dashboard – win win.

When it came down to presentations I presented both hacks, in a somewhat haphazhard fashion and was pleasantly surprised to win the Elesevier prize – a lego Mindstorm robot – thanks very much guys and also get an acknowledgement of the other three judges they thought the hack was useful.

So Science Hack Day on Jun 19,20 2010 in my opinion was excellent. Jeremy did a good job of organising it, he gives us an insight of how he organised it in his latest blog post. Obviously there were a number of key helpers too who deserve equal praise. The location, food and registration were what I had come to expect from attending other hack events at the Guardian and did not dissappoint. The inspiration was good, the depth of knowledge concentrated into the Guardian offices for the weekend was evidently outstanding – just see the list of hacks on the wiki. All in all lots of people did get excited and make things that were really cool. Of course if you want to know more there is a flickr pool, you can track the tweets from the weekend and beyond or one of the awesome side hacks Scilapse (hat tip to Carolina Ödman and her video editing skills as well as the really useful auth cloud hack she put together) lets you experience the whole weekend in a few minutes.

So it rated 5 out of 5 in my book. So much so it inspired me to blog about it. Something I haven’t done for a long while.