Phase.org

This Too Shall Parse

Thoughts on Software Development by Richard George (richard@phase.org)

New Flickr Set: Nice June 2009

2009-05-30 14:27:23

Holiday pictures from Nice

New Flickr Set: Katie, May 2009

2009-05-03 12:09:54

New Flickr Set: Kew Gardens, 020509

2009-05-02 12:23:27

Featuring the rarely-flowering Titan Arum (http://www.kew.org/plants/titan/).

New Flickr Set: Bliss / LPMG London Marathon

2009-04-26 10:49:55

Please contact me prior to any use of these photos. Higher resolutions are available.

New Flickr Set: LPMG Richmond Park

2009-04-18 14:46:16

#Amazonfail - an apology is not an answer

2009-04-14 11:34:00
I'll assume, for now, that you've been following the #amazonfail fiasco, as I don't have time right now to explain what happened. For now, I just need somewhere to post the following observations:

Amazon still have a lot to explain, and seem to think that if they (finally) issue a big apology, everyone will be so impressed with it that they won't need to give any more answers.

But we still don't know:

- If there's a real "No adult content" policy, or some variant thereof.

- Which state, nation or market they are implementing this for; it *seems* to be one at least as "conservative" as the christian right, and I wonder if it's an arab or asian market. Or possibly China?

- At what level this policy decision was made

- What criteria they are using to select "bad books" (both the "moral" criteria and the technical parameters to which they seem to match so badly)

- What form of crack their book taxonomy system is based on, anyway

- Quite how this big a technical fuck-up (presuming it really is a localised policy change that escaped into the wider world) happened

- How long this policy has been going on for

- Why it took them so long to respond coherently (and of course whether the "most official" response is any more true than the rest)

- How long it took them to work out what was wrong themselves, assuming they even have

When they explain that, preferably on the front page of Amazon.com, it *may* be time to say #sorryamazon instead of #amazonfail, but I very much doubt it.

The Essentials of Ubiquity

2009-03-27 19:53:00
I stood waiting for a bus last night. I knew it was a number 4; I knew it was suposed to arrive at 10:01pm, and that it should take about 14 minutes to get me to Waterloo, where I could catch a train home.

What I didn't know was when, or whether, it would actually turn up. There was no "countdown" display on the bus-shelter, so the information available was entirely based on paper, ink, and "should".

This struck me, in an age where the capabilties of our daily, hand-held technologies are developing at an ever-increasing rate, as frankly somewhat poor, even disappointing. Someone wasn't trying hard enough.

I own an iPhone. It's an incredibly polarising device; excessively loved by some, unnecessarily maligned by others. It does, however, have one point very much in its favour:

What it claims to do, it does. Well, and with excellent stability. In Apple parlance, It Just Works.

There are of course things it won't do. Copy and paste functionality is the classic example of what it lacks, much lambasted for the omission of such a simple, widely-supported feature. It's a bit of a riddle until you then ask yourself "but what is the standard, accepted way of supporting copy and paste on a multi-touch, gesture-driven device?" Of course there isn't one, and Apple's perfectionist attitude was that they'd rather not do it if they couldn't do it well. We'll see how well their implementation works in the mass market in a few months.

iPhones, after all, evolve. The device I bought on the launch day of the 1st gen phone was a very different machine when I sold it to get the 3G (mainly for the memory). The rule on "iPhone 1.0" was "This is a totally closed system; we give you maps, calendars, and the other standard PDA/smartphone basics, and if you want to do something clever, you go to the web". When I sold it of course it supported third-party apps, and had mapping capabilities vastly greater than when I bought it, among numerous bug-fixes & small enhancements. That process means that on those rare occasions when you do find a fault in the system, you don't feel you bought a dud device, just that you may have to wait for it to improve.

For copy and paste, of course, that wait was rather longer than we expected. But I digress.

The point I made above was that the iPhone does what it claims to do. I've been using smartphones and PDAs, generally from the Palm/Handspring stable for years. Their basic features all worked, but they were self-enclosed (trying to get them to talk to a PC or Mac was always hit-or-miss) and frankly clunky. Third party apps were of course supported, but generally pretty darn poor. Different versions of the Palm platform confused apps which frequently fell into disrepair, or just didn't work in the first place. Of course, the iPhone platform changes too, but with apps sold on a subscription model, they tend to evolve and be fixed in just the same way that the phone itself does.

My point, though, is not to write a paean to the iPhone; there's plenty of those around already. The focus is this: there now exists a stable, high-res, high-power, widely adopted portable platform with decent autonomy, and capabilities that until 5 years ago or less were science fiction, or at best divided into dedicated (and generally fairly dumb) gadgets.

The best example (and the best described, in terms of human impact) of these integrated Sci-Fi gadgets, by the way, are Kim Stanley Robinson's wrist computers from his Mars trilogy. The iPhone is, pretty much, that device. To use a phrase that's very popular these days, it is a "game-changer". And with the v3 OS coming out soon, it'll knock the game up to another level.

Fortunately, other companies are also trying to join the new game, but whether they're succeeding, or even outdoing the iPhone, is irrelevant to this post. The point is:

The platform exists, be it in one or many devices. What are we going to do with it?

And why did I start out waffling about busses and trains, and what does it have to do with the iPhone?

The latter question is the easier one to answer. On my iPhone, I can (simplifying only very slightly) click "Trains -> Next train home from where I'm standing" and it'll give me the answer, quickly and accurately. There's a few things it needs to know to do that:

1) Where I am.
2) What the nearest station to that location is.
3) How I define "home".
4) What trains are scheduled to run from 2) to 3), directly or indirectly.
5) Whether they're running to time

