Happenings

Always a Story

In a discussion recently, I realised why image galleries on websites make me uneasy (by image galleries, I mean software like Coppermine, which is extremely polished). It’s not that I dislike the content, it’s often appropriate or useful. You often do need to see something, whether it’s a bunch of application screenshots or perhaps some pictures from a band’s latest tour. They have information to convey, and are worthwhile.

No, I finally realised that the issue I have with them is that they’re almost always completely hived off from the rest of the content. You have your all the interesting news on your site, you have the products you want to sell, you have your twitter account brought into the main site, but so often the image galleries are sat on their own. You’re either in the main site, or looking at the images, but never both.

Most websites are trying to tell a story of some sort. Bands are trying to communicate with fans, software houses are trying to showcase products, and bloggers are trying to put their own little view of the world forward (myself included). In order to tell a meaningful story, you have to realise that so much of the world and the way we perceive it is connected. You might have seen the latest tour news from some band you like, but you’re part of that story if you go see them, and the pictures of those shows are too.

By putting the galleries out on their own, they’re no longer in the same context as the rest of your story. They’re telling their own story. Sometimes that’s just fine, but more often than not they’d be better understood in a larger context.

It might just look like a bunch of gig pictures on their own, but have them tell the story of the particular gig they’re from, mix in your tweets from your fans, and any other media you can lay your hand on and you have a fair richer story. That’s much more compelling and interesting. You’ve gone from a bunch of discrete sources to a tapestry, something to build a legacy on.

Is it more work to tell a story than to put it into a gallery? Right now, probably, yeah. Is it worth it? Absolutely.

Functional, Part 1: Revelations

Since Java and the JVM are getting proper closure support, now is as good a time as any for me to dump some thoughts about functional programming onto the site. I’ve got a few posts in mind, but I imagine this will be a somewhat sporadic series. Anyway…

When I was first introduced to functional programming, as part of my degree course, I didn’t really understand it. Not that I didn’t do well at the course, it was one of my strongest modules that year, but I really didn’t understand the benefits and potential. It did seem unusually neat, producing fairly compact code (we were taught Haskell, unsurprisingly), but also fairly burdensome. Avoiding side-effects and assignment was just too foreign, and I didn’t have enough real-world experience to really get the point. So, for a few years, I just forgot about it and got on with programming in other languages (Java, C, PHP, JS, etc).

Skip forward a few years, and as a reasonably experienced coder, I often found myself frustrated at the languages I was using. I would always try to make my code as neat and compact as I could, trying to minimise any wasteful re-use. If two classes were vaguely similar, then I’d look to find the common elements and make the differences abstract. Joel Spolsky talked about this when covering Javascript.

That’s all well and good but without certain key language features you can only get so far. The very constructs that hold the language together (loops, ifs, locks etc) are often the part that are either impossible or very difficult to abstract. This revelation brought me back to functional programming.

I now realise that the core of functional programming is freeing yourself from the constraints of the language, using different higher-order functions to express yourself more clearly and succinctly. A necessary consequence of this is lack of side-effects, and that’s a GOOD thing.

Stick around, I’ll be covering a number of libraries and ideas that make life simpler for the functional programmer.

The Disconnection

I try to avoid anything remotely political on this site, for many reasons, but I feel it worthwhile discussing some of the issues around Peter Mandelson’s Digital Economy Bill: one of the most wrong-headed political policies I’ve seen in the technology space.

In this country we, by and large, have a solid basis for our justice system: we are all innocent until we’re proven guilty. Suspicion of committing a crime is not good enough, it must be proven beyond a reasonable doubt. The upshot of this is generally positive. We can’t be accused of something and be punished for it, without proof that we actually did it. This is a fundamental right that allows us the liberty we enjoy.

Importantly, you also can’t be tried by the victim of a crime. If you are accused of stealing from someone, that person cannot serve on the jury, nor can anyone with an obvious bias. You have the right to a fair trial by a jury of your peers.

