Author Archives: Andrew

Strongly typed routing for Microsoft MVC4

(Right that title should have put off my casual audience who might have come here expecting a film review or a rant about religion.)

TR;DR: This post describes a new wee .NET library, to add static typing of URL routes in Microsoft MVC4. You can get it on github.

Basically it lets you:

  • Define URL routes as strongly-typed, first-class-objects
  • Bind routes to controller actions, fully statically-checked (so the compiler catches parameter mismatches/misspellings)
  • Generate links in your Razor code (a) succinctly and (b) fully statically type-checked.

Oh, and:

  • It all works at compile time—you don’t need to run a program to generate code or anything like that.

Continue reading

All for Naught

Language: it’s a funny old thing, really.

I looked up a line from the play what I was in (A Midsummer Night’s Dream by Mr William Shakespeare), “…A paramour is a thing of naught.”

I didn’t understand it, then found out that ‘thing of naught’ means (well, USED to mean), ‘thing of sin’.

And hence the word ‘naughty’.

(Doesn’t help that some online translations render the line as ‘a thing of nothing’.)

The line, just to confuse you further, is uttered by a character who is himself making a mistake, while trying to correct someone else’s English (ah, Facebook, you’re not so new after all!)

The exchange goes something like this:

Peter Quince:
“He [the character Bottom] is a very paramour for a sweet voice.”
[intending to mean ‘he is the perfect specimen of someone with a lovely voice.’]
Francis Flute:
“You must say ‘paragon.’ A paramour is—God bless us!—A thing of naught.”
[meaning, ‘you mean “paragon” not “paramour”, because “paramour” means something dirty.’]

A paramour is a very courtly and romantic word for a lover, so it’s far from naughty.

But he uses ‘paragon’ correctly.

And people say that Shakespearean comedy is difficult to get.

Comments

I’ve been pretty remiss about checking my comment queue for the last year, so quite a few comments were sitting waiting there unapproved. Fixed now. I probably should make this thing email me when people post comments. Probably.