Review: Porco Rosso (and 100th Post)

2009 July 30

In a previous review of Miyazaki films, I mentioned I hadn’t caught a couple.

Last week, Netflix delivered Porco Rosso. I enjoyed it a lot! The kids did too.

What impressed me most about Porco Rosso wasn’t the plot or the telling of the story, both of which were very familiar after having watched the others. Mr. Piccolo, whose family helped repair Porco’s plane, reminded me strongly of the Boiler Man from Spirited Away, for example.

As I watched the film, I kept thinking how it would make a wonderful backdrop for a Spirit of the Century campaign! The setting reminds me of the Xbox game Crimson Skies, a nation of islands connected by plane and zepplin. The characters are pure pulp. Porco would make an excellent Centurion, a Superb pilot. Gina, the restaurant owner with Support Rapport and Great Contacting. And so on.


In a side note, this is my 100th post. The blog has been a pleasure. It always amazes me to see what posts people are drawn to.

Some posts of note have been:

As you can see, my readers are a diverse bunch. Part of me want to focus the blog on a particular subject, but no one subject dominates my readership.

Any requests? What would you like to see in the next 100 posts?

First class

2009 July 16

Last week, the City saw fit to hire me as a taekwon-do instructor. Tonight was my first class teaching.
read more…

USS Ayrton Session 2: Bringing ‘Er Home

2009 July 16

My oldest son has joined the crew as a lycanthropic species. We’re still working on his stats. He’s an engineer named W’an.

The kids love the concept of LARP, so that’s what it became. We didn’t get a lot accomplished in the session. Honestly, that’s okay — we had a great time, and that’s what counts!

We left off last session with a crew exchange to prevent trickery. The three player characters were the team Starfleet selected to travel aboard the Goodnight-Loving. W’an slowly gained the trust of the pirates as things started mysteriously malfunctioning.

Gorm the Klingon tried to bully the pirates into leaving them alone so they could roam the ship freely — no go. Finally, W’an engineered a radiation leak in the cargo container they suspected carried the planet buster bomb and convinced the pirate left in charge to jettison it in an escape pod. The Ayrton tractored it into their cargo bay. Mission accomplished!

Our Vulcan XO/medic Vanisha didn’t have much to do, and my daughter and I talked afterward about creating dramatic situations. I suggested, for example, that she could engage the other characters in some leading dialogue. Or that she improvise something similar to the way my oldest did with the old freighter’s engines.

Things really got fun when I suggested to my son that he dig out some props I’d made out of LEGOs in my youth. They really helped the kids get into character!

One portion of play was particularly funny, in which W’an called the captain of the Ayrton on a LEGO communicator and said, “Someone set us up the bomb!” I whipped my head around and said, “What you say?” The four of us immediately riffed into Zero Wing and recited the entirety of ALL YOUR BASE ARE BELONG TO US, which the kids know from the Laziest Men on Mars song. It took us several minutes to stop laughing and get back to roleplaying!

The money moment of the session happened when my daughter said, “Hey guys, instead of sitting on our butts all day, we could roleplay Star Trek!”

The defense rests.

LEGO Star Trek props

2009 July 15
LEGO Tricorders
LEGO Phaser

When I was a lad, I made some Star Trek props out of LEGOs. I hadn’t thought much of them until this evening, when I was doing some LARPing with my kids.

I carefully looked at the Star Trek Technical Manual and any other references I could find to get exact dimensions for these items. For the Next Generation items, I had to rely on magazines and paused stills from my VCR to get them right.

Being LEGOs, they tended to disintegrate just when things were getting interesting. So, I wrapped them tight with duct and electrical tape. Considering they have been around for 25 years or so, they have held up remarkably well! As you can see in the phaser picture, the duct tape is a little the worse for wear; stretched out in places, falling off in others. I think it’s adorable that the kids want to re-wrap them!

I also made a couple original props. I’ve uploaded a picture of the Type V Phaser I designed for black ops to Flickr. Seeing those props put to good use brought back some wonderful memories.

iPhone application mini-reviews II

2009 July 14

Since it’s been a few months since my first post in this series, I felt it was time to revisit this.

Items in bold are new. Items in strike-through are history. Due to some peculiarities with my laptop, I don’t have iTunes installed, or I would link directly to these apps. Do check them out!