It uses quite a range of technologies to achieve this:

1) it solves by consulting the iPhone's "Core Location" service. This combines GPS location (gathered from a range of satellites thousands of miles away, of course) with ambient electronic clues in the form of WiFi hotspot idents, correlates them via consultation with a remote system, and returns the data to the app. Quite a trick in and of itself, but much more useful when it's an input to a system.

2) it solves by asking a remote database the question "Where's the nearest station to this location?" This requires network communications, a remote server infrastructure, and a geographically tagged list of every rail station in the UK. That's a fairly large database, although the proximity maths is reasonably basic trigonometry. In other words, it's consulting an expert third party.

3) Well, it asked me. If it was feeling really clever, it might have been able to look in my address book and find the entry marked "me" and work out a station from there, but frankly, people find that spooky. And interacting with the user, particularly when you give them a large amount of "usefulness" in return for minimal data, is still a pretty good idea.

4), like 2), is a remote database lookup, coupled with a routing algorithm that's probably quite complex.

5) again is a remote lookup, but with the crucial difference that's live data. It's not something I could find out in a paper timetable, rather it's a representation of the current state of the world, specifically of a really pretty complex railway system, that's updated every minute or so. That in itself is quite a trick of data transfer and management.

So, by use of massively complex national, international, and even orbital systems, I save a few minutes' time, or gain access to information that would have been unfeasibly complex to get by trying to follow the steps manually. Which it is depends on where I am, and how much I already know about the local area and services. Even if I know nothing, it can find me a route.

So, why the heck can't it find a bus?

Well, obviously busses don't run on rails or have to be scheduled through stations. But most of them do now report their locations to central systems, and there are databases and routing systems that can report on their intended locations and capabilities.

Basically, it can't find a bus because no-one's joined together all the systems that it needs to use to find a bus. The main step missing is a public interface to the "Countdown" data that's displayed on some bus stops, but it could also quite practically report on traffic and weather conditions along the route.

But there are a couple of other issues. There may be resistance to the public knowing exactly where all busses are at all times - people on those busses may feel uneasy, and I'm sure someone in Whitehall or TfL would consider it a terrorism risk. There are social aversions to this sort of sharing of data.

The company that's been most on the receiving end of those aversions recently is Google - both for their Latitude and Street View applications. The tabloid outcry (and you can classify most of the media in that category these days) has been somewhere between hilarious and utterly depressing. Classifying Latitude as "Google's spy in your pocket" has been one of the most impressive displays of hyperbolic, point-missing technophobia of modern times. Yes, it's technologically (if not actually) possible to create a system that will track people without their knowledge, but Latitude is categorically not that system; and if you claim "but Google are just saying that", you might as well believe that the spy's already in your phone, at the OS level. Latitude changes nothing at the technical level.

What it changes is the capacity for sharing that information - in scope, in precision, and in audience.

I know people all over the UK. All over the world, in fact, and they tend (and I) tend to travel. I can only guess how many times I've walked 2 streets away from a friend who lives in another country, and never met, and still not met them because I didn't know they were there. This might seem a slightly tenuous example of trying to force serendipity, but on occasion I've managed to do so, and enjoyed the results. Not by automated location sharing, but via Twitter and Facebook status - I, like millions of others worldwide, am manually pushing data out there to increase my friends' "ambient awareness" of me in the hope that it may lead to a meeting, or a laugh, or useful information. In extremis, it can lead to a new job, career, or lifesaving information.

I actually want quite a lot of people to know quite a lot about me.

