-
"i have made an "electronic" 8bit calculator (not "mechanical" calculator) with the Beta LBP demo.it do decimal/binary conversions and it can do Add and Sub… computation take clearly less that a half second. this calculator use: – 610 magnetic switches – 500 Wires – 430 pistons – 70 emitters and others stuff…" Amazing – especially the pan-out to the whole contraption.
-
"The big dilemma is that needs are different. I’m normally on Mobile Google Maps when I’m frantically trying to find a place, often the hotel I’ve booked. I’m lost, I want to sleep – I’m not exploring the possibility space, and I don’t want to wade through marketing garbage. Note that this doesn’t make sense for these kinds of advertisers either: I’ve booked already, and I don’t want alternatives." Once again, the problems of the mobile context (rather than the mobile technology) rear their heads.
-
"On April 1, 1977 the British newspaper The Guardian published a seven-page “special report” about San Serriffe, a small republic located in the Indian Ocean consisting of several semi-colon-shaped islands. A series of articles described the geography and culture of this obscure nation." Wonderful
-
Oh gosh, the Rock Band 2 community site is lovely. Lovely URLs, lovely public-facing site with no wall, lovely. (Thanks, Brandon).
-
"The Medieval eye found any surface in which a background could not be distinguished from the foreground disturbing. Thus striped clothing was relegated to those on the margins or outside the social order – jugglers and prostitutes for example – and in medieval paintings the devil himself is often seen wearing stripes." Wow. I did not know that.
-
"When you enable Mail Goggles, it will check that you're really sure you want to send that late night Friday email. And what better way to check than by making you solve a few simple math problems after you click send to verify you're in the right state of mind?" Amazing.
Stripes and Surrealism: Playing with the Moo API
05 October 2008
Making things is fun. It’s satisfying to watch things spring forth from nothing, made by your own hands.
The greater the gap between your own capabilities (or your perception of them) and your output, the more satisfying – not to mention bemusing – the process is. That’s why Moo‘s public API is so exciting – using nothing but code, you can create real, physical, things. Imagine that! Objects you can hold that sprung forth out of bits and bytes.
I mentioned last week that I’d worked on extending Ruminant, a Ruby library for interfacing with Moo’s API, to also handle the creation of stickers. I wasn’t doing so purely out of generosity, though; I had a project up my sleeve that I wanted to work on.
I can now show you the results of that project. Why only now? Because now, I have the physical products in my hands. I think it’s really important with something like the Moo API that you only talk about what you’ve made when it’s actually real – no showing off code and saying “oh, they’ll be here soon“. You’ve got to make the things.
Anyhow: now I can tell you what I was up to.
These are two books of stickers, made from of my most recent photos on Flickr. They’re built by taking data from the Flickr API, processing it on my computer, uploading it to the web, and sending it to Moo’s API. This is a single shell command. You fill out a configuration file with the important details – such as your API keys for both Moo and Flickr – and run the file. A short while later, you’ll be asked to pay for your stickers, and off you go.
The fun part of this isn’t the whole one-step thing; it’s what goes on when we process the images. We don’t just print them straight, you see.
Another short aside: making real things out of code is fun because you don’t think it should be possible, and image-processing is actually similarly entertaining, just because it feels like it should be harder than it is. Most “easy” programming comes down to processing text in, and text out. Images seem like they should be harder. In fact, images are now much easier than they used to be thanks to things like GD and ImageMagick. I had a lot of fun playing with RMagick, and it wasn’t difficult at all.
So, what did I make?
The first are what I called Dadaist Photographs. Moo stickers are small; it’s quite hard to see a proper photo on their small dimensions. So why not make something at once very vague, and yet also entirely precise? That’s what these are. The background of the image is the average colour of the photo, determined by summing the red, green, and blue values of each pixel in the image, and then dividing each of those by the area of the image to get the average red, green, and blue values – and then making a colour out of those. In the foreground, we super-impose the title of the photograph in text. This is, as you can tell, somewhat silly. But! It’s a hyper-realistic single-pixel photograph, and ideal for Moo’s stickers. (A quick note – I didn’t quite add enough padding to the text on these. I’ve learned my lesson for next time).
Whilst I was working on that, I had another fun idea. It turned out to be just as easy to build, as it resuses most of the same code as the Dadaist Photographs. This let me abstract lots of things out, and at the same time learn how to write slightly tidier object-oriented Ruby. Anyhow, a short while later, and we had these:
These are less silly, and to my mind more beautiful – they render wonderfully on paper. They are very simple to make. First, we squash the photo down to being a 500×500 square. Then, we take the middle row of pixels in the image, and replace every row of pixels in the image with the middle row. The net result is essentially a “stretched” image, based on a single row from the image. RMagick made this very easy. Like I said, I think the results are very beautiful, and it’s amazing how easily identifiable they all are.
I wrote these by first creating the image processing code. That’s the stuff I was least familiar with, and took the longest to get my head around. Once that was done, it was relatively easy to bolt proper Flickr API import on (thanks to the Net::Flickr gem), and subsequently take my processed images and throw them directly at Moo’s API, thanks to Ruminant. A small amount of tidying, abstraction, and the creation of simple config files later, and we were done.
The only slight catch is that Moo need to get pictures from the public web. I’m running my script locally, because it’s quite processor/memory intensive, so the script SFTPs the pictures to a destination of your choosing before sending them to Moo.
But that’s it. It’s one click. It works most of the time (but with 90 images sometimes chokes a little; still, it’s not hard to salvage that by generating the XML for the order yourself). Because of the processor/memory overhead on rendering the images, I haven’t put this online as a web tool – I’m still thinking if there’s an easy way to do that. This could end up on EC2 one day.
What I’ve done instead is to put it on github, so you can at least see the code to learn from it, and, if you want, download and run your own copy. (If you’re not sure what to do: install git, and then click “clone” on the github page to get the command to type to clone the repository), I can’t guarantee it’ll work on your machine, and I can’t offer any support to help you get it running, but I hope you have fun with it regardless.
So there you go. First, an idea; then, the physical product; finally, the code that makes it all work. This doesn’t serve much real purpose, I’ll admit, but it was a fun making project, and it’s hugely satisfying to see how easy it is to make things out of pictures and paper with code, starting with a simple idea.
I’m not sure if I’ll take this any further – it stands alone quite nicely – but for starters, I’m going to see if I can extend Ruminant to handle other product types – though for various reasons, that might take a little while. If I do anything with it, you’ll hear it here first. In the meantime, I hope this serves as a little inspiration for how easy it is to make fun stuff with Moo, and perhaps that my silly, surreal stickers raised a smile.
-
"The technology will probably improve, but in lieu of the promised emergent web AI, we need to build more small tools, more games to bootstrap datasets, and more simple ways of encouraging people to play their part in the semantic web without ever having to explain what it is." tt++.
-
Fantastic presentation from Giles Bowkett, which is about generative music, art, shipping, Ruby, and building things for yourself.
-
"Paine does have a descendent, a place where his values prosper and are validated millions of times a day: the Internet. There, his ideas about communications, media ethics, the universal connections between people, the free flow of honest opinion are all relevant again, visible every time one modem shakes hands with another." Fantastic article
-
"At its core, what should this product be best at? When users think of this product, what is the central feature(s) that should spring to mind? Everything else is distraction, clutter, cruft."
-
"I think this vision of artistic expression as a form of collaboration is a truer description of the nature of game design than of any other medium, because video games are inherently interactive." Pliskin on Steve Gaynor, and the gap between the screen and the gamepad.
-
Portal-inspired homebrew game for the DS. Looks rather sweet, although not keen on collect-em-up mechanics.
-
"…we're always being told art should disturb. Moore makes artists like the Chapmans look like the middle-class entertainers they are. He's a real force of imagination in a world that is full of fakes. If there was any justice this man would get the Turner Prize."
-
"Basically WipEout HD is the first game I've come across that seems to be operating with a dynamic framebuffer. Resolution can alter on a frame-by-frame basis. Rather than introduce dropped frames, slow down or other unsavoury effects, the number of pixels being rendered drops and the PS3's horizontal hardware scaler is invoked to make up the difference." Interesting – and technically fascinating – post on Wipeout HD's dynamic framebuffer, used to keep the framerate at a rock-solid 60fps at the expense of horizontal resolution
-
"Truth be told, I don't think in terms of absolute F/stops and shutter speeds. They are not what is important. It's the relationship between the different light levels that is important." This is why I love David Hobby: he talks about photography (in general) in the same words as me. Exposure isn't about numbers, it's about sliding scales.
-
Wow.
-
Now the NDA is gone, this looks like a good starting point. Honest.
-
"Content is an expensive, messy business and fraught with quality risk. Network resources like minutes and texts are an attractive commodity and one where the wholesale price is falling all the time." Interesting analysis of Blyk.
-
"Ladies and gentleman, Hello World 2.0 uses no fewer than 7 messages queues, three command line applications (which can be executed on physically separate machines), and two Inversion of Control frameworks (but I’m fixing that tomorrow)." Huddle look at moving towards message queues.
-
Web Inspector gets an overhaul; it's looking pretty nice, now.
-
"The Pencil Project's unique mission is to build a free and opensource tool for making diagrams and GUI prototyping that everyone can use." Hmn.
-
"Here is a video which gives some insight into how Little Big Planet ( and Media Molecule! ) evolved from next to nothing into what it is today!" MediaMolecule put the LBP repository into codeswarm, and then published the video. Lovely.
-
"Rososo shows you which bookmarks have updated, and hides the rest. It is a good alternative to newsreaders, which, like your email inbox, tend to accumulate obligation and guilt." Not sure about only showing sites, rather than content, but I like the idea of peaceful software a lot.
-
"The Geoblogomatic is little machine that turns blogs into maps. It's in beta" "If you have a blog about places, or things in places, the Geoblogomatic can make a map of your blog posts." Awesome. Another fun thing from Tom.
-
"This is the funny thing: appreciation of Mega Man music is a microcosm for the kind of snobbery you see in indie-music-loving white people. It's also a microcosm for the popularity of the series as a whole." Definitely exhaustive, and quite sweet. (Also: Michael's blog's tagline is pretty much spot on).
-
"Marketing is a strategic function about delivering customers what they want. It isn’t a jazz hands and rubber chicken and t-shirts. It is the heart of successful companies…"
-
A few notes on Flickr's queueing systems.
-
Cultured Code do a large behind-the-scenes look at how they designed their Things iPhone UI. Lots of detail, lots of working shown. Even if you don't agree with the choices they made, it's excellent to see somebody sharing at this level of detail.
Ruminant 0.9.5: making Moo Stickers in Ruby
26 September 2008
Last night, I took a look at James Darling‘s Ruminant library for Ruby. It’s a little Ruby library that lets you assembled designs and orders and send them to the Moo API for printing. It’s really nicely designed, but it’s only in the very early stages of development; it only supported creation of Minicards.
For various reasons, I’m looking at creating stickers through the API, and decided that it only seemed right to add sticker support to Ruminant.
As of last night, I’ve done exactly that. This is in part down to the joy that is GitHub. I forked James’ original code, and started work on my own Ruminant fork. I’ve added support for stickers, and have issued a pull request so that hopefully it’ll get merged back into James’ branch.
To install it, you’ll need Hpricot installed (sudo gem install hpricot
). Once you’ve done that, you can install it as a gem directly from my Github code. First, add Github to the list of sources rubygems supports:
gem sources -a http://gems.github.com
and then install my gem:
sudo gem install infovore-ruminant
and follow the instructions in the README.
More to come, along these lines…
-
"this portion of moby.com, 'film music', is for independent and non-profit filmmakers, film students, and anyone in need of free music for their independent, non-profit film, video, or short… the music is free as long as it's being used in a non-commercial or non-profit film, video, or short. if you want to use it in a commercial film or short then you can apply for an easy license, with any money that's generated being given to the humane society." Moby is smart when it comes to licensing his music. I think this is a really good move, and not something you'd expect from a major recording artist.
-
"For one, there's an undercurrent of a siege mentality in journalism right now, with newsrooms cutting staff and print operations frozen stiff in the headlights of the internet. The focus on narrative and story gives a softer edge and an escape valve, though – this group is not primarily a tech-driven community, but they catch on to new developments quickly and bend them into the service of storytelling." Interesting round-up from Mike, particularly with respect to the NYT's election coverage.
-
“You know what a sign of love is, in this family? It’s if you come home and the elevator is on the ground floor,” says Linda. “Because that means whoever came home before you walked up twelve flights of stairs.” Fantastic article about Jay Maisel's house.
-
Kars releases the source for his travel-time map of the Netherlands. Nice to see the artefact-as-code, as well as the artefact-as-design.
-
"Apple’s current practice of rejecting certain applications at the final hurdle – submission to the App Store – is disastrous for investor confidence. Developers are investing time and resources in the App Store marketplace and, if developers aren’t confident, they won’t invest in it." Fraser Speirs hits the nail on the head over the problems with the current App Store model.
-
A strong article from Joe on some guidelines, based on experience, for writing RSpec user stories.
-
Getting around the issues with Rails' authenticity tokens and trying to perform Ajax requests in jQuery.
-
"I think this is very important. If we limit ourselves to only designing the present then the ‘future’ will just happen to us, and the one we get will be driven by technology and economics. We need to develop ways of speculating that are grounded in fact yet engage the imagination and allow us to debate different possible futures before they happen." Interesting interview with Dunne over at the Adobe site.
-
Fingerboarding game for the iPod; really delightful, and clearly a fun thing to do with your fingers. Also: it makes sense to play this with the device on a flat surface, which is unusual for the iPod games released to date.
-
"The winner is Tim Graham who took manual personal data collection to another level. From email spam, to beverage consumption, to aches and pains, Tim embraced the spirit of self-surveillance. He even made his personal data available in the forums." Dataviz overload!
-
"What are the weird, seemingly unimportant data that can join up the areas we already know, and how do we know where to look for it? In order to be truly useful eyes on the street, we need to be able to take the scenic route, or shortcuts, or any other route that will be fun or illuminating for us and the people we speak to."