Archive for the ‘Demozoo’ Category

Passing remote web data to attachment_fu

Thursday, August 16th, 2007

This week I have been mostly discovering what a wonderful Rails plugin attachment_fu is for handling image uploads. You just hand it the contents of an upload field on a form, and it takes care of everything else – checking that it’s a valid image, working out its file type, choosing a sensible filename for it, resizing it appropriately, and sticking the resulting image file into either the filesystem, the database, or Amazon S3.

That last feature has been particularly handy on Demozoo, which is currently hosted in borrowed space on a server that doesn’t really have 100-odd megabytes of free space for demo screenshots. However, attachment_fu comes a bit unstuck when you’re dealing with files that don’t come from a form upload – for instance, in my case I’m planning to have a scheduled task that leeches new productions and their screenshots from Pouët, and I’d quite like to take advantage of the Imagemagick-and-S3 goodness that attachment_fu brings. A bit of digging around was in order.
(more…)

Demozoo

Sunday, August 5th, 2007

I’m back from Assembly Summer 2007, where I launched my long-promised demoscene database site Demozoo to not very much fanfare at all. It’s been in development on and off for at least two years – I ambitiously chose it as my ‘hello world’ project to learn Ruby On Rails with, subsequently aborted and restarted it about seven times over as I learned more and more Right Ways To Do Things, and eventually reached the stage of hacking on Rails internals to make it do what I wanted (most significantly the Nested has_many_through patch/plugin, which lets you achieve simple and yet bizarrely normally-impossible relationships like ‘all productions made by members of this group’).

The initial reception of the site has been mixed; there have been excited noises from people who have immediately seen its potential, and it’s already been useful for filling in those ‘dammit, what group is he in again’ memory lapses at the pub (as well as a cunning way to startle Smash on AssemblyTV, by introducing him as “Smash of jecoute” rather than his rather more well-known role in Fairlight). It’s also attracted some (not entirely unfair) comments that it’s basically a very unfinished clone of Pouët, to which I have three replies:

  • Yes. Deadlines, party coding etc, mumble mumble, not enough time to add much data at all besides Pouët / add whizzy features other than the minimum necessary to make it work. *shuffles feet*
  • Yes. But the massively important and really subtle difference is that it can handle individual people’s nicknames properly, even where they’re duplicated all over the place. (And that’s what’s taken two years to get right, pretty much.) For example, there are at least three people on the scene who go by the name of Simon and at least two groups called CPU, but if you enter a production by “Simon / CPU” then it knows exactly who you mean. And once you’ve got individual authors in the database, you can start indexing graphics and music. And if you don’t have to pick authors from a dropdown every single time, it becomes viable to enter a whole heap of complete party results in one sitting. Which will happen, soon.
  • Yes. How about I stop trying to justify its existence right now, and work on it some more until it speaks for itself?

I like answer number 3 best.