[PHP North West 2017] – Conference Review

This was my fourth consecutive year attending PHPNW, which is now in its 10th year overall.

Why didn’t I attend the first six? I didn’t get involved in the PHP – or indeed any tech – community until then. Probably to my detriment. So, if you’re sat reading this and you’ve never been to a conference then I would urge you to find a local one and head along, even if you go solo (as I always do).

For once I was early, so managed to get a coffee before heading into the keynote.

Keynote – PHP in 2018 – Rasmus Lerdorf

This year the keynote was by creator of PHP, Rasmus Lerdorf.

I was very excited when the conference line up was announced and Rasmus was revealed as the keynote. I know, I know, major geekout, but still, this is the person whose hard work has allowed me to do what I do for the past 15 years or more. Without PHP I might still have found my way into software development, but the barrier to entry would have been significantly higher.

This talk covered a bunch of interesting topics:

Firstly, Rasmus suggested those interested in search technology like Lucene, Elasticsearch and similar should look at Vespa. I saw this on Hackernews the other day but haven’t looked into it as of yet. Rasmus suggested an entire industry might spring up around this, similar to Hadoop.

This slide caught my attention. Although way beyond my personal needs, it’s pretty cool to see that you can create an optimized PHP binary for your specific needs… at least, I think that’s what this is doing.

There were some interesting slides on the financial cost of power savings as a result of using PHP7+. This could be contrasted with Bitcoin:

Running Bitcoin uses a small city’s worth of electricity

I’m not sure of the orders of magnitude, but according to Rasmus’ slides, PHP drives 50% of the web which is ~1 billion websites.

Currently only ~5% of those are running PHP7.

That 5% equates to ~$200m savings annually. Plus a lot less CO2 in the air.

If PHP7 could reach 100% adoption this could save $4 billion annually, with 7.5 billion kg less CO2.

In other words – switch to PHP7 and save the planet.

Probably the coolest thing coming in PHP 7.2 (in my opinion) is Dead Code Elimination (DCE). What this does, from a very high level, is to analyse your code, and then silently discard any instructions that would have been redundant.

The funny part about this is that the worse your code is, the better your potential savings 🙂 And the joke of it all was that there’s likely a lot of bad code out there in PHP-land (especially if you listen to the haters), so things look rosy 🙂

The slides explain this much better than I could ever hope too, should you wish to understand how. Simply using PHP 7.2 (and especially 7.3+) will give you this benefit for free.

There are a few new features coming in PHP 7.2 that you may find use for. Honestly, there’s nothing here quite as big as those PHP7, nor 7.1.

There is parameter type widening:

You can use trailing commas everywhere:

You can now use object as a typehint:

Also Libsodium is now in the PHP Core. Crypto is not my strong point, but my understanding of this is that by having Libsodium as a part of the PHP Core that the resulting code that does need to use encryption, signatures, and password hashing will be more secure by default.

Rasmus gave this link for reference.

Phan was also covered.

Now I recently tried to use Phan against both a Symfony project running on PHP7, and also a legacy app that had a ‘custom’ framework. I struggled with it.

What I’d like to do is put Phan into my GitLab CI pipeline. I haven’t managed this yet as at the time it didn’t work for me ‘out-of-the-box’. I will revisit it though – maybe it would be a good topic for a video 🙂

One thing I did take note of was that Phan works a lot better if you use Docblocks in your code. Yet another reason to document 😀

Overall it was reassuring to see PHP as a language is still being very actively developed, and the future holds a good many treats for us as developers, without us really having to do very much (just upgrade to the latest release).

Slides

Meet Terraform – Michael Heap

From the keynote I headed to Michael Heap’s talk on Hashicorp’s Terraform.

Hashicorp make some great tech – Vagrant being the one you’re most likely to have heard of.

I had heard of Terraform before this talk, but was not too sure how it might fit into my personal dev / ops workflow.

My biggest question before this talk was:

How is Terraform different from Ansible?

Here’s what I concluded:

Terraform allows you to define your server / infrastructure setup as code.

For example, say I wanted three digital ocean droplets of a particular size, in a particular data centre, all named in a particular way.

Terraform makes this easy for me.

I would likely still need Ansible to actually install and configure the software that runs on these machines, however.

After Terraform has created the machines according to my spec, it could invoke my Ansible playbook commands to do this for me.

In short, the tools are complimentary, rather than competitive.

Michael shared a bunch of potential gotchas towards the end of this talk. You can find these from slide 87 onwards. I liked this as not only did it demonstrated Michael’s obvious real world experience in using the tool, but also that in reality, once you do start using Ansible, or Terraform, or whatever, they are never quite as simple as you might have been led to believe.

An example of this might be in what happens if you make a mistake. Michael explained that the taint command could be used to mark a box as to be destroyed and re-provisioned. This definitely sounded easier than when things go wrong with Ansible…

Morning Break

During the first break of the day I decided to quickly review the notes I’d taken from the first two morning sessions.

It was at this time I realised my handy note taking app – Gmail – had somehow deleted my draft. Sigh.

Needing a place to sit and hastily re-type my notes, I headed for the ‘Unconf’.

If you aren’t aware, the Unconf is the fourth talk-track. It only announces its speakers on the day, so you won’t find them on the official website. The talks here are shorter – 25 minutes – and often more advanced, or specific in subject.

As soon as I saw a talk about Symfony Flex I decided I would be in there for a while 🙂