Of course, there is also some information I don't want widely known, and possibly even some people I'd rather knew very little. Most people would generally prefer, for example, that their employers didn't know every pub and club they'd been into recently. And we've already heard too many cases where uptight employers have seen things on facebook that they've deemed dismissible offences, often such heinous crimes as "I wish they'd give me something more interesting to do", or "pissed again".

Of course in the latter case, the crime's not getting pissed. It's getting caught. After all, chances are the employer's doing exactly the same thing. It's hypocrisy, and it's not a technical problem, it's a social one. And it stinks. If we're going to make even comparatively innocuous data risky or guilty, we're going to have one hell of a problem with real ambient awareness, and geo-aware assistive tools.

Of course, it's not all just curtain-twitching; there are some real reasons why certain people don't want their location to be widely known - one friend of mine has a stalker who's life they'd rather not make easier. But, unfortunately, even without actively broadcasting ambience (that may be an oxymoron) no-one's location, or at least their dwelling, is an impenetrable secret. Ambience just makes it easier.

I don't claim to have a solution to that one, and we'll need one at some point, but, prudish attitudes aside, it's not a problem that needs to apply to most people. Frankly, the entity that most people mistrust with their location and ambience isn't other individuals, or their employers, but the government. And with good reason; their abilities to contain and manage data are on a par with an igloo's ability to contain a blast furnace. Even beyond that, there's too much evidence that they don't always act in our best interests - the number of people arrested or investigated under terrorist legislation for anything from peaceful protest to putting their bins out too soon attests to that.

If we could just fix the government, and people's attitudes, it'd all be so simple.

Well OK, that's obviously far from trivial; but it's worth recognising that:

1) Ambient awareness, and location-aware services, have the potential to be a massive benefit to us.
2) The problems with these systems tend to be more of attitude than of significant social or technical issues, and
3) That if we can't solve 2, we're massively limiting the use and usefulness of 1)
4) At the moment most of our apparent privacy and secrecy (and sometimes security) is a shared myth that it's doing us very few favours to perpetuate.

It's difficult to discuss these topics and maintain a fully consistent attitude with regards to personal privacy (although Emerson's comments that "A foolish consistency is the hobgoblin of little minds" may be applied; the world itself may not be consistent). We really have to ask what privacy we need, and why, and how we can maintain our freedoms and abilities if we shift that balance around for technical benefit.

That's *not* a topic I'm going to try to cover in depth right now, though.

I mentioned Street View above, too. Many people are, apparently, outraged that they've been caught in the act of walking in a street at an undisclosed date and time (although frankly, given the fuzzing, most people can only identify themselves, and that very rarely). Or they're energetically objecting to the fact that people can see their houses (from here). It's often widely forgotten that such ancient technologies as feet and eyes have had provided this capability for more than a few years. And there's probably more sensitive data in the phone book.

Again, though, there are edge cases where it matters more - if you're pissed and throwing up in the street you have little of my sympathy for your self-inflicted plight, but rather more for your colleagues' or employer's subsequent self-righteousness. If you're being treated by Paramedics, then I think it's fair that Google swap out that content when notified. But if you're upset about the deer being knocked over, please go watch Bambi and get a grip.

We might need to tidy the data up. But let's not just trash it on knee-jerk technophobia or future shock.

And you'd better get used to future shock too, because the future's accelerating. No, we don't have flying cars yet (thankfully), but we may still be at the first hints of the Accelerando.

At this point it's incumbent on me to mention Charlie Stross, not merely an excellent and humorous author, but quite possibly the UK's best futurologist. His Cthuloid spy stories and world-walking tales may not prove entirely predictive, but his near-future vision in Halting State is spot on (too much so sometimes, having seen two Halting State incidents in Eve Online recently). Equally, his canonical "Accelerando" is possibly the best tale of human reaction to future technological change, and even his far-future and whimsical Eschaton novels are excellent studies of humanity in technological extremis.

I don't want my flying car. I want my phone to tap my ear and put up a subtle glyph in my glasses if the Northern Line's packed up when I leave the office, or I'm looking at museums to visit online and the Overland's shut for maintenance. I want it to update my list of local eateries when that new Japanese place opens, and make me aware that Porcupine Tree are releasing a new album. I'd like to know that Jacques, who I worked with in Paris, just moved to Kensington. I want it to make my life subtly simpler, and help me connect with friends and old acquaintances.

Give or take the pretty poor state of eyeglass projectors at the moment, it's all entirely possible - and not merely possible in the Tomorrow's World, Martlesham Heath sense that "given enough boffins, we can make a proof of concept", but rather in the sense that 90% of it's already on the shelves and in people's pockets.

