I describe a technique in the C# language, and very small supporting library (hence ‘micro-framework’), for implementing business-logic–level tests which may be either short-cut evaluated (when you require a boolean yes/no), or fully evaluated (when you requite a list of ‘reasons why not’).
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.
Ugh. 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
D&D creator runs out of hit points, expires
Gary Gygax, inventor of the role playing game, yesterday failed to recover from an Abdominal Aneurysm spell cast by higher-level mage. Finished off by giant spiders:
http://www.signonsandiego.com/uniontrib/20080322/news_1m22gygax.html
He is survived by a wife, six children, and 8 million teenagers with funny-shaped dice.
Monorail peeves II
Part II in a series of… several.
In Part I I whined on about static type checking in views. Here I moan about composability of page elements.