If we did not have these rights, then it would be all to easy for society to be manipulated by scaremongers and sociopaths, the idiotic and the greedy. One accusation, and you’d be finished. This is not a hypothetical. In our past, we tried people as being witches with no evidence, just an accusation. This has happened before.

Now, the media industry is in a difficult place. They’re making less money than they used to, and want to blame piracy for their failing business models, rather than adapt. That’s a whole deep dark hole of debate by itself, but is not what I want to talk about today.

No, I want to talk about the Digital Economy bill. As a way of stopping the perceived threat of piracy, the Digital Economy bill will give media companies the right to accuse people of copyright infringement and have them disconnected from the internet. Think about that for a second: the accuser gets to blame anyone they like and with no evidence of copyright infringement, have a punishment inflicted upon them.

No trial, no right to see the evidence against you and fight it. You’re presumed to be guilty. This is, of course, the opposite of how justice works at present. We’re basically putting justice into the hands of very large companies to protect their revenue in the way they see fit, whether they are right or wrong. We’re handing liberties over to commercial interests for no benefits.

To me, that is very wrong and I hope you join me in signing the petition to stop this very wrong policy.

For more views, Open Rights Group have a great site up called Three Strikes.

Bad Tutorials

As someone working in technology, I’m faced with a fairly moving landscape. The number of new technologies and ideas that pass through my domain of interest make is so that the skills that I had yesterday might not be useful today, and are probably going to start looking silly tomorrow.

A necessary outcome of that is that technologists rely a great deal on different forms of training material, from full-on seminars to simple tutorials and APIs. It strikes me that a great amount of this material, perhaps the majority, is terrible; lacking the ability to convey meaningful lessons to the reader.

Ignoring the material which is underdeveloped or simply inaccurate, my experience tells me that the next worse kind of material is that which runs through a series of steps: do x, do y, do z, you’re done. While this is certainly better than no material at all, it doesn’t help build any understanding, and that’s the key to any successful tutorial. If you build understanding, you’re doing a much better job.

Rather than simply run through steps, take the time and patience to indicate the goals. What will each step achieve, how exactly does it achieve that goal, and what other outcomes are there in slightly different circumstances? Each step should be there to help build understanding of your domain (by which I mean the fundamental components and ideas underpinning your subject matter), and in doing so ensures that the reader will be able to reason about your domain for themselves much earlier.

An extraordinarily good example of this is something like the Spring Framework manual. Each section introduces concepts with worked examples, alternatives, and consequences. The outcome is that given a small amount of time working with Spring you can fairly well reason about a new class that you’ve never encountered.

Always build on the domain understanding, always underline core concepts and always teach underlying principles, rather than simply stating steps.

Seven Times

A while ago now, I was stood behind two women at a bus stop. I wasn’t particularly listening in, but being that close meant I couldn’t avoid hearing what was being said. The first asked the other if she had seen a movie that had just been released yet, perhaps a week earlier. The other enthusiastically responded, “I’ve seen it seven times!”

Now, there’s absolutely nothing wrong with seeing a movie twice in a short space of time, particularly if you really enjoyed it. I can imagine seeing something three times over the few weeks of its release if it’s either particularly good or perplexing, but seven times? That’s just a failure of imagination.

Appreciation of cinema, as with any medium, is best enjoyed over time, allowing the passage of time and changes of context to enrich it and take your enjoyment in new directions, or to see it as something of its time. That’s true of music, art, tv, sport etc. Just about any hobby is best enjoyed in perspective.

An uber-obsessive, single-focus like that is almost childish; the attitude that seeing a two hour movie seven times in roughly a week is a form of lamentable one-upmanship.

To anyone who thinks that seeing something seven times really is fine, I say watch something else. Watch something worse, if need be. Watch something completely different, or something that makes you uncomfortable. By taking in a greater variety of your chosen medium, your context — your very understanding — becomes richer. When you finally see that film again, you’ll be seeing it with a new perspective and that’s far more worthwhile than obsessively watching the same thing in the same context time and again.