Unconf – Creating Rich Universal React Apps Powered By RESTful PHP – Akihito Koriyama

There was a lot of detail in this talk – more than could be reasonably covered in 25 minutes.

A really useful takeaway for me here was in what the HTTP OPTIONS  verb is supposed to be used for. Now, here’s me thinking it’s just the annoying verb that often reports a failure when CORS problems occur 😉

OPTIONS , I learned, are (rather unsurprisingly, given the name) supposed to tell the API consumer exactly what can be done with any given endpoint.

Now this all assumes you are providing a truly RESTful implementation. In most of my projects lately I have instead opted for the simpler approach of providing a JSON API.

There was a lot of emphasis on HAL. All examples were given in the context of Bear.sunday though Akihito did also mention that API Platform offered similar functionality, for the Symfony-inclined.

I really enjoyed this talk. I wish I had taken further notes around Akihito’s implementation of Server Side Rendering, which has become a problem for me in the time since attending PHPNW17.

Unconf – Enfys: The Infant Year – Mark Baker

I had absolutely no idea what Enfys was before this talk.

You may not either, so allow me to enlighten you:

Enfys is the Elephant plushy representing diversity in the PHP Community.

This talk was all about the journey from idea to successful kick-starter.

This was an absolutely fantastic talk, well delivered and full of warm feels 🙂 It is obvious that Mark cares passionately about his project, and its wider implications.

I would strongly recommend reading the kickstarter page as it contains a great description of what this project is about, and why it’s needed. I confess my ignorance to issues like this well in advance. Being that I work almost entirely remotely, I have never experienced any of the problems that this project aims to address. Without attending PHPNW17 I likely would never have come to hear about this project.

I had to ask – what does Enfys mean? Mark told a wonderful story of how he came across the name. Again from the kickstarter page:

“Enfys” is a Welsh name meaning “Rainbow”, and is gender neutral (it can be used for both boys and girls), so it seemed an ideal name for a new Rainbow Elephpant, to promote Diversity within the PHP Community.

Brilliant.

Dinner Time

I wouldn’t normally spend too long on the dinner time round up, but at PHPNW17 I got lucky.

Rasmus, less so.

One of the strange parts about the PHP North West conference is that at dinner time the food is served in the main exhibition hall area, but you can eat in the unadvertised dining area.

Fortunately having been a few times now, I knew about the dining area, as eating a chicken steak stood up is not easy to do.

Anyway, in I went and being a loner, it’s usually fairly easy to find a seat.

I spied 3 empty chairs towards the back of the room, and plonked myself down.

Shortly after, Rasmus arrived back to his chair – the very next chair – and took his seat. Oops, had I stolen Rasmus’ seat? Alas no. Thankfully.

Anyway, not wanting to miss my opportunity, I asked if he’d mind my interruption for a question. He obliged.

After thanking him for giving me the opportunity to do what I do (in a roundabout way), I asked him: why Etsy?

Here is a person who can very likely walk into literally any tech job in the world – so I was entirely curious as to why he would take that job.

Rasmus explained how Etsy is a great choice if you want to make a real difference to the lives of artists.

There’s a ton of opportunities about (particularly in Silicon Valley) that are simply about making money for the various mega-corps, but Etsy enables real people to make a living from their art work.

I can identify with this not just because my wife is an artist, but because as coders a lot of what we do is more art than science. Well, at least that’s my interpretation of it. I can totally understand why Rasmus would take such a role.

Symfony Flex 101 – Renato Mendes Figueiredo

Symfony Flex is just around the corner. If you haven’t heard of Symfony Flex yet (come out from under that rock!) then you will do as of November 2017, when Symfony 4.0 becomes the new stable release.

My understanding of it is that Symfony Flex replaces the Symfony Installer. Symfony Flex aims to reduce / remove the boilerplate config needed to get most any Symfony bundle up and running.

The main point of concern I have currently is that this will possibly make it harder, not easier for those new to Symfony to get started. My own observations are that Symfony has lost a sizable chunk of new project market share over 2017 because of how difficult, by comparison, it is to get started with Symfony compared to e.g. Laravel.

Anyway, Renato’s talk was thankfully not about such things.

Instead it focused on how to use Symfony Flex to get a new project up and running. A live demo, over a potentially sketchy wifi connection is always fun, but Renato pulled it off.

Renato covered how to use some of the official recipes – for example to get the Web Debug Toolbar, and Web Server pulled into the project, and up and running without any configuration required.

Renato then covered pulling in, and starting a GraphQL server. All rather fantastic.

I thoroughly enjoyed this talk. I thought it was well presented, and the content was easy enough to digest in the allotted time. I found the demos interested, and the presentation style both relaxed and informative.

Great stuff.

Async requests and reactive responses with php-fpm – Holger Woltensdorf

This talk covered a problem that so many non-trivial PHP applications face:

How to do work in the background without it becoming a nightmare?

Typically when faced with background jobs I would reach for RabbitMQ. Holger showed that perhaps we could use PHP-FPM for the job, instead.

This is a really interesting project which I would advise you check out on GitHub.

The problem defined here has been puzzling me for a while. My personal experiences with RabbitMQ have been largely enjoyable in development, and largely horrible in production.

My own experiences tell me this is a really tricky and complex problem. The solutions to which are exactly the kind of black-box code that cause head-scratching and hair loss when they go wrong. If you have such a problem, potentially Holger’s library may offer you a solution.

