April 2009
20 posts
Delicious Twitter Sync
Quite Useful has a Delicious account which we use to share links we post to twitter.com/quiteuseful.  I wanted to sync up our Twitter link posts with Delicious, so I wrote a script to do the job. The script will download a Twitter account’s recent posts, find links, and tag links based on hashtags — which is why our Twitter posts almost always have a generous helping of hashtags. ...
Apr 29th
Quite Useful Weekly Roundup
This week we featured a Beautiful Algorithms series: Tunnels Part 1, Part 2.  The rubyisation of the demoscene continues!  I also wrote about how to build a Growl app in Objective-C for Mac OS. Useful Tweets RemotePad for iPhone is an open source computer controller.  Interesting for iPhone developers, but useful too. Canary is an open source Mac Twitter client. TwitterSnooze lets you quieten...
Apr 25th
How to Make a Growl App
I made a little Objective-C growl app the other day (Deadline for Mac).  It started as an idea I had on Saturday afternoon, and ended up being a finished product by Sunday night.  Working with Growl is surprisingly simple! This is a short tutorial on how to build your own Mac app that uses Growl.  You’ll need Apple’s developer tools installed and some familiarity with Xcode. ...
Apr 23rd
Beautiful Algorithms 2: Tunnels (Part 2)
This is Part 2 of the Tunnels tutorial, Part 1 can be found here: Beautiful Algorithms 2: Tunnels. Note: The code examples in this article might not appear in your feed reader. Lookup Tables Lookup tables are basically arrays of values.  Referring to elements in an array is faster than calculating them.  Doing this in Ruby is almost as simple as: 100.times.collect { |i| Math.sin i * (Math::PI /...
Apr 21st
Beautiful Algorithms 2: Tunnels
I spent weeks trying to reproduce dot tunnel effects on my Amiga back in the 90s.  Demo groups used to get thousands of points animated as complex 3D shapes and tunnels, but their techniques were way beyond me.  This tutorial introduces one such effect, and a few common techniques programmers use to improve performance. For a video of the effect, check out my tunnel screencast. This tutorial...
Apr 20th
Quite Useful Weekly Roundup
I started the Beautiful Algorithms tutorial series this week.  The first algorithm is fire, a cool graphical effect that’s actually easy to understand and create: Part 1, Part 2.  I also wrote about Git GUIs because I’ll be referring to Git more often in my programming tutorials.  Ric contributed a post about knowledge management and Swirrl. Twitter Stuff Avoiding iPhone App Rejection...
Apr 18th
Git GUIs
In my Let’s Make a Game tutorial, I mentioned that my code could be downloaded with Git from GitHub.  I’m going to use Git for all of my tutorials on Quite Useful, so it’s worth getting familiar with it. This post briefly reviews a few GUIs for Git, for those of you who don’t like the command line. GitX GitX is for Mac OS and is both free and open source.  It’s a...
Apr 17th
Swirrl: Quite Useful Knowledge Management
This post is by Ric Roberts, a developer at Swirrl who also contributes to Quite Useful. Knowledge Management for Productivity If a question about general knowledge comes up in conversation, it’s easy to immediately look it up on the web on your laptop or iPhone.  If you’re watching a film and you can’t place where else you’ve seen one of the actors, you can instantly look...
Apr 16th
Beautiful Algorithms 1: Fire Part 2
Yesterday I introduced Processing and Ruby Processing in Part 1.  This part is the meat and potatoes of the tutorial: the fire algorithm and the Ruby that generates it. The Algorithm You can watch a screencast of the fire algorithm in action here: fire-processing-rb.  It looks like a sophisticated animation: waves of fire rise up from the bottom of the window at different angles and gradually get...
Apr 15th
Beautiful Algorithms 1: Fire
In this two-part article we’re going to use Ruby to make a fire animation.  It’ll look like this: In my previous Ruby tutorial, Let’s Make a Game, I explained how to use Ruby and Shoes to make a game.  Another way to get graphics on the screen in Ruby is to use Processing. Note: Code examples require JavaScript to run, so please view this article in your browser rather than a...
Apr 14th
Quite Useful Weekly Roundup
This week I concluded the Let’s Make a Game Series.  I also announced the start of a new series, Beautiful Algorithms, in which I’ll discuss beginner-friendly graphical algorithms alongside examples from the history of computer graphics. I’m going to take Monday off, so you’ll see Beautiful Algorithms start on Tuesday. Twitter Summary Developer cdargs has made a big...
Apr 11th
Beautiful Algorithms
I enjoyed writing the Let’s Make a Game Series, so I’m thinking about a followup with a guide for writing Pacman or Space Invaders.  In the meantime, I’d like to start a new recurring series called Beautiful Algorithms. This new series will explain how to write graphical effects.  I’m going to stick to Ruby or possibly JavaScript — languages with simple syntax that...
Apr 10th
Let's Make a Game: Wrap Up
In this tutorial series I explained how to build a version of the game Snake. Part 1: Covers installation of Shoes and explains how the snake moves and how to control it with the keyboard Part 2: Basic collision detection, eating food to make the snake longer Part 3: Collision detection for bricks and the snake, stopping the main animation when the snake crashes Part 4: Handling...
Apr 9th
1 note
Let's Make a Game 5: Sounds
Shoes doesn’t have great audio support right now, but it ships with multimedia capabilities provided by the VideoLAN and ffmpeg libraries. To use audio, use the video keyword with a wav or mp3.  You can hide the resulting video object so it won’t take up layout space.  One limitation of audio playback is you only have a single stereo channel, which means you can’t multiplex...
Apr 8th
Let's Make a Game 4: Scores and Death
Note: Remember to view this article on Quite Useful’s site in case you can’t read the code examples. The snake game we’ve been building over the last 3 articles is still pretty basic.  The player can’t restart a game, there’s no score, food doesn’t reappear, and the snake can slither off the screen. If this is the first part you’ve read, check out Part 1...
Apr 7th
Let's Make a Game 3: Rules
This is Part 3 of the Let’s Make a Game series.  In Part 1 I explained how to get started with Ruby and Shoes and built a basic snake, and in Part 2 I added food. Remember to view this on Quite Useful rather than in your feed reader (in case code examples don’t appear!) This part shows how to add more complex rules to the game using collision detection.  Collision detection is used...
Apr 6th
Quite Useful Weekly Roundup
This week I started a new series called Let’s Make a Game.  I’ll be continuing this series next week, with posts about how to add rules and maps to the game. We also published a series on open mapping technology: Introduction, OpenStreetMap and OpenLayers. Here’s the Twitter roundup. Social TweetChat makes Twitter feel more like a chat room, grouping posts based on hashtag. ...
Apr 4th
Let's Make a Game 2: Food
This article is part 2 of our Let’s Make a Game series.  Remember you’ll need to view this on the site rather than your feed reader in case the code examples don’t appear. Today I’m going to show you how to add a game board and food: This tutorial is a little bit shorter than the previous one because I’m attending GitLondon!  Message me on Twitter (@alex_young or...
Apr 3rd
Let's Make a Game
This tutorial series will show you how to make a game.  The game will be: A version of Snake Cross platform (Windows, Mac, Linux) Written in Ruby Please remember to visit this article on our site rather than in your feed reader to get the code examples. Cross Platform Games There aren’t many ways to easily write cross platform GUI applications, let alone games.  Rather than use Adobe...
Apr 2nd
Introduction to OpenLayers
This is the third part of my open source mapping series.  See Part 1 for an overview of open mapping technologies, and Part 2 for details on running OpenStreetMap. In this part I’m going to explore the basics of OpenLayers.  OpenLayers allows you to put a dynamic map on any web page, and displays map tiles loaded from various sources.  It can also draw vector shapes on maps, and plot...
Apr 1st