With the help of code from Fazi bear , I have put together a gem that will pull data from the Sudden Motion Sensor chip inside Apple Macbooks and Macbook Pros.

Prior to this, to read the data you needed to interface with the external AMSTracker command line program. This is a smoother way to do it.

Why would you want this? Because now you can use this to control your code by physically moving your laptop around!

Examples here.

Sudden Motion Sensor at Rubygems.org.

Github Repo.

It’s no secret that MWRC received a record number of presentation proposals this year and schedule is going to be excellent. However, you may be interested in knowing some of the talks that wererejected: at great personal risk I slipped passed the heavily armoured Elite Rubyista Guards and rifled through the dumpster at the secret MWRC bunker (located at the bottom of Bingham Canyon Copper Mine) to find a list of the talks you *wont* be attending this year:

In no particular order:

  • “9 ways to segfault your system with eval()”
  • “-1 things you should never do with the Integer class”
  • “Regular Expressions and other forms of cruel and unusual punishment”
  • “Scaling Rails: a one-man comedy show”
  • “To understand metaprogramming you must first understand metaprogramming”
  • “‘Marshal.dump’ and 16 other potty-jokes in ruby”
  • “IronRuby: yes, we’re serious, I swear, stop laughing”
  • “Advanced Recursion” (cancelled: stack level too deep)
  • “Spec’ing your specs, an OCD guide to software testing” (followed by the “spec’ing your spec specs” lightning talk)
  • “‘Write it yourself’, a 0-line web framework”

require File.dirname(__FILE__) + '/../spec_helper'
describe "RickAstly" do
before(:each) do
@rick = RickAstley.new

it "should never give you up" do
@rick.give_you_up?.should be_false

it "should never let you down" do
@rick.let_down(mock_model(You)).should == 'never'

it "should never run around and hurt you" do
@rick.run_around.andand.hurt_you.should be_nil

it "should never make you cry" do
@rick.make_cry(:person => 'you').should have(0).things

it "should never say goodbye" do
lambda { @rick.say(GOODBYE) }.should raise_error(RickAstley::InvalidStringError)

it "should never tell a lie and hurt you" do
@rick.tell.should_not respond_to(:lie)