The future's very close. At some point, your phone may realise this.

SVN 2.0 in LOL-ALPHA

2009-02-20 12:42:00
My good friend @barneyhanlon has been specifying the next release of the SVN version control system recently, with some help from our design team:

More of their contribution can be found on flickr

The latest version of Subversion is in alpha, and a list of new commands are in testing. I've added a list of some of those currently in testing so that you can familiarize yourself with them. Note that as the product is in alpha this will be a growing list as I believe there is a "wishlist" system going on.

svn repent
Used after another repository user has set svn blame. Indicates that the user acknowledges the fault and is very sorry.

svn resent
Used either after an svn blame function or to show disaffection with version control. The flag essentially shows that the use of Subversion in general is causing them distress.

svn relent
Used to either stop the above two commands or to stop arguments regarding changes to a committed file.

svn revolt
Turns the svn client into a simple FTP program, bypassing the version control system.

svn commie
Flag to show that the user has an ideology they wish to express. Allowed flags are -che, -stalin, -marx, -lenin, or -lolcats

svn tor -rent
Turns the subversion client into an anonymous Torrent client and hides the resultant .iso files in the repository. If used in conjunction with svn blame, then the IP address of another user is stored so the RIAA will seek legal action against the other user.

svn odd
Marks that changes made by another user look weird.

svn picard
Immediately makes a file live, sucking the entirety of the company bandwidth to do so, and bypasses the sysadmin.

svn ensign
Sends a request to the sysadmin for a tag and release, attaching a lolPicard to the email with the -caption attatched. The default caption is "wtf is this shit?"

svn fu man chu
The file is deleted, but the world shall here from it again.

PHP: What's to learn?

2009-01-29 19:07:00
Those who know me or are familiar with this blog will know I often bemoan (aka: rant about) the lack of good PHP software engineers, or the mass of "junior" ones.

But it might be worth thinking about why this lack arises. I said, in my recent "Getting started in PHP" post:

If you're not interested in becoming great, please don't start.

While probably a touch harsh, I feel it's a valid sentiment. But how do you become great anyway? How long does it take?

To be honest, I don't know. I've only been doing this for 10 years professionally.

So, am I slow, or does it really take over a decade?

Well, at the risk of a "piece of string" answer, it depends on two things:

- How much you need to learn
- How fast you can learn it

My feeling at the moment is that there's a great deal to learn, and it's not often well, or coherently, taught. Even finding out what you need to learn can be really tricky.

However, I'm going to try and throw together a partial list, to try and get some idea of just what you have to know to be good in this game - and what that means in terms of how long it takes a developer to "mature".

As per the previous post, you'll need to start off with some basic coding principles and grammar; statements, variables, and functions. Then, wrapping those into classes.

You'll need a coherent idea of how to properly manage your code library and file inclusions (ideally with a class autoloader), which tends to lead to a coherent naming strategy.

Then, I'd strongly recommend learning TDD (recommendations on good sources for learning it gratefully received!). Not only does this help you write stable code, in a way that's useful in commercial environments, it also helps you learn the importance of good code encapsulation, and of dependency management. It's often considered a fairly advanced topic, but my feeling is that it should be learned as early as possible. TDDing your early code will also greatly increase its lifespan.