As a side note I’ve lately been looking into the Elixir language as a potential alternative in this problem space. Some of the built-in features offer a potentially ‘simpler’ (or at least, less black-box-y) alternative. Time will tell.

Baking security into your workflow – Tim Nash

I have to admit by this point I was flagging. My brain was filled with good, useful stuff. What better then than a security talk!?

Fortunately Tim was full of enthusiasm and joviality, and was clearly enjoying presenting.

Tim drilled in the oft-repeated maxim of never trusting user data. Ever.

If you receive data from end-users then it must be validated. Good solid advice.

It made me think of how sometimes this kind of advice is really hard to bake into a real workflow, however.

For example, when working with Stripe and their Webhooks, one of their recommended practices is to verify the data signature. This is good advice, of course, but with some of Stripe’s Webhook data, it is impossible (to the best of my knowledge) to test – because the signatures don’t work in their faked / test responses. At least, that was my experience.

Of course this isn’t a slight on Tim’s talk in any way. It is simply that even with the best of intentions, security is flippin’ hard.

Tim shared a bevvy of useful tools, so here goes:

  • Kali Linux – full of hacker tools which you can pen-test your network / website(s) with.
  • Metasploit – I *think* this was the one Tim said was most Scriptkiddy-ish.
  • OWASP Zap – good, but possibly going to give false positives / noise
  • Vesuppi Garcon – detect a bunch of bad stuff via static analysis. Maybe useful in your CI pipeline?

A couple of other points made where:

  1. Disable registration on your WordPress blogs, if at all possible. And certainly don’t make the default user role to be Administrator. Lel.
  2. Watch your mail queue – often spikes are a great indicator of hacks.

The GDPR is coming, are you ready? – Michelangelo van Dam

The short answer: probably not.

The General Data Protection Regulation (GDPR) is a law that’s going to affect most everyone, as best I understand it. Essentially if you collect and process privacy related of EU subjects, you need to be paying attention.

(sorry that’s a terrible photo, and that’s saying something as typically my photos are terrible to begin with :))

Most big businesses have not got their acts together regarding GDPR as of yet.

You kinda ought to take this seriously, as if you suffer a data breach and are subsequently found responsible,and fined, you may very well be put out of business as the fines are incredibly steep.

One key takeaway from this talk is that you cannot be compliant with GDPR – you can only be ‘ready’. And defining ‘ready’ appears to be the biggest grey area of all.

It’s highly contentious, as was demonstrated during the QA section of this talk.

Hallway Track

For the first time ever at a conference I skipped a session (the closing session) to chat with a fellow dev.

I had a great chat with Rick West, who I encourage you to follow on Twitter.

Thanks Rick 🙂

After this it was back down the M61 for me, home in time for tea and medals.

Day 2

Yes, PHP North West is a two day conference over both a Saturday (all day), and a Sunday (till 13:00).

I missed the opening address – in fact, I didn’t even know there was an opening address on day 2 until reviewing the schedule for this blog post. Whoopsie daisy.

Chatbots and PHP – Katy Ereira

This was my favourite talk of the entire conference.

I remember relatively recently having a discussion with my wife about how, when I used to go to a bunch of business networking events, I was always getting asked “do you make apps?”, and “how much for an app?” etc. So many variants. So many people wanting the next Facebook for £1000.

Anyway, I don’t go to any of those business networking events anymore. Success.

But after hearing Katy mention how Bots are the new Apps, I do wonder now if the questions have changed to “how much for a bot?”. Thankfully, I’m happy to wonder.

I really enjoyed this talk because of how wonderfully practical and inspiring I found the content.

The examples were clear, and I could envisage real world use cases immediately.

The concept for the bot used in the talk was to accept restuarant reservations. To begin with this began as a command line app, but Katy explained how this could be turned into a Facebook or Slack bot without a huge amount of effort.

Times have moved on since I last looked into some of the concepts behind how these bots work. I remember working with spammy article spinners that would convert / spin articles using { he | him | man | person } sorts of thing, and the resulting articles came out at about the same quality as paying $5 for 10,000 words on odesk (ahem, upwork :/).

Nowadays, however, we don’t need to concern ourselves with such matters. Instead, Katy explained how we can simply hook into Google or Facebook’s AI, and get them to figure out what the user is talking about. Very fascinating, though I’m somewhat dubious about Google / Facebook’s longer terms plans from all this data collection.

Skynet was mentioned 🙂

Some interesting links:

Beep boop.

Teaching the next generation – Michael Woodward

I attended this talk as it seemed to be inline with what I’m trying to do.

Michael introduced us to his project – PHP School, which if you have ever used Node School should feel instantly familiar.

Taking ownership of your learning is a concept I feel more developers should pay attention too.

I strongly believe that being a software developer – if you enjoy writing software – is the best job in the world.

MySQL Worst Practises: Bring your system to its knees – Andrew Moore

After a somewhat unusual start, this talk was amongst my favourites of the conference. Fortunately I don’t do a huge amount with vast volumes of data in databases as of late, and haven’t had to do ops tasks on such complex setups as described for a good long while.

sorry this photo is bad 🙁

This talk, as the name suggests, focused on stuff that you ideally should not do if you want to get your 8 hours of sleep per night.

These included:

  • Don’t use NFS

Putting your database on disk accessible via the network introduces latency, which makes people sad.

  • SAN / NAS also not good because of the latency, and are effectively an expensive single point of failure.

NetApp were mentioned. Ho ho.

  • RAID 10 is preferable for your DB disk
