I’m not sure what made me think of this story, but it made me snicker to myself so I thought I’d tell it.

Back in October of last year, Jenn and I went to Disneyland. One of the days we were there, we were wandering around in California Adventure checking out the Pixar attractions and we found a really neat cut-out of Wall-E that you could take your picture with. As we headed over to see it, one of the myriad photographers in the park approached.

“Would you like to get your picture with-“

“Wall-E?” I interrupted.

“-Frollo?” the photographer finished, and motioned to a character standing a few feet away.

I had to think fast on this one. To be honest, I didn’t know who Frollo was, but since the actor was standing not too far off, I kind of felt bad. I mean, regardless of who Frollo is, it didn’t look like he was as popular as a Jack Sparrow, for example. And how totally offensive would it be that the tourists would rather have their picture taken with a plywood cut-out than with you, the actual costumed character, live in the park?

“AND Frollo, of course,” I replied.

We headed over to the Wall-E cut-out, got our pictures there, and then over to Frollo, and got some additional photos. As we walked away, I had to ask Jenn, since we hadn’t consulted on this. “Who the fuck is Frollo?”

“I have absolutely no clue,” she said. We peeked behind us to get a second look at the character. Nope, no idea whatsoever. Didn’t even look remotely familiar.

It was only later in the day when we finally looked him up online. Apparently Frollo is the bad guy from The Hunchback of Notre Dame. Can’t say I’ve seen that one, even to this day.

It makes me wonder if that’s sort of punishment or something for the character actors there. “Piss us off, and we’ll suit you up as a partly-known character from one of the less popular films! That’ll show you!” Or are there actually people who hit the park and look for Frollo?

I might actually make it a game for next time we go to Disneyland - “Find Frollo.”

More interesting is the relative scarcity of Alice (from Wonderland). She’s my favorite, and I searched the park high and low for her, only to find her and the Mad Hatter making an exit for the break area. Frollo, more accessible than Alice? WTF?

net comments edit

Typemock Isolator 5.3.1 was released today, and with it the ability to mock base class constructors using a syntax like this:

Isolate.Fake.Instance<Derived>(Members.CallOriginal, ConstructorWillBe.Called, BaseConstructorWillBe.Ignored);

That’s pretty cool. But something I uncovered in working through a complex test scenario (and getting a little help from good old Typemock Support) is that you can mock a constructor N-levels deep using a slightly different syntax. The caveat is that it only works on types that have generic type parameters.

Let’s say you have a three-level-deep class hierarchy like this:

public class Level1<T>
  public Level1()
    throw new NotSupportedException();

public class Level2<T> : Level1<T>
  public bool Level2WasCalled { get; set; }
  public Level2()
    this.Level2WasCalled = true;

public class Level3<T> : Level2<T>
  public bool Level3WasCalled { get; set; }
  public Level3()
    this.Level3WasCalled = true;

You want to instantiate a Level3<T> object, and you want to run the Level2<T> constructor, but the Level1<T> constructor throws an exception so you want to stop running the real constructors there. It’s a little more complex setup, but you can do this:

public void SkipLevel1Constructor()
  var fakeBase = Isolate.Fake.Instance<Level1<string>>();
  var fake = Isolate.Fake.Instance<Level3<string>>(Members.CallOriginal);

This test will pass. Now, granted, if you’re doing something more fancy, the Isolate.Swap.AllInstances call may have some unintended side effects since it’ll also intercept new instances of Level2<T> and so forth, but if you’re doing something reasonably simple where the Isolate.Swap.AllInstances is OK, here’s one way to skip an n-level deep constructor.

UPDATE: It appears you can use Isolate.Swap.NextInstance instead of Isolate.Swap.AllInstances, and that’s actually recommended so you have fewer potential side effects. No need to mock all instances if you don’t have to.

All of this, of course, gets the “Works On My Box” seal of approval, and the standard “if it totally hoses you or doesn’t work for you, sooooooorrrryyyyy” style disclaimer. Also, while I found this during sorting an issue out with Typemock Support, I can’t say they “officially support” doing what I’m telling you about here. It just happens to work. Whether it’s functioning as designed or whether we’re inadvertently exploiting something in the product that will be patched up later is yet to be seen.

I have a copy of the [older version of] Electronic Battleship: Advanced Mission game. We played it a bit, but we got really frustrated because the holes in the vertical grid were too big for the pegs to fit in well - a minor bump and the pegs would fall out, causing you to basically start the game over.

We shelved it for a while, but I found that Hasbro has replacement parts order forms, so I ordered a new set of pegs (in case it was actually the pegs that were too small) and a new set of grids (in case the grid holes were too big). I figured, like $7 total to fix the thing would be worth it since it was a $40 game anyway.

I got the parts and the pegs didn’t fit into the grid holes any better, so I figured it was definitely the grids. I looked at the replacement grids they sent… and the grids were too small. The regular Electronic Battleship grids apparently are 10 by 10 while Advanced Mission grids are 14 by 14.

I contacted their support department explaining the problem in detail and asking if they could send me some new Advanced Mission grids. They did me one better: They sent me a whole new game.

That, my friends, is customer service. Hasbro, you rock. Thanks a million!

Jenn and I played last night and it was a fantastic game. Came down to the very last turn - if I missed shooting down Jenn’s last ship, she was going to shoot my last ship down. I made the right guess and got her, but just by that one turn. Great game.