If you want your code to stick around and evolve, you *must* learn version control. Personally my recommendation is for Subversion, but there are many people who prefer Git. (You're advised to google these terms liberally). Your code's no use if it's scattered all over the place and not backed up, and a repository will help keep your code together and safe.

At some point very early on, and as mentioned previously, you need to learn about security. However, you can reduce your exposure to risk by using good practices, and data access layers such as prepared statements, PDO and Zend_DB. But be aware that there's a lot more to it than that!

Once you start looking at this sort of library or abstraction it's worth taking more time to look at frameworks and application structure. The MVC model is one key design you should learn, but it's only one of a wide range of Design Patterns which form an advanced vocabulary of development.

Design Patterns form the advanced building blocks of developments, but you should also advance your development practices - your tools, effectively. The techniques you should learn are collectively known as "Pragmatic Programming", and are neatly encapsulated in the book "The Pragmatic Programmer", which you might as well buy and read now, because you'll be a better developer afterwards.

These formalised approaches and skills mark a transition in your approach to creating code and applications, from "mere" development to software engineering. A hobbyist can certainly be a developer, but engineers are skilled professionals and experts. Much as it takes 3-4 years at a University (in the UK at least, more elsewhere) to become an engineer, it can take that long, plus a few years of practice, to truly grasp the skills of software engineering. And, as things stand, I'm personally dubious that university courses exist that give you a broad and modern enough skillset.

Even once you're engineering your software, rather than just building it, there's more to learn. Much as hardware engineers attend conferences and read technical papers, software engineers need to keep studying at a postgraduate level. These topics are widespread and continually being developed and discovered, but include continuous integration, load testing, scalability. You'll also need experience in the specific tools of your particular domain; this can include advanced SQL such as stored procedures & triggers, the full capabilities of your framework, use of advanced javascript toolkits, ajax, DOM & xpath and so on, before you even get to third-party APIs for other sites.

And there are also auxiliary skills that don't directly relate to development; configuration of servers, estimation skills, Scrum development practices, code reviewing; you'll need many of these to work in a team.

So, there's plenty to learn and, as said before, you won't stop learning. But, given some idea of your syllabus, a few pointers to resources, and plenty of interest and support, you can certainly build a very strong skillset in a few years. One of the problems I've felt over the years while learning is that it's very hard to know what I should be studying, which costs you time and direction. Hopefully the above list will be of some use; for more, just keep reading, attend conferences, and consult your local user group.

iPhone favourites and iTunes whines

2008-12-18 21:43:00
A quick review roundup on some of the useful apps on my iPhone at the moment (hiding in 6 screenfulls now), and some of their "quirks"...

Twittelator Pro is currently my portable Twitter app of choice, mainly on the "it just works" principle - although it needs some work on failing gracefully when it can't send a tweet - it tends to forget about it instead of saving it for later. One particularly nice feature is its ability to track conversations in a single view, and the search looks impressive.

Spend, which I've mentioned previously, is an extremely useful budgeting app, which is proving extremely useful in both controlling my expenditure and feel confident in spending saved money on a holiday.

The Google Mobile App is currently at the stage where it promises much more than it delivers. Voice searching is slow and unreliable, and the "super-ajax" search hinting just isn't fast enough to be useful. Perhaps with some work it might provide useful voice dialing.

A trio of apps help me get around: Tube London City, London A-Z and MyRail Lite. The Tube app is useful both to provide a map and route plans, and also to give realtime tube status. MyRail Lite (I've not seen a "heavy" version) is an interface to realtime departure boards and service schedules for pretty much every station and surface train in the UK - frankly, a lot quicker to use than the public departure boards at Waterloo at the moment (as the direct access to platforms is currently closed and you have to go via the concourse, which tends to mean walking away from the platform you need to see the board).

But why the A-Z? Isn't Google maps enough? Well, one problem is that you need a network connection to use it; not great for planning ahead underground. And, as has been mentioned elsewhere, google maps have a nasty habit of being under-detailed and out of date. The A-Z is *the* map for London, and having it on hand is invaluable. The app's not perfect, but the joy of iPhone apps is that you tend to get free improvements.

Shazam wins for Cool Points - an extremely accurate (and free) music recognition app (so long as you don't get *too* obscure. I've already bought a couple of albums of music identified this way.

NeoReader is a 2Dcode / QRcode reader, but feels like a problem waiting for a solution. QRcodes aren't widely used yet, and the iPhone's camera doesn't read them very smoothly. That said, it does work.

Tiny Violin is just amusing - for those moment when you really do need to pull out, and play, the world's smallest violin.

Microsoft's first iPhone app, Seadragon Mobile, is extremely impressive; it's essentially an image viewer, but it's designed for vast images, even of gigapixel size - it's a similar technology to Google Earth, and indeed includes various images of the whole Earth, Moon and Mars, alongside access to the online Seadragon and Photosynth archives.

FileMagnet is one of a class of apps that lets you store files - particularly PDFs on the iPhone. This is great for storing things like full tube maps, and the study guides for my rapidly increasing selection of audiobook language guides.

That brings me to one irritation about the iPod app on the phone - getting to audiobooks, particularly multipart audible audiobooks, is clumsy:

Go to 'iPod'
Click 'Back' out of whatever's playing at moment
Click 'More'
Click 'Audiobooks'
Click 'Audible'
Look through a list of things called 'A History of Britain, Vo...'
Try and guess which one is Volume 3, Part 1
Realise the only way you can be sure is to start one of them, and turn the phone sideways to rotate to coverflow view which will give you the full title.

I mean, c'mon guys, you're supposed to be usability experts!

The iTunes store has a few issues that bug me, too, and they're just clumsy.

Trying to find the URI that links to an iPhone app in the store is absurdly difficult; you can either hack around the web or "send to a friend" to yourself. It almost seems that they don't want people to discuss or recommend apps. And the ratings system may as well be designed to draw in harsh reviews. The only time you're encouraged to rate an app is when you're deleting in - probably not the way to get representative reviews from people who actually like the app. For those reviews that are left, there's no way of telling when a review was left - how old it is or which version of the app it relates to - so, as the store gets older, more and more of the reviews are outdated, and the scores unrepresentative of the current version. This is both unfair on the developer, and unhelpful to the user.

Twitterquette: Why are you following me?

2008-12-15 21:19:00
On Twitter, everyone seems to have a different agenda. @snowvandermore even gives a list to chose from at TwitTip.

It can be tricky, when a random user follows you, to work out what that agenda is; what are they using twitter for, and why are they following you? The two answers can even be completely unrelated if, for example, a user is transmitting with one purpose and then using the account as a way of watching users that fit a completely different set of interests. So, do you block the user as spam, or assume you're doing something genuinely fascinating?

Personally, I don't tend to bother blocking users, but I was still pretty suspicious of @BN4WO08UUJ and @XTK1TLW55 (fairly enough as they now seem to have been suspended). Those were easy. What about @100MegsAskMe? Apparently a human, but the name's a mystery. @isevens is a complete mystery, as is @superiorcarcare. Is this last hoping I'll bring my Tesla to them for cleaning? I doubt it, I'm on the wrong side of the Atlantic and don't own a car. Are they fascinated by my blog posts? I've no idea. PHP developers and photographers are more understandable, but I'm a little more baffled by @scandicemorgan and @cindyreese, apparently two attractive young ladies who presumably want me to buy cameras from their "superpriceshop.com" sites.

I suppose it's also possible that I'm just far more witty and interesting than I'd realised?


On Twitter, no-one knows you're a dog, unless your profile pic is a dead giveaway. No-one can tell if you're a "Networking Expert" or "SEO guru" who operates by following everyone in sight as a substitute to providing interesting content.

So how do you guess?

Well, there are a few points I go by when deciding whether to follow someone back.

- Does your name (real or @handle) look like a human?
- Are you providing useful and/or readable content?
- Have you bothered to fill in your bio with something interesting?
- Have you provided a link to your site or blog? Is there evidence of a human there?

I don't want to be asocial and decide that people aren't "good enough" to follow, but I have a limited amount of time to read blogs. More critically, I don't want to feel like I'm being played as a sucker by advertisers, people who aren't "playing the game" of twitter - whatever that game is.

So - why do you follow people? What draws you in or puts you off? Do you bother blocking people?

So who is Microsoft anyway?

2008-12-14 22:31:00
"Microsoft? What on earth do they want to have to do with PHP?", I was asked incredulously last night.
Well, apparently, quiet a lot, although calling it "The greatest love story as yet untold" may be going a bit far (and possibly even a little creepy?)

To many of us, Microsoft is still seen as the antithesis of the Open Source world, something due in large part to their own behaviour. Most developers who've been around long enough to recall the browser wars, the EU antitrust case, the battles Samba used to have to interoperate, frankly don't trust them. Indeed my own last significant interaction with them was when we were developing the Sender Policy Framework, and Microsoft wanted to leverage their own Intellectual Property into it and then require a "RAND-Z" licence on top of it - which would have crippled open-source adoption, and thereby the standard itself.

So yeah, I'm not really predisposed to liking Microsoft.

But that experience was several years ago, and the Microsoft Behemoth is starting to turn. Led internally by figures such as Hank Jannsen and (in the UK) Will Coleman (who apparently exists only on Twitter), there's a strong "If you can't beat 'em, join 'em" pro-open-source movement gathering steam.

Microsoft appear to have realised that when they try and beat open source technologies such as PHP, everyone loses. That gives them the choice of ignoring it and hoping it'll go away, or working with the PHP movement to try and make IIS a good choice of platform to run PHP on (previously it's been dog-slow and unstable) and MS-SQL a good database to pair with.

Fortunately, they've gone with this last option, and there's a significant and growing effort within MS to make this work well, as can be seen at their Open Source blog.

It was for this reason that I (and a number of other UK "PHP community leaders") was invited to a "Microsoft PHP Community Event" last week. They're trying to engage the community at its own level, which in this case meant a few talks, and quite a bit of Q&A, in the back room of a pub. This comprised a video presentation from Hank Jannsen, and talks from Will Coleman from the MS side together with Ivo Jansch and Scott MacVicar from the community side. As this was all done in a Pecha-Kucha (20/20) fashion it was all slightly hectic. The community asked for a lot, and Microsoft promised a lot, in terms of technical assistance, time, cash, and attitude change.

It's worth admitting that MS already do a far bit - technical assistance to the Samba project, financial aid to the Apache foundation, and technical improvements to Zend Core which have brought the speed of PHP on Windows/IIS servers to parity with that on Linux/Apache. The question is whether they can do enough both to convince the community, and to convince businesses to combine Open Source and commercial platforms.

It'll be worth watching, but they've got some work to do.


Special mention has to be given both to the food at the Windmill pub - Sausage and Mash as finger food? How about Fish, chips and mushy peas? - and to the goodie bags; Santa hats, Xbox 360 games, whisky, very small trees, and and crunchie bars ("To make the credit crunch fun!"). Well, Will's a nice guy, but sometimes he worries me.

Of Roadworks and iPhones

2008-12-12 21:13:00
While you're reading this, if you own an iPhone, go download the app and keep it on your phone until it's needed. It's free, and it's tiny.

And it's potentially extremely useful.

We live in an age of rapid information flow, but sometimes it seems that some organisations, particularly in local or national government, haven't quite got that memo yet - as my recent travails with the Post Office showed. MySociety is an organisation that exists to counter those delays, and help information flow freely to and from both local and national government. They, as volunteers, do a stunning job.

One of their sites (and they now have many) is "Fix My Street" site, designed as a convenient way to report minor (or major) problems with our roads. I'm sure we've all seen potholes, missing signs, broken streetlamps, and would have been quite happy to report them and get them fixed if we had the faintest clue how. The Fix My Street website is a good start, but you still have to remember the problem and get round to locating and reporting it when you get home.

Or, if you've got their new iPhone App on your phone ready, you can do it in-situ, have the phone's location services place you precisely, and take a picture of the problem while you're at it.

Reporting the problem is a two-step process; you provide basic information (enough to record the problem) in the application, and then receive an email with a confirmation link which takes you to a page where you can complete the process, adding a category and further detail. (Personally I'm not hugely keen on the two-step data entry, and I've given my feedback so we'll see whether any changes arise). The email confirmation step is common to pretty much all of MySociety's sites, as to be useful they *must* be kept nuisance-free.

Your report is then mailed to the right department of the right council (and that's the really useful bit!) to allow action to be taken. You can then see any other local issues reported and give feedback as to whether your own has been fixed. It's effectively crowdsourced bug reporting for towns and cities. And it's an excellent, if minor use of communications technology and mobile platforms.

Like I said; download it, install it, and forget it. It's tiny (0.1MB) and it'll sit on your phone and wait until it can help fix your town.

Getting Started in PHP

2008-12-06 16:06:00
So... you'd like to get in on the act and start coding PHP? Perhaps you'd like to add a few features to your homepage, or perhaps you're looking for a career shift? How do you get started in the Brave New World of PHP?

The main thing you'll need is a strong desire to learn and to improve. There are thousands of junior developers out there who frankly have poor skills and produce terrible code, and who are unlikely ever to get much better. By just displaying a reasonable amount of determination and drive, you can rise above them and become skilled and highly employable! If, on the other hand, you're not interested in becoming great, please don't start - the shallow end of the pool is full enough already.

There are three key points you'll need to bear in mind:

1) You're aiming at a moving target. The discipline of software engineering, and the PHP language, are both young and evolving.

2) Security is absolutely key to your code! Unlike 20 years (or so) ago, when I started coding in BBC Basic and the code never left the room, your site and the code on it will be out in the wild from day one, and will need to be resistant to numerous security attacks. The good news is that security basics aren't that difficult to learn.

3) You will never stop learning. And it'll (usually) be fun.

There are also three areas you'll need to study in:

Firstly, the grammar and rules of the language you want to learn, for which you can start with a basic book on PHP such as Learning PHP 5 or the slightly more advanced Programming PHP.

Secondly, the tools and techniques of software engineering. Much as you wouldn't build a house without some architectural understanding, or a car without some key ideas in mechanical engineering, your code will be immeasurably improved if you understand the best techniques to use. To a large extent, these techniques are language-independent, and will serve you well whether you end up coding in PHP, C, Java or ay other modern language. My own personal favourite book on this topic has to be The Pragmatic Programmer.

And thirdly, you'll need an understanding of the environment you're working in, both with regards to security (for which I invariably recommend Chris Shiflett's Essential PHP Security) and wider issues such as the platform you'll be running on, and the wider functionality and expectations of the web.

The good news is that it's not all book learning, and you won't be on your own. However, I've presented these books first because the community is also far keener to help someone who'll help themselves and, if you choose to splash out on professional training, it never hurts to get a head start to make the best of your investment.

So, who is out there to help you? Well, tens, possibly hundreds, of thousands of people, arranged into various types of online and real-world communities. If you're in London UK, where I am, you should join PHP London; sign up to the mailing lists and join us at the social meets. If you're elsewhere, take a look at PHP User Groups or MeetUp.com to find a local group.

Does that feel a bit too much like jumping in at the deep end? Don't worry about that. These communities are here to support you at all levels, and as per this recent piece by Chris Cornutt, you're unlikely to become a great developer on your own. We could save you a few years of confusion, and do wonders for your skills and earning power!

If you do want to go for professional coaching, the best place to go in the UK is probably iBuildings, who are Zend's partners for the UK and Netherlands. They can provide a range of training for various skill levels - I and my team took some a few months back and found it very useful. However I should probably disclaim here that I've since become friends to a few of the iBuildings staff, and I will (much as Paul will hate me for admitting this) point out that you can become a good developer without their help! For individuals in particular, the training can be quite an investment, and so self-study can be a good option.

So, where (and how) to self-study? Well, as you're reading this I presume you're already familiar with various blogs and online sources, but I'll point out that PHP London has a collected RSS feed (including this blog) at http://feeds.feedburner.com/PHPLondon, and you'll find many more blogs at Planet PHP. Another good resource is the hardcopy (and recently relaunched) PHP|Architect magazine, which is a must at its new price.

Personally, I find self-study most productive when I have a goal. One I'd particularly recommend would be the Zend PHP5 Certification. This is not a basic certification (for that, look at something like BrainBench), and may take you a year or two to learn enough to pass if you're new to programming, but that's precisely what makes it useful. If you can pass this, you probably know what you're doing. Note that while there is a study guide for the certification, it's not enough to refer to this book alone as it's mainly a syllabus - you'll need to study from other resources to pass.

Well, I figure that that should get you started! As ever, do feel free to comment or drop me a line with any ideas or queries.

Usability by counterexample (between a Rock and a Hard Plaice)

2008-12-05 19:19:00
Confession: I'm a complete nut for Prog Rock, so being home early on Friday evening and getting to listen to Planet Rock's Fish on Friday is very pleasant (even if the reason I'm at home is that I've just had minor surgery on a toe).

In fact, I'm enjoying many of the tracks enough that I want to look up what they are. This should be easy on a DAB radio, but unfortunately Planet Rock broke their "now playing" DAB Metadata a while back.

So, I thought I'd give their much vaunted new website a visit. Firefox handily remembers, as I type in 'planet' that it used to be at http://www.planetrock.co.uk/default.asp .

Try the link. Uncustomised IIS 404 page. Would a 301 from the old homepage to the new one have been so hard? Or a humorous custom 404? They're all the rage these days...

OK, maybe I'm expecting too much. I tend to find, when it comes to web design or development agencies, that the best thing to do is to set my expectations low, stamp on them a few times, and then throw them out.

So anyway... the site, once I get to it, boasts this "On Air" page:



Where would you expect to be able to click?

If you guessed any of these locations, you'd be completely wrong:



If you're cripplingly literal-minded, and guessed any of these locations, you'd be in luck.



So who on earth designed that? Leaving aside the revolting semantics of making (almost) all links have the text "Click Here", why can't you click on any of those 4 square boxes, particularly "How to listen"? Why can't you click on any titles?

Those "click here" links, by the way, look like <div class="click_here"><a href="rockblock.html"></a></div> - not text, nor even images, let alone images with title or alt text... In fact the nearest thing to alt text or titles is the text 'adholder' for those four boxes.

So, what were the design and usability objectives here? What accessibility standards were they working to?

Frankly, what were they playing at?

And why am I getting so excited about a dud design for a radio station's website?

Because I care about usability.

I care about professionalism.

I care about giving customers, and site users, a good deal and a good experience.

And because I spend far too much time in my day job cleaning up after charlatans who can't code, who know that they're dealing with non-technical clients (most of the time, I tend to give them a nasty shock) who don't know what to look for, ask for, or test.

These guys give my industry a bad name. They provide crap where they could provide quality; they choose "barely good enough" where they could delight. They hold back the development of the web.

I never did find a "now playing" banner. The nearest I got was this delightful stream player:



Doesn't really delight, does it? For some reason you *can* click the Alice image this time, although it then opens the page in the (non-resizable) popup window.

Fortunately I did manage to identify a few of the tracks. I picked up my iPhone, switched to Shazam, and pressed the button. It listened, and told me what the tune was. A usability dream - and I'll be putting 13th Star on my Christmas list!

Archive