However, we aren’t all made of money. Mirroring and striping are costly. But then, so is losing your data 🙂
  • Don’t put your temp dir on same disk as the data dir

Say no more.

  • Don’t use Windows as server

I wasn’t going to write anything further here, but Andrew did expand on that this is because lack of access to good MySQL tooling.

  • Don’t use MyISAM
Yesterday tech for today’s applications. My sides.
There are a bunch of other tips in Andrew’s slides which I am unfortunately not able to locate. If you do MySQL beyond the basics then I would urge you to watch the video of this talk when the vids are released.

Closing Keynote: For The Love Of Code – John Cleary

This talk had a couple of important points that left a lasting impression on me:

  1. If you want to do the Keynote, then you should ASK.

I don’t want to do a keynote. As a matter of fact, conference speaking in general holds very little appeal to me.

But asking is so, so important.

One of the hardest things do as a developer can be to ask for help. It feels like defeat.

However, often those around you would much rather you simply ask early, rather than spending hours / days / weeks going down rabbit holes or feeling lost / confused / distressed.

What’s the worst that can happen if you ask? You get rejected. Rejection sucks, but at least you asked. Now go ask someone else 😀

2. Test Your Core Values

In order to test your core values, you need to know what your core values are.

Now this exercise is beyond the scope of this blog post, but it’s well worth taking the time to do this, even if it feels like bull hockey.

The content of this talk is based on the book The 7 Habits of Highly Effective People by Stephen R. Covey. Also his website is built with PHP, so no excuses.

My only criticism of this talk was that it was too short. I’m not even sure why it was so short, perhaps it was explained but I missed it.

And On That Bombshell

All that remained was for the conference to be closed for another year.

At this point Jeremy dropped the bombshell that this was to be the last PHP North West conference for the foreseeable future.

I can understand this: plenty of conferences organisers have stated just how physically and emotionally taxing it is to run a conference, and after 10 consecutive years the entire crew of PHPNW are only to be applauded.

And indeed they were, with a standing ovation.

I’m not sure how to take the news that PHPNW18 won’t be a thing. I’m not sure what it says about PHP. This was the (possibly unanticipated) message that I pondered on my journey home.

The truth is PHP is not a sexy language right now. It hasn’t been for a good long while, and possibly never will be again. Depending on where you are in the world right now, there may be a language that is dominant in your location.

Typically that language is JavaScript.

I don’t see any immediate issue for PHP. For the next decade or so everything should be business as usual.

But as we approach 2030, will PHP still be relevant? It’s hard to say. And it ties in with the decline in new developers taking an interest in the language.

Anyway, rather than end of such a downbeat note:

I have thoroughly enjoyed my previous four years at PHP North West, and want to say a huge thank you to everyone involved in making it happen. I hope to see you all again in the future 🙂

PHPNW16 Conference Review

With the family addition, client work, and growth of CodeReviewVideos – amongst many other things – this year has been incredibly busy. I wanted to attend three conferences this year, but as time has been so limited, I have had to rethink that. I distilled my initial list down to only PHPNW16.

Having attended the excellent PHP North West for the previous two years, I really didn’t want to miss this one. Also, it is the most local – being 45 minutes away – so was the most practical, and relevant. All in all, the best use of my time.

I managed to grab a blind bird ticket way back whenever they were released, which means you buy the ticket without knowing anything about the speaker line up. It’s a fairly safe bet, based on the previous two years.

Conference attendance levels seemed high. I have no official figures, but the opening address was packed out and the UK Fast intro video kicked everything off with a few laughs – followed by Darth Vader visiting the stage.

darth-vader-on-stage-phpnw16

By the way, just like last year I must apologise for the quality of my photos. There doesn’t appear to be a phone created that can accurately still my shaky hands. Also, I have the near perfect knack of being able to get either the speaker, or the slides, but never together.

PHPNW16 Keynote – A World Without PHP by Ben Marks

There were some interesting points raised during this talk, echoing my own thoughts on the current state of PHP. Ben raised the point that looking around the room, generally the age of attendees was perhaps older than you may find with certain other popular languages (ahem, JavaScript). I hadn’t actually noticed this till it was pointed out but it’s true. Most of the room seemed 30+.

This is a concern for me. With fewer young developers coming into the language it raises questions about the long term future of PHP. I should state here that by long term future I mean decades. I don’t forsee PHP disappearing from the business world in my working lifetime, but that’s not to say most PHP roles won’t simply be supporting legacy / soon-to-be-replaced software with the new and shiny.

This saddens me, honestly. PHP gets an unfair level of bad press, but if used well, it is still a brilliant back end language for your typical web project.

What I’m noticing in my client work is the junior / newer devs only know JavaScript. They know front end JS, and back end JS, but beyond that they aren’t willing to pick up what is generally a language with bad press. I understand, but disagree.

php-nuke-at-phpnw16

It was nice to see PHP-Nuke get a mention in the slides 🙂 That brings back memories.

I liked this talk as it was provocative. I can’t say I came away from it with a renewed positivity towards PHP. I think the down hill trends in popularity will continue while newer devs remain undecided on which back end language outside of JS is worth their time learning.

Continuously Delivering – James Cowie

James’ talk was a great way to kick off the conference proper. I could really gel with his experiences and frustrations of modern development in the trenches. Chief of which appears to be feedback time, the time between which he and his colleagues implement a feature through to the time his stake holders (his peers, his internal QA resources, and the businesses client) respond with how well his changes / features hit the brief.