Everyday

  • Phone, SMS, Calendar, Mail, Safari, Facebook
  • TweetDeck: I find TweetDeck to be more intuitive than TwitterFon.
  • Memiary: A lightweight journaling utility, it links to their web site. Entries are private and only visible when you are logged in.
  • PocketMoney: A manual money tracking application. I don’t having my account information exposed online a la Quicken or Mint, so this fits the bill nicely. Maybe when I can use stronger security measures.
  • TwitterFon

Frequent

  • FlightControl: I love this game of landing planes. It’s just the right balance of whimsy and challenge.
  • Archers: My kids’ favorite game. Calculate the correct azimuth and pull to hit your opponent in a duel.
  • Pocket Tanks: Similar to Scorched Earth, it often alleviates the boredom of waiting at events
  • Scramble: It has replaced Moxie as my iPhone word game of choice. Its dictionary is too permissive for my taste, but better too many words than too few.
  • Contacts, iPod, Maps, gFlash+
  • Upgraded from Infrequent: WordPress

Infrequent but Handy

  • MyWireless by AT&T: Essential for managing my family’s cell phone accounts
  • Geocaching: I go geocaching with the kids on occasion; it’s worth the $10.
  • Distant Suns Lite: I stargaze with the kids some too. The best of breed free astronomy app, though I will probably upgrade soon.
  • AP Mobile and SportsTap: Used when I want to look up some news item I overheard
  • DarkSlide: I use it as a gateway to my Flickr account
  • Dictionary, Eng <-> Ger, DianHua: nice to have access to a dictionary
  • Be Extra! – The Extraordinaries: Fritter your time away cataloging photos for museums
  • 9-in-1 Toolbox: Jack of 9 trades, master of none
  • Weather, Lose It, Diceshaker / Dice Bag, iChess, Flashlight
  • Downgraded from Frequent: MotionX GPS Lite, AroundMe, SnapTell, midomi, Ocarina, iStethoscope
  • iHandyLevel, Lightsaber, Mancala FS5, Dialer (Melodis)

Also-Rans

  • Moxie: An enjoyable word game, but I find the dictionary’s lack of words frustrating
  • Google: Not enough bang for my buck, I find myself going back to Safari

On Netflix’s “Watch Instantly” Streaming Feature

2009 July 3
by neontapir

I just watched my first Netflix streaming movie. It was “Species”, for the record — I picked it because it was the first one presented I hadn’t seen that I had a vague interest in.

Species itself was mildly interesting, but I was more curious about the experience. I found the Silverlight client for Firefox 3.5 to work extremely well. The movie stopped in the middle with a “can’t stream this right now” message. I clicked refresh, and much to my delight, it not only reloaded the movie but kept my place!

This was light-years ahead of the experience I had watching a Comcast On-Demand movie a month ago, which I had to restart no less than ten times because of freezes.

Having done this makes me interested in other players in this space, as well as a set-top box. Any recommendations?

USS Ayrton session 1: On the Goodnight-Loving Trail

2009 July 1

The kids and I have played our first session of the USS Ayrton campaign.

This time, I’m setting back and letting the kids run with it. They are LARPing, which works for me. I spent a lot of my early roleplaying years LARPing situations, and I find it a useful tool for inexperienced roleplayers.

The game started yesterday with the same presentation as my old USS Endeavor campaign: there’s a merchant ship — the SS Goodnight-Loving — under attack en route to Spike IV and requesting help.

I resurrected my oldest Star Trek character, K’ron Tharel, to be the Captain of the USS Ayrton. He’s an Andorian, and he makes for an interesting counterpoint between the Klingon envoy Gorm and the Vulcan medic/XO Vanisha. We watched parts of “The Andorian Incident” episode in Enterprise Season 1, so they had some clue what Andorians were? The kids were incredulous. “An Andorian’s our Captain?!” I explained that the main Androian Shran and Captain Archer developed a friendship over the course of the series.

I asked the kids who they thought would be behind the attack. They said, it’s Andorian terrorists. They further said that the Goodnight-Loving was carrying a nuclear bomb that could destroy a planet. I edited it to a neutronic bomb, a “planet-buster”.

We left with Cmdr. Vanisha to make a recommendation how to approach the situation.

When we resumed tonight, I asked my daughter what she’d come up with. Her first plan was what I expected, be friends and ask why they did it. But she quickly came up with the idea of infiltrating the ship and trying to re-take it from the pirates (maybe terrorists) that had taken it.

My son quickly chimed in, stating he knew a Klingon merchant on the planet and could arrange passage on his vessel. They took a group of security and the Chief Engineer and headed out.

