Jamie Thingelstad's personal website

Month: March 2009 (page 1 of 4)

Flight Control – Great iPhone Game

This last weekend I grabbed a copy of Flight Control for my iPhone. It looked like the kind of game that I can get into. I like puzzle style games and have an affinity to 2D-gaming over 3D-gaming. I was pretty much immediately hooked.

The premise of Flight Control is simple. You have a top-down perspective of a landing field and you have to draw flight paths with your finger for each plane to land. There are different types of planes that fly at different speeds. Over time, the planes come faster and faster.

Flight Control Gameplay.png

The game is addicting. I’ve now got a high score of 57 but am stumped how you get much past that.

Tracking Twitter Followers with Cacti

Two weeks ago I was one of the guests on Midmorning on Minnesota Public Radio for a show about Twitter. The result has been a lot of conversations lately about Twitter. I was intrigued to see how many people had started following me from the show and before you knew it I felt the absolute need to see Twitter follower graphs in my favorite graphing tool, Cacti. I did a quick search and was surprised to not find anyone doing this already.

As with anything Cacti-related there was a lot of trial and error to getting this working, and I’m positive smarter people than I can do this with much more elegance, but I got it working good enough for me and the output is pretty slick.

If you’d like to join me in graph-tastic, RRDtool, Twitter navel gazing here is how. And I do know there are services that do these graphs, but I don’t believe any of them do anything more than daily counts. This samples every 5 minutes.


I figured I’d do this in Ruby just to make the Perl lovers in the crowd uncomfortable. At first I tried to use the Twitter4R gem to get to the Twitter API but that had issues, mainly it couldn’t deal with paging in the Twitter API and thus just returned 100 followers. Instead, I went straight to the Twitter API and found a better call in the social graph functions that just returns the id’s of people you follow or follow you. Less data, lighter, and no paging! Yeah! Here is the incredibly simple code that we’ll use to get Cacti the data it wants. All the comments will make this easy to follow. :-)

require 'rubygems'
require 'open-uri'
require 'json'
def get_count(url)
	buffer = open(url, "UserAgent" => "Ruby-Wget").read
	result = JSON.parse(buffer)
	return result.length
def get_follower_count(user)
	url = '' + user + '.json'
	return get_count(url)
def get_friend_count(user)
	url = '' + user + '.json'
	return get_count(url)
followers = get_follower_count(ARGV[0])
friends = get_friend_count(ARGV[0])
puts "followers:#{followers} friends:#{friends}"

Note that all this does is output one line that looks like this:

followers:464 friends:117

Cacti uses a simple name:value format to parse output from shell scripts. This little bit of Ruby does have some Gem dependencies, mainly a JSON library to parse the mess we get back from the API calls into something that Ruby likes.

This script takes the username as a command line parameter. This is so you can multiple twitter accounts in Cacti. Not only can you gaze at your own navel, but you can gaze at your friends navels too!

Let’s get to the point and show what the win is for this before we go through the Cacti configuration stuff. Here is the simple graph that we can use to track follower and friend counts over time.


I didn’t create Cacti templates for any of this, if you want to set it up yourself here are screen shots of the setup.

Continue reading

Twouble with Twitters

Current just posted a video mocking the “twittersphere”. Well done, and pretty funny too. :-)

Of course I saw this via mkortekaas on Twitter. Hmmm…

I Love You, Man

Tammy and I went to I Love You, Man tonight. Pretty funny. It was exactly what you would have expected. Light. Simple. Funny.

Twitter and Onions

garrickvanburen: @PhilipHotchkiss @cullect has shown me that indexing, archiving, and ranking tweets has much in common with peeling an onion.

thingles: @garrickvanburen does that mean it makes you cry? :-)

garrickvanburen: @thingles -more often than I’d like :)

Yo-Yo Ma

I went looking for some nice music for this morning and wasn’t finding anything in my collection. I grabbed Yo-Yo Ma‘s Bach: The Cello Suites album off of iTunes. It was a great choice.


I was flipping through the March 14th copy of The Economist and ran across “The final reel” story. Fisher-Price is no longer going to make the View-Master. It was an odd article. I felt rather sad. I think because I distinctly remember as a little boy looking through my own View-Master and being amazed at the images and also completely obsessed trying to figure out how it worked. The experience continued this summer as Mazie enjoyed looking at her very own View-Master.

Going forward kids will only be able to get reels of animated characters and other licensed, copyrighted characters for the View-Master.


Tammy and I watched Milk tonight. It was a great movie. The story of Harvey Milk is amazing. Great acting by Sean Penn.

Willie and the Wheel

I got this album about a week ago and have been really enjoying it. Willie Nelson. Texas Swing. You can’t go wrong!

My Robot Returns

I missed the 2 year birthday of my Twitter robot, Thinglesbot. He turned 2 on March 11. He was limping along though having lost connections to various sensors in the house and became a bit uninteresting. I finally took a little time tonight to get him wired up again.

Happily he now breaths Ruby with the Twitter4R library instead of Bash scripts and Curl. So much nicer to read. He still keeps everyone updated about the temperatures outside and inside the house. However, he now has a couple of new features that are just for fun. If you follow him you may get picked as his favorite follower some day, and he likes to share a favorite number, color or letter each day.

Thinglesbot’s followers fell off a lot when he went silent for months. We’ll see if they pick up again. He currently has 18 followers.


Welcome back!

Older posts

© 2016 thingelstad

Theme by Anders NorenUp ↑