about me about me
photography photography
software projects software projects
contact me contact me

On Friday I went to the PHP UK 2010 conference in Islington, London with one of my work colleagues. There were three tracks, so between us we were able to cover most talks of interest. The conference organisers have said they’ll post the slides of each talk, with sync’ed audio, online soon. I’ll link the slides for these talks as they become available.

From the schedule, the talks I attended were:

PHP UK Conference 2010 talkI forgot to mention it on my feedback form but the WiFi was very good, considering there was an army of nerds hammering on it, it was fast enough and I never lost my connection (disclaimer: I was largely using it from my iPhone).

For anyone thinking of going next year, be warned, everyone had an iPhone – I’m pretty sure they don’t let you into the conference if you don’t own one! ;)

The talks prior to lunch were, time-wise, somewhat sabotaged by the key note speech overrunning.

Key note – the lost art of simplicity

Talk rating: 8/10

Josh Holmes raised some good points in his key note talk.

If you can’t clearly explain your solution, it’s probably not worth implementing

Josh said this was particularly important to ‘Enterprise’ business, where systems that go live can run for longer than your professional career. It’s a certainty that other developers will need to maintain or modify your code.

Gone are the days of a lone programmer writing enterprise software, free to obfuscate the code to keep his maintenance contract. If you’ve not distilled your solution down to what’s needed, and nothing more, you’re guaranteeing someone else extra mental baggage.

Developers have a tendency to over-engineer solutions

Sometimes we try to future proof our designs by adding features we think might be needed but in reality are sometimes never used. Ultimately this means we just wasted our time and added needless complexity.

Temptation to throw in the kitchen sink is stronger in the early years of your career as a developer, when you’re eager to use new technologies. Experience teaches you to concentrate on the problem and to solve it with the most suitable tool (at work anyway).

We strive for this at work, Paul (the CTO) has said on countless occasions do the simpliest thing that works.

Usability testing

This topic highlighted to me that we (developers at ASP) never meet the users of our software. Probably not a surprise in web development. We interact heavily with the editors of the product but never the end users, they sit on the other side of customer support.

Although we’re planning to address usability issues by hiring a UX Manager, we do not perform usability testing; watching customers use our software, employing heat maps to see where the mouse pointer moves or use event logging to see which features are popular and which are failing. We do listen to feedback from ALA conferences and similar.

RDBMS in the social networks age

Talk rating: 7/10

This talk heavily contrasted the key note, which talked about simplicity. I couldn’t help but feel a sense of irony in the first 20 minutes, as this talk involved some complex SQL used to efficiently traverse graphs and trees. It was fortunate I spent some time in November working with Dijkstra’s algorithm, which provided enough of a refresher to help comprehend the concepts in this talk.

Although the topic was interesting, having never seen Common Table Expressions (CTEs) or Window Functions before, the speed at which Lorenzo moved through the slides meant it was demanding trying to keep up. I doubt I was the only one but that didn’t stop me feeling like a developer sat in a room full of DBAs. I don’t think it was so much the fault of the speaker, as the morning talks didn’t get their allotted hour.

After the talk, I found that MySQL has no support for CTE’s or Window Functions. Other major DB vendors such as Oracle (with Oracle SQL’s CONNECT BY syntax for recursive CTEs), MS SQL 2005 and Postgres (since version 8.4) do support them.

You might be thinking ‘so what? I’ve never needed them’. If you’re building any social features into your products, you’d be surprised how many common features like connections distance to you on Linked in, or friends suggestions on Facebook could / do make use of CTEs.

Database Optimisation

Talk Rating: 5/10

This was one of the more disappointing talks I attended. Remo Gaigioni talked about the issues his company encountered when getting their search marketing intelligence tool to scale. The talk covered a lot of topics familiar (you hope) to most developers, using EXPLAIN to optimize queries, moving larger text fields out into separate tables, use of InnoDB to minimize locking, using replication and memcached.

There were features more specific to Remo’s application such as job queues that you might not use in your own app. Exact details were omitted but it sounded like his app was also write heavy and struggled with table locks.

The nuggets of information I got from this talk:

Replication is single threaded

Spec’ing a beast of a machine to run as a slave doesn’t make your binary log delay disappear. On a typical 8 core machine, replication is going to run off one of them. That’s not the say your slaves shouldn’t be more powerful than your master because they should – dealing with a share of the reads along with repeating all the writes from the master.

