Author Archives: Andrew

A Matter of Loaf And Death

“A Matter of Life And Death” (2008) movie poster Ah, yes, Wallace & Grommit, possibly the best dog-and-human comedy act since… ever.

This new one (a cereal killer is slicing up bakers just when Wallace & Grommit open their bakery, Top Bun), is well done. Not quite as flawless as The Wrong Trousers or The Curse of The Ware-Rabbit, but very funny.

It’s a little rushed is the only thing. While The Wrong Trousers managed to fit an entire B-Movie into half an hour, perfectly executed, and The Curse of The Ware-Rabbit successfully filled a feature-length 90 minutes (well, 85), without feeling flabby, this one feels slightly rushed, and a little unfinished.

What would be lovely would be if Aardman extended it into a full-length feature. It doesn’t need too much more story, but with more time they could build up a bit more tension, flesh out Wallace’s infatuation with Piella, reveal her villainy more gradually, and give us a proper coda at the end.

God, I’m a moany git. It is still, a lovely, lovely film and you should watch it, forthwith.

Removing nulls from Scala, some thoughts

I’ve written one or two small pieces of software in the new upstart programming language Scala, and I love it. It takes all of what is good and right about Java and C#, removes a lot of the cruft, and introduces powerful new bits from modern functional languages. It’s a pleasure to write in.

Unfortunately there is one of the bits of cruft from C#/Java which is still there: the concept of ‘null’—a value which can legally be assigned to any reference type, but which causes an exception if you try to dereference it. It’s an ugly carbuncle on the type system, but, for compatability reasons, it’s never yet been removed.

Here I present one way of ridding the Scala world of nulls—whilst remaining compatible and efficient. I wish for World Peace and for this to be implemented in Scala 3…

[If you don’t care about programming, type systems and language implementation, I heartily suggest you skip this article. I’ll review a film soon. Promise.]

Continue reading

Dr Who turns Universe into Cheese

I just watched The Stolen Earth (first episode of the two-parter Doctor Who season 4 finalé).

Fuck.

What a stinking cheese platter of overripe dramatic stilton.

Personally I lay full blame at the feet of series godfather and cheesemonger in residence, Russell T. Davies. Gaping plot-holes, magical mobile phones which work across the Universe, a key plot-point straight out of Lawnmower Man, pretentious, overblown orchestration, and seemingly an attempt to jam every single character and monster from the last 4 seasons, into a bloated 45 minutes of Whovian fanboy masturbation.

I liked one bit: the bit near the end, when Rose and The Doctor see each other for the first time in ages. That was lovely. However almost immediately afterwards the spell was broken, when they ran toward each other in a comically overextended ‘lovers’ cinematic run’ sequence which seemed to go on for about 5 minutes, (before a clichéd fucking Dalek clichédly shoots The Doctor, then a just-in-the-nick-of-clichéd-time Captain Clichéd Jack appears and clichédly shoots the Dalek).

And the Daleks… Basically they keep coming back from the dead in increasingly creative ways, just in time to threaten the Earth at the end of each season of Doctor Who. They’ve turned from a sinister surprise into an expected, end of season Very Special Guest Star.

Subspace WavesUgh. There’s only one way to save the Universe: quick, everybody dial The Doctor’s mobile phone number (07700 900461*—you may want to take a note of it in case your planet is ever in danger), thus boosting the subspace frequencies, routing it through every telephone exchange in the UK (which has the effect of, erm, not completely clogging the network, apparently), and causing big RKO-style circles to propagate out through space, thus alerting The Doctor that The Earth has been ‘hidden’ 1 second back in time. (Oddly, given that the TARDIS routinely pops back and forth in time by millennia, going back in time by 1 second causes the camera to shake and things to go on fire in a very dramatic manner.)

I can understand that Russell T. wanted to go out with a bang (he’s retiring as head writer), but he really should have smoked less crack while knocking off this piece of trite, disjointed, nonsensical, overblown, masturbatory, illogical, incoherent bollocks.

* Actually, I just tried phoning it. “This number is not recognised.” Thanks Doctor. (He must have changed his provider and not bothered moving his number over. Bloody disorganised Timelord.)

MonoRail peeves III—Actions

Part III in a series of… some.

Part I covers static type checking in views and Why This Would Be Good.
Part II is about making the view architecture more naturally composable.
Part III, this article, is more narrowly concerned with return types from actions.

RenderView, Redirect and Friends

In MonoRail, ‘actions’ are the units of code which respond to an incoming page request, perform some work, then cause a view to be rendered or send a ‘redirect’—or potentially an error code—back to the client.

Actions are represented by methods on controller classes and are defined as returning ‘void’. Actions invoke a view or a redirect by calling other methods on the controller, RenderView, RedirectToAction, RedirectToUrl… and others. By default (if none of these is called) the framework will act as if the view has called RenderView(name-of-action). The parameters to the view must be placed in a global variable called PropertyBag.

This all to me seems quite unnatural.
Continue reading