james-cowie-continuously-delivering

A number of his solutions were hugely suitable to larger organisations. Continuous deployment / delivery (there is a difference, see the following slide) are generally most widely used in larger organisations, but I’m sure there are other developers like me who use them as solo developers.

phpnw16-james-cowie-talk

This fact inevitably leads to a whole bunch of Software as a Service (SaaS) offerings – which is fine, if you are a big business with a big budget. For smaller scale operations it is a lot more difficult to justify the expenses of some of these software tools, no matter how good they are. Having many small bills for individual parts of your development process can easily add up to large amounts, if left unchecked.

A big part of the talk for me was around feature toggles. This is something I have seen mentioned quite a bit recently, and I haven’t seen a defacto solution to the problem. James offered a bunch of useful tools and approaches, and also pros and cons to each approach. I found this very valuable.

I can’t wait to try out some of the tools mentioned in this talk. Whether I will use them or not is yet to be seen, but knowing they exist is useful in itself.

Coffee Break

During the break I had a chance to look around the sponsor stalls. I ended up having an interesting chat with the Sainsbury stand, who were running a competitive Kata session.

phpnw16-uncon-track-a-work-in-progress
uncon track revealed at first break

You’re able to check out the project yourself and see how you fair. They assured me this wasn’t a recruitment tool, but top tip, check out the github repo if you are planning on interviewing there as there is a recruitment repo to peruse 🙂

Running PHP on NGINX – tips and tricks for high performance websites

I found Harald Zeitlhofer’s talk highly informative. Plenty of interesting examples illustrated each point made, and knowing a little Nginx made the talk easy enough to follow. There were plenty of take away tips.

harald-zeitlhofer-phpnw16-nginx

With so many ‘things’ a modern developer is seemingly expected to know, recently I have switched to a different approach in learning about the more “ops” side of things.

Rather than try and setup my configurations in the most highly optimal way, I instead rely on the open sourced configs shared in the most popular ansible repositories.

I’ve talked on this before, particularly in my Ansible course here at codereviewvideos.com, where I highlight how using a tool like Ansible enables you to leverage the expertise of true experts in any given technology.

A good example of this is in the configuration of a modern web server such as nginx. On your own you could spend days / weeks / months (or even an entire portion of your career) devoted to highly optimising nginx. The tips to be gleaned from experts like Harald Zeitlhofer are the results of his years of experience.

I was glad to see a whole bunch of the tips and tricks in this talk where already included in the Ansible scripts for nginx that I use these days. That said, I still gained a whole bunch of new tips, some of which are:

* pcre_jit on (for speed boost in any locations with regex)
* fast_cgi_finish_request() – keep your client responses snappy, then do slower stuff
* Memcache direct responses via nginx
* open_file_cache for keeping static assets file handles open
* Upstream makes it much easier to use nginx as load balancer

I really enjoyed this talk.

harald-zeitlhofer-i-love-this-slide
This is an amazing picture

Dinner Time

The dinner time session was a little confusing. From the third room we streamed back into the refreshment / sponsor area to be greeted by staff serving steak and self serve spuds / veg. Piles of forks but no knives? Also… Nowhere to sit? Thankfully having attended before I knew there was a designated dining area that thankfully did have cutlery and seats, but plenty of others stood round trying to eat a steak one handed.

Graylogging to the beat – Matt Cockayne

graylogging-to-the-beat-matt-cockayne-phpnw16

Another thoroughly enjoyable talk this time by Matt Cockayne, about a topic I have invested quite a bit of time I to recently: logging. Specifically with graylog.

matt-cockayne-php-boy-scout-phpnw16

I’m a big fan of Graylog, as between it and the ELK stack, I have found it to be the much simpler of the two to get going. This ultimately means it gets used a lot more. And that’s even with Ansible scripts taking away most of the pain.

There were some nice live demos here, always fun and potentially hazardous, but both went off without a hitch – a testament as much to Matt’s talk practice no doubt, as to Graylog’s simplicity.

I learned some new stuff here around Beats by Elastic. I need to do more digging here, but it seems interesting on the surface.

Lastly Matt was in full scout leader regalia. Full credit for this, I’m not sure if he rocked up to the venue in the morning dressed this way or changed once on site, but that’s a sure fire way to get an audiences attention.

Kicking off with Zend Expressive and Doctrine ORM

I went in early to this talk from James Titcumb, determined to get a good seat. My friend Matthew Setter is big on the whole Zend-sphere and I was curious to find out more.

phpnw16-asgrim-booklibrary

Attendance of this talk was surprisingly lower than I expected. I’m not sure why that is, as this was an excellent talk that deserved more attention. I came away with a better understanding of a Zend Expressive app than I had to begin with, and seeing how Doctrine ties in was very helpful.

zend-expressive-config-james-titcumb-phpnw16

Around Zend Expressive I am still not yet sure if I would use it. It seems fully featured but I’m put off by the amount of config involved in getting started. It seems you need to write as much config as you do code.

asgrim-phpnw16

And what worries me is that learning all this config is a big upfront cost if you end up switching to a competitor (slim, lumen, silex) if you don’t gel with it.

That said, it may well be worth it to get using PSR7.

I was happy that I would get to see Expressive’s big brother in the very next talk by Gary Hockin. Back to back Zend to end the day. As I say, I’m not sure I will ever use either of them in production currently, but that’s no excuse not to see what they can do and hopefully learn a thing or two in the process.

Being Ready for ZF3