Use a work queue service for job queues (aka right tool for the job)

MySQL really isn’t the most efficient tool for job queues, sure you can share queue status information across a cluster of machines easily but work queue services like beanstalkd do a better job. Any work you can take away from the database is going to help what remains in it.

Recommendations from the audience included using MySQL-MMM in place of HA proxy for load balancing cross-replicating masters, and switching out InnoDB for the Percona storage engine.

At this point, the day felt like a mental yo-yo coming down from Lorenzo’s talk to this comparatively high level discussion.

PHPillow & CouchDB

Talk Rating: 6/10

Two points I noted from this talk:

  • CouchDB has no concept of schemas, consequently changing CouchDB views is less painful than ALTER statements in RDBMS’.
  • Debugging CouchDB’s Javascript views is a bit problematic at current. Erlang, the functional language it’s written in, apparently throws ambiguous error messages – a trait of functional languages.

So I felt like I’d come full circle with this talk, from promoting CTEs in a RDBMS to this talk about a NoSQL DB. I was looking forward to this as I’ve been reading up on CouchDB recently. I’d read Kore Nordmann’s tutorial on PHPillow before attending this talk as well. I recommend the free book on the CouchDB site as an insight about how it differs from the traditional RDBMS model.

Unfortunately a large part of the talk was spent explaining CouchDB, as a consequence we had to pick one of three topics to discuss in more detail: PHPillow, views and Map Reduce or scaling CouchDB.

The majority vote went to scaling CouchDB. We still had to skip a lot of slides, my estimate is around 30/70 slides due to time constraints. I guess I would have felt like I got more out of this talk if I’d not read up on the subject beforehand.

‘In search of …’ integrating site search systems

Talk Rating: 9/10

I thought this talk was the best one I attended, and I’ve a page of frantically scrawled notes as proof. Ian Barber did a great job of introducing the key concepts search engines employ, and how you can tailor your own site’s search to best Google’s results. He covered MySQL’s fulltext search, Sphinx, Swish-e, Lucene, Solr and Xapian (which we use at work). There are PECL extensions available for all of these.

I thought about using of one of these search engines on this site and possibly combining it with a page ranking algorithm as detailed in the free second chapter (PDF) of Manning’s Algorithms of the Intelligent Web.

Beating Google at it’s own game on your site is possible because you can employ ‘zone weighting’ (see slide 44). Google takes a guess using HTML tags, font sizes and other ‘one size fits all’ methods.

Features I thought might benefit products at work; use the spelling correction feature in Xapian and investigate sharding our Xapian databases to reduce the index size to address memory consumption in our ever growing data sets.

PHP code audits

Talk Rating: 5/10

I couldn’t help but have a little déjà vu during this talk. I was reminded of a SecOne course I attended back in 2005, the speaker used un-patched Windows 2000 Server machines to demonstrate exploits. It demonstrated his point but we were 5 years on from it’s release, with 5 years of security patches having been released. When you tried out these exploits in the Real World™, none of them worked.

The same thing struct me about the code examples and warnings being presented to us here. Don’t use eval(), avoid using register globals, be careful of include() injection via register globals. Didn’t we have this talk back in 2005 as well?

With the introduction of frameworks in PHP a lot of code shifted from procedural spaghetti code, as seen in these slides, to more structured object orientated code. Most PHP developers know that object orientation promotes encapsulation and information hiding, so you have to go out of your way to write global scope scripts that might fall prey to these issues. If ,for some unholy reason, you’re still running with register global enabled then you’re just asking for trouble!

Writing OO code and making use of autoloading means you can forget about include() & require() statements. Many devs now use a database abstraction layer and so don’t worry about SQL injection, as we utilise bind parameters. I don’t remember the last time I had to use a global variable. The same goes for eval(), do you remember the last time you used it?

So unfortunately this talk failed to deliver for me, after coming out of Ian Barber’s on a high note.

Conclusion

Would I go to another PHP Conference? Maybe, it really depends on the subject of the talks. Having never been to a PHP community event, part of my motivation to attend was curiosity.

On at least three occasions talks were cut short. Maybe in future, PHP conferences could have 90 minute slots, or talks that span two slots?

The the venue was good, location was good, directions were good, the WiFi was good, the free beer was good (thanks Facebook!) there just needs to be a bit of fine tuning with talk timings.


comments

No comments for this post.