Activity

And if there were, what then?

The Alpha Course people have been running a bunch of poster ads built around the slogan “If God did exist, what would you ask?”. The posters are filled with anodyne questions like “What’s the point?” or “Is this it?”.

  • 0 likes
  • 0 reposts
  • 0 replies
  • 0 mentions

Written by Piers Cawley , updated

Read more…

Arguments you wouldn't make in Alabama

I spent the weekend at the UK Sacred Harp Convention, singing blood curdling hymns to the glory of god, very loudly with a hundred or so others. Great fun so it was. There’s something joyous about hollering out a hymn that opens with the line “And am I born to die?” and ends with the stanza

  • 0 likes
  • 0 reposts
  • 0 replies
  • 0 mentions

Written by Piers Cawley , updated

Read more…

If you're going to add a hook, make it a big one

Jay Fields responds to Ola Bini’s Evil Hook Methods? about the common ruby idiom that lets us write:

class Fruit
  include DataMapper::Resource
  property :id, Integer, :serial => true
  property :name, String
  property :notes, Text, :lazy => false
end

What Ola and Jay don’t like about that is the way that a single include DataMapper::Resource actually adds class methods to Fruit because the implementation of DataMapper::Resource.included looks like:

  • 0 likes
  • 0 reposts
  • 0 replies
  • 0 mentions

Written by Piers Cawley , updated

Read more…

Oh. Bugger

If you asked me to name my favourite radio and TV comedy, the odds are very good that Geoffrey Perkins had a hand in most of them. When I found his obituary in this morning’s Guardian I felt almost physically winded. I never met him, I don’t know anyone who did, but he was someone who helped to make the world a pleasanter place to be in. My thoughts are with his family and friends, who are no doubt even more gutted than I am.

  • 0 likes
  • 0 reposts
  • 0 replies
  • 0 mentions

Written by Piers Cawley , updated

Read more…

Get sophisticated

Ruby’s primitives (Strings, Hashes, Arrays, Numbers – anything that has a literal syntax) are fine things. But that doesn’t mean you should use them everywhere. You’re often much better off wrapping them up in your own Value Objects.

  • 0 likes
  • 0 reposts
  • 0 replies
  • 0 mentions

Written by Piers Cawley , updated

Read more…

Work with us

If the last post about our Javascript issues didn’t put you off, then you might be interested to know that we’re hiring. If you’re an experienced, test infected Ruby on Rails programmer with some Javascript and a real world consumer website or two under your belt, and you’re happy to work in Newcastle upon Tyne, then we definitely want to hear from you. I’d probably be interested in at least hearing from you if you’re an experienced dynamic language programmer who has only recently made (or is considering making) the switch to Ruby and Rails. It’s only syntax after all.

  • 0 likes
  • 0 reposts
  • 0 replies
  • 0 mentions

Written by Piers Cawley , updated

Read more…

Usability testing (throws) rocks

Usability testing is wonderful. But wow, its humiliating.

I’ve spent the last few weeks working on the Amazingtunes in page player. Amazingtunes is a music site, so we need to play music. However, we don’t like the way that most music sites work; either the music stops as you go from one page to another, or the player is a huge Flash app running in its own window. There has to be a better way. There needs to be a popup window if you want to eliminate stop/start behaviour, but there’s surely no reason not to keep the controls on the main page.

  • 0 likes
  • 0 reposts
  • 0 replies
  • 0 mentions

Written by Piers Cawley , updated

Read more…

Announcing Announcements for Ruby

I’ve just pushed a just about usable (but horribly untested) port of Vassili Bykov’s very lovely Smalltalk Announcements framework onto github. It’s a very raw port at the moment (the interface isn’t what you’d call idiomatic ruby yet), but I shall be working on that soon. Documentation (beyond a synopsis in the readme file) is nonexistent, but I reckon that there’s the core of something useful there (I’ve got plans for using it in Typo as the basis of a Wordpressesque plugin architecture and I need it for my Sooper Sekrit Project too…).

  • 0 likes
  • 0 reposts
  • 0 replies
  • 0 mentions

Written by Piers Cawley , updated

Read more…

git is the monads

When, in the course of learning about Haskell, I reached the point where I thought I understood what Monads were for, I wrote about it. In the comments, Seth Gordon observed that:

  • 0 likes
  • 0 reposts
  • 0 replies
  • 0 mentions

Written by Piers Cawley , updated

Read more…

Rails tip: Dealing with out of sync migrations

Sometimes, for one embarrassing reason or another (usually involving chaotic branch merges…) a database migration can get leapfrogged. When this happens, it’s tempting to renumber the leapfrogged migration, but that breaks any servers where the migration didn’t get renumbered. Here’s how I dealt with it recently:

  • 0 likes
  • 0 reposts
  • 0 replies
  • 0 mentions

Written by Piers Cawley , updated

Read more…

A quick JavaScript formatting tip

IE’s a pain. The particular pain I want to write about is its pickiness about JavaScript object literals. Consider the following JavaScript object:

{ success: function () { ... },
  failure: function () { ... },
}

If you’re used to programming in Perl or Ruby, that trailing comma’s perfectly fine, in fact leaving it there is sometimes considered good practice because it makes it easy to extend the hash, just add a new row and leave another trailing comma.

  • 0 likes
  • 0 reposts
  • 0 replies
  • 0 mentions

Written by Piers Cawley , updated

Read more…

Ads are gone

Back when I was writing the occasional “How do you find me?” article, I would get some weird ads showing up. On one occasion, I commented that the searcher had obviously just typed a homework question into google and expected an answer. All the ads on that page ended up being for sites that would write your essays for you.

  • 0 likes
  • 0 reposts
  • 0 replies
  • 0 mentions

Written by Piers Cawley , updated

Read more…

Fat is an economic issue

Terry Pratchett once observed that a character of his was anorexic because every time they looked in a mirror, they saw a fat person. By that measure, I’m anorexic, though I tend to avoid mirrors. By more objective measures, I’m morbidly obese - 6’ tall, 346 pounds; the Body Mass Index calculation is never going to give a good number.

  • 0 likes
  • 0 reposts
  • 0 replies
  • 0 mentions

Written by Piers Cawley , updated

Read more…

Reinventing the wheel for fun and profit

When they tell you to stop because you’re reinventing the wheel, ignore them and carry on building a better mousetrap.

  • 0 likes
  • 0 reposts
  • 0 replies
  • 0 mentions

Written by Piers Cawley , updated

Read more…

Code is data, and it always has been

I’m just back from the first Scotland on Rails conference, and a jolly fine conference it was too. Much kudos is due to Alan, Graeme, Abdel and Paul. It was hard to believe that this was the first conference these guys have run and I think all my fellow delegates hope it won’t be the last. As I said in the Pub on Saturday night, I’d had a talk proposal knocked back and, in that situation, it’s terribly easy to find yourself sitting in a session thinking “Bloody hell, my talk would have been better than this!”, but not at this conference.

  • 0 likes
  • 0 reposts
  • 0 replies
  • 0 mentions

Written by Piers Cawley , updated

Read more…