gary-hockin-being-ready-for-zf3-phpnw16

Again, lower attendance than I expected. I’m really not sure why. When Gary asked who was using Zend Framework almost everyone in the room raised their hand. I’m guessing that’s indicative of the people who attend a Zend talk, and a representation of Zend Frameworks current position in the php ecosystem.

This talk would have been perfect for any working ZF developer. For me as someone who is basically a Zend Framework newb, I felt a little out of my depth. Factories, invokables, invokable factories…

What I do like about Zend is they are seemingly making themselves extremely component friendly. Everything seems to allow using one of many implementations, and you don’t need to use any of Zend implementations to make it work. I think that’s a really cool idea, and can only help adoption.

The downside – in my mind – is debugging may be a touch harder, as in finding a StackOverflow thread that uses your specific set of dependencies may be trickier. That’s just a guess.

In truth this talk was way over my head. If you use Zend Framework in any way then I would point you at the video of this talk (once it is available) as it’s info you will very likely need to know.

There were two tips that looked like the sort of useful information that needs sharing:

zf-3-gotcha-phpnw16 zf-3-useful-tip

I know my photo sucks on the second one, so pester Gary on twitter or his jetbrain’s email if he hasn’t already shared his slides on joind.in by the time you read this.

PHPNW16 – Day 2

I was unfortunately a touch late arriving for the start of the second day. Family commitments, and needing petrol, combined with a 45 minute journey, then finding a parking space… All my own fault.

extracting-wisdom-from-stupidity-ramon-de-la-fuente-evolution-php16

The first talk of the day was on extracting wisdom from stupidity. I would like to say this is something I don’t have to do very often, but I’m all too aware that when I make mistakes (which is more often than I would like) they are usually, at the very least, daft given the benefit of hindsight.

An interesting take away from this talk for me was in having names for some approaches I already use. When encountering problems you can apply logical or lateral thinking in finding a solution.

I boiled this down to approaching the problem from different angles. It sounds easy / obvious, but as a developer it is all to easy to become so consumed by a problem / bug that we focus exclusively on the approach that might “just work”, rather than exploring other angles of attack that may lead to a much more optimal solution.

Another thing I would add here is its amazing how big a difference a 5 minute break away from your computer can make when thinking through a problem or bug.

extracting-wisdom-from-stupidity-ramon-de-la-fuente-crazy-array-raffler-phpnw16

There was a really fun example used throughout which was Ramon’s attempt to write a raffler – a piece of software for picking winners of a raffle – using every single array_ function. Apparently there are 50 of them. I feel there should be some Steam-esque achievement for things like this.

The talk ended with a nice takeaway point. Consider rephrasing your question from:

I don’t understand how this can happen!

To

How can I make this happen?

This should help greatly in your approach to debugging / problem solving.

Queues with RabbitMQ by Lorna Mitchell

rabbit-mq-with-lorna-mitchell-phpnw16

For my second session of the day I attended Lorna Jane’s talk on RabbitMQ. Any unfortunate who follows my other interests will know all too well that queues are my current favourite topic. I am somewhat aware that they are my “hammer” as of late, and I am always out looking for nails to hit with them. Or something.

Lorna obviously has great enthusiasm for the topic and this was evident throughout the knowledge exchange. Two (terrible) queueing puns in one sentence.

Two questions I had were addressed in the talk: how to handle failed workers (Supervisord, or upstart); and how should I be handling retries (manually).

Another takeaway from this talk was in versioning queuing strings, something I am not currently doing but which is exactly the sort of excellent tip that only those with more experience will have learned and, thankfully, thought to share.

I hadn’t thought to handle empty messages, so again another really useful bit of insight into potential future problems.

Lastly, dead letter queues, these seem to be the answer for jobs that should work but perhaps some third party API is down during the processing of the job. This is something I need to investigate further – again a potential future problem.

My only quibble with this talk was in the lack of time for questions at the end. Often questions are asked that either I would not have thought of, or have an opinion on already but am interested in alternative viewpoints. Lorna did mention she was available to take questions, but outside of the Q&A section these unfortunately don’t get shared publicly.

Websockets and Torrents – James Mallison

This talk was packed full of technical, which is always great. The downside was I couldn’t see the screen so well. In hindsight, simply closing the back curtains would have improved the visibility massively. I was convinced it was darker on the Saturday, and looking back at the photos for Harald, I think it definitely was.

Generally having been doing quite a lot with Elixir and Phoenix (particularly Phoenix) as of late, conceptually I could piece together what James was talking about and relate it to what I knew.

The thing that surprised me, and maybe it shouldn’t have in hindsight, is that whatever language you use for web sockets, the process is largely the same. This is similar to creating and consuming queues with RabbitMQ. If you view the examples on the RabbitMQ home page, though the syntax differs, the concept / theory behind the implementation is similar enough between languages. As I say, obvious in hindsight.

websockets-and-torrents-james-mallison

It was clear that within researching and implementing this system that James had encountered a bunch of problems and accompanying solutions that bring about the kind of experience that only come through experimentation and curiosity. I wish more developers shared this level of passion.

Being a more technical session I am glad this one came as the third session of the day.

I loved the story element behind using pre-paid credit cards to fire up an untracable Swedish VPS. It’s certainly a more paranoid approach than I usually take when downloading the Ubuntu torrent 😉

I learned here that ws:// and wss:// are like http:// and https://.

James also recommended a talk from PHPNW15 which I have added to my playlist.

