My First Turkey

I don’t normally cook but this year my wife needed a break. Working in a retil store means she has to get up at 3am and drive 45 minutes out of town to her store adjust cameras and catch crooked people in the act before the crooked people get the jump on black Friday. This year it’d be a little different. The food would not taste the same, a given, because Daddy’s at the wheel. I’m not proud because I did a great job, I’m prooud because I finally overcame my fear of large poultry. The bird was a challenge but not unsurmountable. With a little more practice the bird my even be delivered to our table with flavor come next year. Who knows? I may even be brave enough to try to rub it down before I put it in the stove. (I heard some people do this but I’m not all into birds like that!) Not knowing how long to apply heat to the beast or what amount of heat to apply I consulted the Wrox Turkey Reference. According to the TurkeyDocs one must thaw in cold water for about 8-10 hours. One must also preheat the cooking device to roughly 325 degrees. The temperature should remain consistent for the entire baking duration of the feathered animal. (Feathers should be removed prior to the application of heat.) Seasoning is optional though recommended for pleasurable consumption. Fresh vegetation can also be used for both adornment and stuffing. Lesson learned, the potatoes are strictly for adornment and are not to be placed inside the bird.

My First Turkey
My First Turkey

For a cook, I’m one heck of a programmer!

When we used to play with power

Remember the glove? Tectites??? Tectites!!! E-Honda and King Hippo? Wouble Wibble? Yes, Konami had some of the best games! Next to Capcom that is… Nobody beats the Mega-Man series! Truly the best series in all gaming history! The only thing this line up misses is Rob the robot. Was I the only one who’s parents could/wouldn’t afford the spinning gyro wonder? Why was there always at least one kid that had the entire works from the robot to the glove to the power pad? And what’s with Atari? Balance your budget with the joystick touching a single button…

Can I get a wuh, wuh?

I’ve been busy… very busy trying to save my life from people that want money… lots of money. So much money that my checkbook grabs a deposit slip and uses it to cover itself and my wallet. So busy that I couldn’t even think of posting anything worthwhile. But I can’t, you hear me, can not pass up on linking to this here. I told y’all a while ago to check out Astrid cause she gotz John Blaze stuff. Just cause you not rekognizin’ I’m gonna bring it to ya here. Seriously, I always find something entertaining when I bring up the page.

Vodpod videos no longer available.

It’s about time!!!

I restarted Idea on my Mac after several weeks of having an old project loaded and to my surprise version 8 final was reportedly released! I’d been running 8.0M1 for a while and was wondering when it would happen. Browsing the JetBrains site led me promptly to the download section where I found the promised collection of random 1s and 0s comprising the dmg file that only OSX understands. I took a minute to browse the TeamCity section because the advertisement around it looks so tempting. I almost downloaded a free trial but resisted after toying with the live demo. I must admit that I’d grown sooo comfortable with Hudson lately that everything else is a bore.

Anywayz, after my download completed I unwrapped the dmg and was pleasantly rewarded with the new splash screen. Since I was already trying to start a new project prior to downloading the update, my mouse already knew where to navigate. I crossed my fingers as I clicked “Create a new project”, followed the prompts to what I was really hoping to eventually see. Rejoice! They’ve finally added create project from Maven archetype! It’s the little things that matter and lo, how I long waited for this one common-sense feature. I tried the earlier plugins (released during the plugin contest) that promised this same functionality. I could never get satisfactory results with any of them and always had to drop down to the command line. If you’re an Idea lover like myself head out to JetBrains and grab a fresh copy of V8.0. I’m sure there’s more beyond the slick splash and new create Maven project support.

Bugs in Ruby iPhone testing

I saw it yesterday but tried to play it off. Now the problem looks severe enough for me to abandon my efforts all together. It comes down to the difference between


int val = (int) [self.pins intValue];
[self.bowling roll:[NSNumber numberWithInt:val]];

And this:

int val = (int) [self.pins intValue];
[self.bowling roll:[NSNumber numberWithInt:10]];

The first example results in an error:

..../Library/Ruby/Gems/1.8/gems/rspec-1.1.11/lib/spec/mocks/error_generator.rb:67: [BUG] Bus Error
ruby 1.8.6 (2008-03-03) [universal-darwin9.0]

While the second example runs without issue. The bowling object that I’m calling is my self rolled ObjCMock wrapper. It’s starting to look really hairy now so I’m backing off. I’m not happy about giving up but experience tells me that the effort involved in resolving some of these issues would be ongoing.

Dynamic Dispatch Discrepancy

By the way I unsuccessfully tried overriding the methods() method and almost went as far as overriding send on my mock wrapping ObjCMock class. My experience in MOP tells me that overriding send is likely rooted in trouble so I decided against it.

Yesterday’s Ruby drama ended with my finding a hack around the dropped parameters. If I was more familiar with Ruby, had more time to kill, or if it were Groovy instead then my solution would be much cleaner.

The problem:
Ruby Mocks under RSpec (have no idea if the problem persists in other Ruby scripting environments) do not receive parameters correctly from native Cocoa objects.

The hack:
Use a home-grown mock to intercept the parameter and pass along to the Ruby mock.

The code: (bowling_controller_spec.rb)

require File.dirname(__FILE__) + ‘/test_helper’

require “BowlingController.bundle”
OSX::ns_import :BowlingController
OSX::ns_import :BowlingProtocol
require ‘delegate’

include OSX

class ObjCMock
attr_accessor :delegate
def roll(num)

# def method_missing(m, *args)
# puts “Forwarding message”
# @delegate.send(m, args)
# end

def initialize(theMock)
@delegate = theMock

describe BowlingController do
before(:each) do
@controller =
@bowling = mock(‘BowlingProtocol’)
@text_field = mock(‘Pins’)
@controller.pins = @text_field

it “should roll a ball” do

it “should roll a ball and get the value from the pins outlet” do

it “should be an OSX::NSObject” do
@controller.is_a?(OSX::NSObject).should == true

it “should have an outlet to a bowling object” do
@controller.bowling = @bowling

it “should send the pin value to the bowling object” do
@controller.bowling =
# @controller.bowling = @bowling


I left in the commented out method_missing magic that doesn’t work the way I’d expect it. Ideally I’d like to tuck this wrapping mock to the side without needing to define the specific signature I’m mocking. Ideally method_missing would give me the ability to answer any message. Alas, I get “does not reckognize selector” errors from NSProxy when I enable it. I have a feeling that NSProxy probably looks through the defined methods on it’s delegate and throws this error without 1st trying to invoke the method… effectively killing any dynamic magic ability from objects passed into Cocoa land. I also have a feeling that there are a few other holes in the proxy approach with Ruby/Cocoa. If anybody happens to know the details feel free to chime in.