And now…

24 August 2006

…off to Barcelona. Taking the camera, a stack of books – Lee Child, Susan Sontag, Frederick Brooks and Phillip Reeve – some factor 20, myself, and the girl. Leaving behind – my laptop, work, and hopefully my worries. Hoping my hand luggage isn’t problematic.

Holiday, here we come.

Five pages to print off

24 August 2006

Matt Jones asked us what we’d print out from the Internet when it went down for good. I spent a while mulling this over; like Tom, I came to few conclusions. But I wrote some ideas down.

Anyhow, it’s now August 24th, and I’m going to Barcelona for a week tomorrow (because I desperately need a holiday). So I thought I’d just put up what

1) Something on how to make batteries
– Jones has stolen all the useful stuff, and besides, books still exist. Electronics may be dead, but electricals are going to be very useful. Batteries aren’t so hard to make (although they’re not exactly going to be Energizer standard), and might turn out handy. Also, it’s the kind of knowledge I can trade for more useful things.

2) Having remembered to use Flickr properly, dump out a nice flickrToys page of my favourites.

3) Print out everything unread in my RSS account.

4) Print out the huge single page which is every blogpost I’ve ever made (and which, for the sake of argument, resides in secret on my server.

– so, I was racking my brains about what to print out from the Internet that wouldn’t be available in any of the many libraries. I had a really hard time. Most things I was thinking of were available elsewhere – it’s just I came to them via the Internet because, well, it was more immediate, it had search. So there’s not much that only exists in Wikipedia, or Gutenberg, or even the web. And what I can think of that is uniquely online is either experience – be it Flash, or something like Flickr (where the value is not in the content, but the interactions; not in one page, but in the social links and relationships represented across many) – or things like the cartoon strips I read that would never really get published apart from on the web.

Hence why I’m printing out my social interactions – my memories of “the Internet” as a place, rather than any unique information it could offer me. Silicon may be dead in Matt’s dystopia, but books aren’t. I’m planning to ransack the Cambridge University Library pretty much the second the bombs start falling – hopefully it’ll be a less popular target than the British Library.

(Talking this over with Alex, she also said that actually, in an Internet-free-world, that was a great idea; she wanted a wing in the Library of Congress or the British Library just for blogs – everyone prints their own blog, binds it, and hands it over. It’s not about saving the high-value content – it’s about saving all the content people make, just like any copyright library does with books. If the internet’s gone, we should be saving as much of the unique content on it as possible, rather than stuff that might just exist somewhere else; if everyone chose a blog as one of their five pages (because you can probably dump the entire contents to one, massive, page), we’d save so much – not just in the content, but in the blockquotes, in the excerpts, in the criticism, in the memes, in the anecdotes, and in the stories. I’m glad it wasn’t just me being egocentric, then).

5) The original Yahoo homepage. (Actually, the original is a bit too spartan, but this one is a better bet

– Possibly my “slightly up-oneself” entry. I’m interested in this because before the search engines, the web wasn’t searched; it was explored. Yahoo found you things by cataloguing what was out there. Very Dewey-Decimal way of thinking. But I want that original list of categories, if only to remember that this was the structure that much of the Web began with; this was how somebody imposed order on the system in the early days. It’s easier to extrapolate from an ordered beginning. So I want to keep that fragment of the early architecture of the web so that I can remember how it all began – when that was “all it was” – and remember that it all grew from there.

After all, silicon may be dead, and the world might be ending, but once you’ve had widespread shared knowledge, it’s hard to go back. Somehow, we’ll work out how to build another Internet – even though it might be slower, mostly-off, and not very neutral. When we do, I want those categories, just to compare the new effort to.


To conclude: it’s a bloody hard question and I feel my answers aren’t really so good, but at least I tried. And I think it does prove that right now, the Internet is more about the interactions we make than the data therein. Which is Web 2.0, right? So it’s not that the sites themselves are “2.0″ or not; maybe it’s the users who’ve demanded more, who’ve been upgraded.

Good news from Leipzig

23 August 2006

The best news from the Leipzig game conference, for me, wasn’t all the football-exclusivity deals, oh no; it’s Carcassonne and Settlers of Catan on Live Arcade. Sign me up now.

Oh, wait, I am signed up, and I’ve been playing that version of Hold’Em…

del.icio.us : Whoops!

23 August 2006

OK, so my del.icio.us links haven’t been showing up here for a few days. That’d be because they finally swapped their API permanently to the new location (https://api.del.icio.us/v1) and I didn’t update the magic bit of string (or PHP) that threw each day’s posts into my database.

Stupid Tom.

I’ve now fixed that, and we should be back to normal tonight. In the meantime, there’s some good stuff over in those bookmarks, so do catch up on things you might have missed.

I really should tie this blog together with more than string and sellotape at some point.

Light in Canterbury

13 August 2006

Light
Originally uploaded by Tom Armitage.

I went to Canterbury last weekend. We were hungover, one Sunday morning, and an advert came on TV telling us that Canterbury was really quite close and really quite cheap. We were desperate for a break from the city, so we piled over to the tiny little city for a day. Very pleasant, too; a break from the strain and strife, which were replaced with wandering, food, drink, and shopping. I also took my camera, and the results are now on Flickr. Some of my favourite pictures with it so far; this one, with no modification bar some sharpening, levels and channel mixing, stood out.

uptime

13 August 2006

I haven’t rebooted my computer in a long while.

It all happened when I started preparing for ETech, and became irrationally concerned that my elderly Powerbook might never turn on again. So I kept it up constantly, for a few months.

Then I had loads of stuff after that “up”, floating around, and it was taking ages to process. So I didn’t reboot.

Then it was Reboot, and again, I didn’t reboot in case it wouldn’t come back and I lost my work.

I think the paranoia had set in.

Anyhow, GeekTool sits on the bottom of my screen, telling me all about my uptime. I looked just now, and it said

13:24 up 212 days, 3:32, 5 users, load averages: 1.50 1.61 1.35

5 users? Not sure what that’s all about. Anyhow… 212 days is a long while. I think we need a spring clean. Time to restart.

Writing your own camelizer in Ruby

11 August 2006

So, in response to an earlier post, “mexx” asks:

Let’s say that I have a class BigTree and I have a string ‘big_tree’ how do you get the string translated to ‘BigTree’ so that I can use this translated string the way you showed?

That’s a fun challenge. Well, as I’ll later show, it’s a problem to which I already know the answer. But I gave it a shot, and came up with this – my first genuine, off-the-top-of-my-head one-liner (and I wasn’t golfing):

def camelize(str)
  str.split('_').map {|w| w.capitalize}.join
end

That’s a bit cryptic. To decode it, if Ruby’s not your first language:

  1. Take a string
  2. Split it on underscore characters into an array
  3. Capitalize each item in the array in turn (which I do by mapping the array to a new array, with the built-in String method capitalize)
  4. …and then join the whole array back into a string

Unfortunately, that works for mexxx’s example – big_tree will map to BigTree but it’s certainly not true for all possible classnames.

But, as I said earlier, I already know the answer to this. It’s part of Rails – specifically, it’s in the Inflector component of ActiveSupport. Go to the API docs and look for “camelize”. Most of the Inflector components are dependent on each other; camelize, fortunately, is only dependent on itself. And it looks like this:

def camelize(lower_case_and_underscored_word, first_letter_in_uppercase = true)
  if first_letter_in_uppercase
    lower_case_and_underscored_word.to_s.gsub(/\/(.?)/) { "::" + $1.upcase }.gsub(/(^|_)(.)/) { $2.upcase }
  else
    lower_case_and_underscored_word.first + camelize(lower_case_and_underscored_word)[1..-1]
  end
end

That looks a whole lot more convincing and generic. And I think that’s your answer, mexxx. So don’t thank me – thank the Rails core team. There’s lots of useful basic Ruby tools hidden in the Rails sourcecode – it’s always worth an explore, if only to find out more about how it does its stuff.

Slides now available for my LRUG talk

11 August 2006

To cut a long story short: the slides for the talk I gave earlier this week are now available. You can find out more about the talk on the talks page of this site, or you can download the PDF (1.5mb). It should be fairly self-explanatory.

(A brief summary for those of you unable to scroll or click: it’s a client-side-developer’s perspective on Rails, and how to integrate client side development into the build process).

Links & notes for this month