PHPNW16 Closing Keynote

The closing keynote was titled: Using Open Source for Fun and Profit, by Gary Hockin.

open-source-for-fun-and-profit-phpnw16

I thought this talk was excellent. It was humourous and fun, but also relevant and relatable.

I could not agree more with the points Gary raised around the benefits of contributing – in whatever way you choose to do so. One of the particularly important points was in starting a (or regularly updating you existing) blog. I think this is absolutely crucial for the modern developer.

gary-hockin-closing-keynote-phpnw16

Gary rasied the point that yes, contributing to open source can be scary. Your first public pull request is very likely to be a tense moment – more so for you than for the project 🙂

The example used here was in Gary’s first (and subsequent) commits to Zend Framework. He highlighted how he was effectively getting free code reviews from extremely clever and talented developers. If you were to bring these very same developers into your organisation and get them to do consulting for your internal projects, these very same code review sessions would cost hundreds, if not thousands of pounds.

But there are more benefits than this – contributing can lead to an increased number of social connections. These people share your interests. Over time these people may very well become your friends. These friendships are valuable for many reasons.

contribute

I honestly think my summary of Gary’s closing keynote has not done his talk justice. I really enjoyed this talk, and I thought it was a perfect end to another great year for PHP North West / PHPNW16.

See you all at PHPNW17 🙂

PHPNW15 Conference Review

phpnw15-logoThose of you on the mailing list, or following along on Twitter will know that over the weekend of the 3rd & 4th October, I was out and about at PHP North West 2015.

Thankfully, this year we had a bit of a heatwave so being up and about early on both the Saturday and Sunday was not the icy frost-fest that last year entailed.

I booked my ticket as an early blind bird this year – on the day they were announced if I recall correctly – and I was still ticket #49. That should give you an idea how popular this conference is.

And there is the un-con to get too, the line-up for which isn’t announced until the day.

A quick note on the venue – super easy to find, a £2 all-day car park (each day) right next door, and plenty of space for however many delegates there were (300+? 425!). Same venue as last year, hope it’s the same next year.

Keynote – Stealing People Lessons from Artificial Intelligence

Saturday kicked off to a jam packed room with the keynote from Meri Williams.

I was left feeling really happy after this talk.

There was a slide on Motivation. I didn’t get a shot of it unfortunately, so here’s a screencap from Meri’s website:

meri-williams-phpnw15-motivation

I answered YES to each of these questions for both Code Review Videos, and for my client work. Awesome.

There was also this slide:

meri williams clue skills matrix

Finding people in the top right has enabled me to grow both personally and to help grow Code Review this year. For that I am extremely grateful.

What To Expect from PHP7

After the coffee break, I returned to the main hall to catch Lorna Jane’s talk on PHP7.

I can’t photo, but:

lorna jane - php7 is coming and it is fabulous

After listening to Lorna’s talk, I too am convinced.

I must confess to having not yet had a chance to play with PHP7. I have heard it is lovely and fast, but in truth, I always found PHP5 to be pretty fast compared to doing the same things manually… especially if you remove all the layers of ‘stuff’ that we pile on top of it.

The speed improvements do sound nice, but the syntax improvements are the bigger news for me. Particularly the null coalesce operator. A crazy name for a very useful concept. Also, Googling for this has to be easier than the first time I Googled for what turned out to be the ternary operator (‘question mark colon php’?)

A quick code sample:

// $a is not set
$b = 16;

echo $a ?? 2; // outputs 2
echo $a ?? $b ?? 7; // outputs 16

(Full credit – Lorna Jane)

Lorna has a write up on this very topic so be sure to check the credit above from the full article.

A First Look at ZF3

This was a very enjoyable and informative talk by Rob Allen, who I had previously managed to watch on YouTube regarding PSR7 (audio ain’t great unfortunately, so watch with decent headphones).

I am really interested in what the future holds for Zend Framework.

The early part of this talk was encouraging – ZF3 has got it’s act together with regards to project maintainability. Like it’s competitors, ZF3 is now much more modular and (properly) made up of composable components managed with Composer 😉

rob allen a first look at zf3

If you are a mailing list subscriber you won’t be so surprised to hear I was very much enthralled by the section on Middleware.

rob allen zf3 middleware

I genuinely think this is going to be biggest thing in PHP – except for PHP7 – this year. Ok, well… there’s not much left of 2015, but 2016 is definitely definitely going to be a big year for Middleware in PHP.

rob allen zf3 middleware detail

I also really liked what I heard about how ZF3 will enable the construction of “specific builds” – a ZF3 build for web apps (MVC), a ZF3 build for APIs, etc. That sounds awesome.

Middleware sounds like it’s going to be huge for ZF, and they are even porting integration into ZF 1.13.

Lunch Break

The food was really nice. However, hot and spicy chilli chicken with no napkins?

Come on now.

Hitting the Uncon

The uncon unfortunately didn’t have a time sheet outside the door. Instead, attendees were asked to head over to the Joind.in page to figure out what was on when. These talks were mingled in to the main track talks which was a bit messy and harder to follow than it need have been.

Please put out a proper written list in the future if possible.

The PHP Framework Engine (PPI)

The first talk I caught was by Paul Dragoonis, introducing a PHP Framework that’s not a framework – PPI.

Now, PPI is a bit of a tricky name to compete for as it’s a very spammy term and a thoroughly dodgy industry. Paul’s framework that’s not a framework had had the name before PPI became a thing, so he was sticking with it.