They beat the Goodnight-Loving to Spica IV, got on the ship, and intercepted the Goodnight-Loving. The pirate captain said he wasn’t interested in trading, but when Gorm offered Vanisha as a “Vulcan slave”, that got him mildly interested. The pirate captain wanted more. No antiques interested him, but when Gorm mentioned dice, the pirate captain was hooked.

My son and I decided we’d roll 2d6; the first to roll doubles won.

They docked their ships and played in the airlock. “No tricks.” The pirate captain quickly won the first game. Gorm upped the ante with the ship’s dilithium. The pirate captain won in record time. Finally, they agreed to wager their ships, sans cargo and crew. This time, after about a dozen rolls, Gorm was victorious!

They agreed to exchange two crew each to prevent deceit. Vanisha and a security specialist nicknamed Gunny went aboard the Goodnight-Loving; the captain gave them two bruisers named Jones and Duke.

Being a puzzle, the next scene should logically be either a fight or a chase. I choose chase — the pirate captain is going to bold with the Vulcan “slave” as his prize…

Review: Dexter

2009 June 30
by neontapir

My co-worker turned me on to “Dexter”, the Showtime series. I’m neither a big fan of horror nor true crime, so I looked askance at it, but decided to give it a try after another esteemed work pal came in bleary-eyed from watching it all night.

I was quite surprised at how much I grew to like the show. By day, our protagonist Dexter Morgan is a blood spatter analyst for the Miami police. By night, he is a cold-blooded serial killer.

Not having an internal compass to speak of, Dexter relies the Code of Harry to guide him, which was instilled into him by his adoptive father, the now-deceased homicide detective Harry Morgan. Harry taught Dexter only to prey upon the most heinous villains in society, thereby moulding Dexter into a ritualistic and gruesome vigilante who knows how to cover his tracks.

The only family Dexter knows is his sister Deborah, who followed in her father’s footsteps and became a cop. She and the rest of Miami are unaware of Dexter’s brand of clandestine justice.

To blend in, Dexter spends a lot of time faking emotions, for he doesn’t feel much on his own. He dates a woman named Rita, who is great for him because she has emotional wounds of her own. I found myself become immersed in the relationship arc between Dexter and Rita, though the other characters are compelling in their own rite.

The series grapples with the moral question of whether Dexter is a good person doing bad things, or a bad person doing good things. Dexter is portrayed as morally ambiguous, and the subplots reinforce this theme. It’s hard to express an opinion without spoilers, but while I want to believe in the good in Dexter’s heart, he does terrible things over the course of the series that give me pause.

Fair warning: Dexter is violent and very much adult in nature, but I did not find it gratuitously so. Season 1 was riveting; Season 2 was less so for me but still well worth watching. I’m eagerly awaiting Season 3 on DVD.

IronRuby script engine in C#

2009 June 29

This post talks about the IronRuby engine we built. Our application has a requirement that certain elements of program logic must be able to be changed without a deployment. The application’s initial architecture involved compiling C# functions on the fly, but it ran into memory pining issues after several hundred function sets had been loaded, which brought the application down every so often. Our team was charged with the task of preventing this situation while maintaining the feature.

We debated two approaches. We chose to use an interpreted script solution over a plug-in architecture because interpreted scripts are ideally suited to oft-changing code. Also, the logic is currently stored in XML files, and Ruby requires less character escaping than C# does when represented in XML. IronRuby won over IronPython because our team had a little experience with Ruby and none with Python.

The heart of the solution is a C# class called the IronRubyScriptEngine. In order to play along, you’ll need to include the following assemblies from the IronRuby 0.5.0 distribution:

using IronRuby;

using IronRuby.Builtins;

using Microsoft.Scripting.Hosting;

Here’s the engine’s constructor:

public IronRubyScriptEngine()

{

    LoadRequiredAssemblies();

    _runtime = Ruby.CreateRuntime();

    _engine = Ruby.GetEngine(_runtime);             

    ResetScope();

}

/// <summary>

/// We need the assembly loaded into memory before CreateRuntime() is called, so we force it here.

/// </summary>

private static void LoadRequiredAssemblies()

{

    ClrString.IsEmpty(“”);

}

/// <summary>

/// Resets the scope, allowing you to run the same script against multiple inputs.

/// </summary>

public void ResetScope()

{

    _scope = _engine.CreateScope();

}

