-
"I’m really typecasting myself here. If there were an international “Person most likely to write a Spectrum emulator in Javascript” award, I’d have taken it for the last five years running. So here it is – probably the most stereotypical project I’ll ever come up with." Blimey.
-
"Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc."
-
"Losing is an opportunity that individuals deserve, and allowing the state to sweep in and save you from the consequences of your own actions robs you of a certain kind of agency." Fantastic article about the difference between win/lose and quit/finish. Lots of good stuff in here – a must-read.
-
"The tests are the program. Without the tests, the program does not work. Tests are not something that should be left for the inexperienced; tests are the hard part."
-
"The analysis presented here explores word usage in the 2008 US Presidential and Vice-Presidential debates. The purpose is to explore the structure of speech, as characterized by the use of nouns, verbs, adjectives and adverbs, and noun phrases. The speech patterns of opposing candidates are compared in an effort to identify characteristic value and personality traits."
-
"How I asked my GF to marry me in Little Big Planet. My (now) Fiancee was playing the level. She was so shocked she kept playing and knew i was filming. Afterwords we hugged, she cried, and I gave her an engagement ring." This is amazing in so many ways, not least of which that she wasn't the first person to paly it.
-
"The suits took issue with every brave, authority-questioning page of our Meet the Sandvich script-specifically that there were supposed "similarities" between it and the 1987 action film Predator, and more specifically that it was word for word the 1987 action film Predator."
-
"Each issue of this unique title is 3,840 half-inch-square panels of nothing but dots talking to each other. The concept is that everyone is drawn so far away that all you can see is a dot. And the dots do stuff. Like smack each other, or give birth, or die. It’s brilliant, it’s hilarious, and it’s mind-blowing."
-
"Imagine if Apple had decided to make a MacBook that was priced like an iPod. That's what Asus is doing."
-
"If you've ever needed to produce PDF documents before, in Ruby or another language, you probably know how much it can suck. Prawn takes the pain out of generating beautiful printable documents, while still remaining fast, tiny and nimble. It is also named after a majestic sea creature, and that has to count for something."
-
"EA has confirmed that the advert was paid for by Obama."
-
"I wasn’t concerned when Netscape started losing market share to Microsoft. I didn’t sweat it when the stock price stalled. The reason I started thinking about my next gig was, months before either of these two events occurred, one of the lunchtime bridge team left. The game stopped. The small group of four no longer spent a long lunch quietly, unknowingly defining the culture of the company and everyone who was watching noticed."
-
"The 2 opponents perform magical gestures with their hands to create their supernatural weapons – spells. Some are so potent as to be able to blind a man, call forth terrifying creatures, or even kill the unfortunate victim instantly. Consequently each wizard must rely on his own cunning to be able to time enough defensive spells to avoid the brunt of his adversary's attack, yet force in sufficient offensive spells of his own to crack the magical armour of his opponent, and kill the wizard outright. The game is an attempt to capture the spirit of such a battle in as simple yet exciting way as possible." The "waving hands" game by Richard Bartle.
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.
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…
-
"Unlike other video platforms, Panda is not just a service for encoding your videos for the web; Panda handles the whole process. From the upload form to streaming, Panda takes control." Open source, Merb-based video platform that anyone can use – runs on top of Amazon EC2, S3, and SimpleDB.
-
"After all, what is science? It's a technique for uncovering the hidden rules that govern the world. And videogames are simulated worlds that kids are constantly trying to master. Lineage and World of Warcraft aren't "real" world, of course, but they are consistent — the behavior of the environment and the creatures in it are governed by hidden and generally unchanging rules, encoded by the game designers. In the process of learning a game, gamers try to deduce those rules. This leads them, without them even realizing it, to the scientific method."
-
Jason Kottke republishes the supposed rules that Chuck Jones and other Road Runner animators stuck to whilst making their cartoons. Perhaps a little apocraphyl, but I like the idea of rules for things that aren't games.
-
"Merb’s routing shiznits needs some serious documentation love. Whilst I have a shot at getting some proper docpatches together here’s an overview of how to use routing in Merb 0.5." Thank god for that – was finding Merb's docs a little patchy in places.
-
Cannot believe I only just discovered this: it's a sleeping bag with arms and legs. Incredible.
-
"…it’s my feeling that experiences can’t really be designed. You can only provide the resources for people to have an experience; then it’s the people (users) themselves who create the experience." Dan Saffer hits the nail on the head at his new studio's blog. Can't wait to see what comes out of Kicker.
-
"This leads into something else that felt very clear after the conference; the need to look outside of what we already know. If, as Matt Jones, posited, execution is more important than ideas, we’re going to need an understanding that is based on people who are not us, and that understanding is going to have to incorporate all the richness of what they know, how they model their worlds, and how they model their interactions with the world around them." Looking forward to more from Alex on dConstruct
-
"The Box is an ambitious and unique year-long project for BBC News to tell the story of international trade and globalisation by tracking a standard shipping container around the world." Awesome. What's better is that it's a working container, which means it's not significantly contributing in a negative way to environmental damage any more than other containers. Could be interesting.
-
"With a recent project, we really started utilizing extensions with named_scope which is very powerful and cleaned up our code considerably." Some really nice examples of using named_scope effectively.
-
"Nintendo makes money with the hardware alone, which may be a superior business model." What, making profit on units rather than selling them at colossal loss is a *superior* business model? Who would have thought it!
-
Long thread of patched and hacked 8-bit and 16-bit ROMs, some bringing a vast amount of customisation.
-
"I'm passionate about this because I'm building the camera I've always wanted to shoot with," he says. "When my grandkids and great-grandkids look back, they're going to say I was a camera builder. I did handgrips and then goggles and then sunglasses to prepare myself. But cameras are magic." Fantastic article about Jim Jannard and his Red digital movie-camera business.
-
Brilliant, brilliant little advert.
-
"VideoGamesHero brings you homebrew action at it's best – offering lasting fun and challenging action with over 65 Songs, 5 Game modes, Motion Card and Guitar Grip support, there is something for everyone!" Homebrew Harmonix-style rhythm action game for the ds. Awesome.
-
"In this extensive interview, Yasuhara outlines his carefully constructed theories of fun and game design, including the differences between American and Japanese audiences, with illustrated documents." Lots of nice things in here, including a section on "tidying up".
-
"APIdock is a web app that provides a rich and usable interface for searching, perusing and improving the documentation of projects that are included in the app." Handy.
-
"I think the role of the architecture diagram, user flow, and wireframe belongs very much after the fact, after we’ve sketched and prototyped an experience. Those are tools to document what has been agreed through sketching and prototyping. They are not the best means for solving challenging design problems." That seems like a good way of putting it.
-
"In this template you'll find shared layers (masters) for a title page, wireframe, wireframe/storyboard hybrid, simple storyboard, and storyboard with notes. Column guides and a regular grid make it easy to use and keep your layout tight." Nice .graffle templates for UX designers.
-
Timelapse, merged photographs of videogames. Beautiful, especially Tempest.