From what I gathered, Paul and the PPI Framework are pushing boundaries – perhaps two to three years ahead of where the mainstream frameworks are.

His idea is that you can combine all the best bits of each framework – using Aura for Routing, Symfony and Doctrine for entity management, and Laravel for templating.

I can’t say I fully understood how this all worked together, but the concept is certainly fascinating.

How to Migrate Anything with DDD

I really liked Gabriel’s presentation. He was speaking about Baleen Migrations, and managed to get a tech demo in there (that all worked flawlessly).

Gabriel Somoza How to Migrate Anything with DDD

There’s only so much that can be covered within 25 minutes, and unfortunately the architectural side of the project (the DDD part of the talk title) wasn’t covered.

As a tool however, this looks really, really nice.

Also, after having Googled for Baleen, it turns out that Baleen is a type of Whale – hence the name for a migrations library. Nice touch.

Driving Design through Examples

Ciaran McNulty’s talk on BDD and DDD with Behat and PHPSpec was perhaps the most personally relevant talk I saw all day.

The big win for me – I have been doing DDD and BDD right!

This is great as I’ve done an absolute ton of reading on BDD – how to best write specs, how to improve the specs by asking questions, and really drilling down into the detail of a problem by asking questions.

However, I still learned an absolute ton. Ciaran and the rest of the Inviqa team are – as far as I am aware – the foremost experts on this subject in the UK, and any opportunity to learn from them and improve my own processes and development is always extremely welcome.

Unfortunately, the pictures I took of this talk are amongst the worst of them all – which is saying something as the rest are pretty bad to begin with.

cairan mcnulty ddd and bdd with phpspec and behat

If you squint hard enough, what you can see here is named constructors in action. Very cool.

Ciaran’s proper slides are here.

Thoroughly enjoyed this talk!

Hello, PSR-7

A small confession. I have listened to (almost) every episode of That Podcast, so stole in extra early to this one to say hello in person to Beau Simensen. Amazingly, Dave then walked in and I got to meet him too.

And then, because I was on the front row with all the A-Listers, I got to meet Rob Allen and Lorna Jane – speakers from earlier in the day, for those not paying attention – so this was all kinds of awesome.

Everyone was super nice and that was a great way to (almost) end the day.

Beau’s talk was very interesting. Being dedicated to PSR7, and with a longer time slot than I had seen of Rob Allen’s PSR7 talk mentioned earlier (the YouTube link), I got a better / more in-depth understanding of the topic.

I came out of this talk convinced that PHP is, on some levels at least, going to be able to offer somewhat similar functionalities to something like Express JS in the not too distant future.

Hometime

That was it for me for the first day. I didn’t stay around for the closing remarks of day 1 as I had to be home to take over family duties.

In my absence, I somehow managed to win a book:

Agile Project Management and Scrum

I’m not sure who I won that from, or why, but thank you all the same.

Sunday

I arrived on the Sunday morning in good time and found the halls largely empty. Yikes. However, I need not have worried as it seemed everyone had skipped the coffee and pastries areas and headed straight for the three conference rooms.

Getting things done with ElasticSearch

I learned a ton in this talk.

I’ve used Solr for a previous project and have been wanting to properly dive into Elasticsearch for ages now.

The main thing stopping me from doing so is the seemingly over large depth of knowledge required just to get started.

elastic search in action talk

After listening to Thijs Feryn break down the overarching concepts, I did feel a little more at ease.

There’s so much cool stuff in there. Stuff that can really add value to a wide range of projects:

elastic search stuff i didnt know

Elasticsearch – or search in general – has to be the next thing to add at Code Review. It shames me that it isn’t there yet.

Ways To Measure Your ORM’s Cost

Stuart Herbert is clearly not only just a very smart and knowledgeable guy, but you can tell he has been there and earned his stripes first hand.

All the problems and solutions discussed in this talk were aimed at growing, through to larger businesses. It’s nice to have tons of traffic, but that brings with it a new set of problems.

Suddenly your site is slow. Is the solution to add more servers? Possibly, but that brings with it a new set of headaches. Those early short cuts you took with straight-outta-the-manual Doctrine :

$products = $repository->findByPrice(19.99);

What’s that really doing behind the scenes now that you have 40 other entities all hanging off it?

Those sorts of questions.

I have done some videos on this topic as it’s really not that much harder to do it right first time.

I knew from the first few slides that I was going to enjoy this one:

ways to measure an orm cost

This chart was really eye opening. Pretty obvious really when it’s pointed out to you.

Your laptop’s hard drive is nothing like your servers. You definitely need to be measuring the real world.

why dev machines lie

Great talk, with tons of take away points and a really open presenting style that brought out some interesting and relevant audience participation. 

Closing Keynote: Developers are just like humans

I ended up in the overflow room for this. That’s a nice thing in a way – proves that Sunday was very popular, just as last year.

closing keynote with skoop

I found this one a nice way to end the conference.

developers are just like humans skoop

 

Swaggles

I would have been happy just getting the Behat stickers.

The Sky bag came with a ton of freebies. Thanks, though the chocolate bar tasted like cooking chocolate… yikes. Feel free to feed that back to Rupert.

That little grey and green thing in the top centre? It’s a phone stand. No one seemed to know. I had to ask. If a conference full of devs don’t have a clue, I’d say someone at Merch HQ needs to go on a UX course.

swag from phpnw15

And so that was that.

Now I just need a weekend to recover.