As you can see, creating an IronRuby engine in C# is very easy.

We pass parameters into our engine with a method called SetParameter. More on this in a moment.

public IronRubyScriptEngine SetParameter(string parameterName, object value)

{

    _scope.SetVariable(parameterName, value);

    return this;

}

The real work is done inside the Invoke method, which wraps a snippet of Ruby code in a Proc. It dynamically creates the correct input parameter syntax, interprets the snippet, then invokes the script with the values of the parameters.

private object Invoke(string script)

{

    var variableNames = _scope.GetVariableNames();

    string expression = string.Format(“Proc.new {{ |{0}| {1} }}”, variableNames.ToDelimitedString(“, “), script);

  

    ScriptSource source = _engine.CreateScriptSourceFromString(expression);

    var proc = (Proc) source.Execute();

    Proc lambda = proc.ToLambda();

 

    object[] scopeVariables = variableNames.Select(name => _scope.GetVariable(name)).ToArray();

    return lambda.Call(scopeVariables);

}

Let’s say I have a Person class, and I want to determine if the person is happy. By using SetParameters, I can associate an object with a parameter name, so that if I write a snippet “bob.happy?”, the engine creates “Proc.new {{ |bob| bob.happy? }}” and when called, my Person class instance is passed in.

As most Ruby afficionadoes know, Procs and Lambdas differ in how they handle the return keyword. We chose Lambdas so that return exits the scope like it would in a C# method.

ToDelimitedString is a simple yet handy extension method on IEnumerable.

public static string ToDelimitedString<T>(this IEnumerable<T> sequence, char delimiter)

{

    return DelimitValues(sequence, delimiter.ToString());

}

public static string ToDelimitedString<T>(this IEnumerable<T> sequence, string delimiter)

{

    return DelimitValues(sequence, delimiter);

}

 

private static string DelimitValues<T>(IEnumerable<T> sequence, string delimiter)

{

    string[] values = sequence.Select(x => x.ToString()).ToArray();

    return string.Join(delimiter, values);

}

With this engine in place, it was easy to migrate our existing logic into Ruby functions. The final version of the engine includes script caching, so we don’t interpret the same function over and over.

As the migration proceeded, we decided to refactor some of the logic to re-use code, something that was difficult in the old architecture. In Ruby, it’s easy to extend a class. In IronRuby, you can certainly do that with CLR classes as well. However, the classes we needed to extend exist on the wrong side of a Remoting boundary. Extending an anonymous RemotingProxy of the class proved tough, so we chose to extend the object instead.

module FooExtensions
  def extended?
    true
  end
end

In the snippet, we apply the extension with the following code:

require ‘FooExtensions.rb’
myFoo.extend FooExtensions
myFoo.extended?  # returns true

Between the terseness of Ruby and re-use of code, we have much less code to maintain. Although the Ruby functions are slower than their C# counterparts, they are certainly performant enough for our scenario.

I hope this post has been interesting. Comments are welcome.

Nothin’ But .NET Denver

2009 June 14
by neontapir
JP Boodhoo

JP Boodhoo brought his Nothin’ But .NET class to Denver for the first time. My co-worker had taken the class last year and raved about it. It really improved his game, and we persuaded our company to send five of us to this one.

It’s worth its weight in gold.

JP introduced fundamental programming design concepts, then had us work in small groups to complete challenges, working towards a goal of designing an application top-down with test-driven development. All of us learned that we did not understand some of these basic concepts as well as we should. JP opened my eyes to a whole new level of encapsulating and dividing code; it was like discovering that atoms are made up of smaller particles.

Don’t get me wrong: it’s a ton of work. On Thursday and Friday, we met for breakfast at 8:30 and coded til 4 in the morning — that’s 15-20 hours a day. Especially as fatigue set in, the challenges become so hard that we as a class struggled to complete them. Some days we ate at the same boring fast food restaurants again and again so we could get back to coding. We as a class worked hard together and became friends.

JP is a master programmer. I mean that in the sense of a martial arts master. He is human, after all, but he has honed his skills and become an expert. Things we had to intellectualize just flow from his heart and mind to his hands at an astounding rate.

Yet the course was more than programming; it was philosophy. We spent a lot of time talking about where we’ve been, what made us choose programming, where we stand today, and where we’re headed with our lives. It was food for thought for some, a wake-up call to others of us. I certainly have formed some plans to achieve some goals I’d only fantasized about before.

Namasté, JP, and thank you.