cref Attribute in .NET Doc Comments

I was having trouble finding the correct syntax for the cref attribute of the see tag (and the exception, seealso and other tags) in .NET doc comments. I tried Namespace.TypeName.MethodName and Namespace.TypeName.MethodName(ArgType) to no avail getting the error “XML comment on ‘foo’ has cref attribute ‘Namespace.TypeName.MethodName’ that could not be found.” Eventually I found this in Google’s cache (not on site anymore) that made things clearer:

Use the cref attribute to link to a type or member or the langword attribute to specify a language keyword. The body of the tag is ignored. Cref attributes have the form: a one-letter prefix (N, T, C, M, P, F, E), a colon, and a value. Here are some example crefs:

  • “N:” for Namespaces, example N:System
  • “T:” for Types (classes, structs, interfaces, enumerations), example: T:System.Byte
  • “C:” for Constructors, example: C:Gtk.Button()
  • “M:” for Methods, example: M:System.String.Substring(System.Int32,System.Int32) (the argument list is optional)
  • “P:” for Properties, example: P:System.AppDomain.CurrentDomain
  • “F:” for Fields, example: F:Gtk.TreeIter.Zero
  • “E:” for Events, example: E:Gtk.Button.Clicked

Common langword usages: <see langword=”null”/>, <see langword=”true”/>.

So I just needed to put “M:” on the front of my cref et voila no more compiler warning.

The original page, should it come back online, was at http://www.nullenvoid.com/mono/wiki/index.php/ECMAStyleDocumentation.

Tetris

Everybody knows that Tetris is the greatest computer game of all time. The version I have played so much lately is Tetrablocks which is a very nice version. Sadly the speed of the game is tied to the speed of the machine you play it on which means scores are not really comparable across machines but if you can get more than 350 lines then you’re probably better than me.

The reason I mention Tetris is because there is a documentary about the game showing on BBC4 tonight (2100 in the UK) and replaying through the week.

One of my favourite Tetris things is this 12.8MB MPEG from the 2001 Japanese Tetris Championship (will take at least 8 mins to download from this site, as long as 40 mins over dial up). How fast is that guy?

And finally there’s a great site about Tetris AI.

Ticket Touts

Looking on eBay I can see that my tickets for the Pixies could be sold for up to 100 pounds (nearly 200 US dollars). Some of the buyers have decent feedback ratings so I don’t think it’s a case of people creating dummy accounts to mess up the touts.

That’s ridiculous. I bought four tickets for 115 pounds. I could sell them for nearly 400 pounds and I’d have done about 15 minutes work (including entering on eBay and posting the tickets) maybe 30 minutes if I include a walk to the post office to send the tickets recorded delivery. If I had 10 credit cards I could conceivably have bought 40 tickets. Then my profit would be 4000 pounds for not much more work, certainly less than an hour. If I did that for Reading Festival, Glastonbury Festival and any other events where tickets are guaranteed to sell out then I could give up my job and just work for about an hour or two every few weeks!

That leads me to two questions really. 1) What is going to be done about this? Neither organisers nor fans want it like this. And 2) Why don’t ticket sellers make their tickets more expensive if people are willing to pay that much? It’s surely not altruism – companies like Mean Fiddler or Ticketmaster don’t know what that means.

Pixies Play the UK

Not only have the Pixies reformed but they are touring and have dates in the UK. The tickets for two nights at Brixton Academy sold out in minutes but not before I got 4 tickets for the Wednesday.

When the rumours first started floating around I came up with this ideal setlist that I’d still LOVE to see. To be honest though they could play their B-sides and Isla de Enchanta four times and I’d still be ecstatic.

Ideal Pixies reunion tour set list (I’ve given Kim quite a lot to do here to keep her happy) 1 hr plus encores:

  • Debaser (right out of the starting blocks)
  • Head On (ratchet it up another notch)
  • The Sad Punk (and evolving from the sea wouldn’t be too much time for me to walk beside you in the sun)
  • Nimrod’s Son (eclectic crowd pleaser)
  • I Bleed (break it down)
  • Here Comes Your Man (everyone’s happy middle section)
  • Gigantic (everyone’s happy middle section)
  • Velouria (getting somwhat more excited)
  • Tame (hips like cinderella)
  • Hang Wire (every morning and every day – I’ll bossanova wit’cha)
  • Tony’s Theme (stomping crowd pleasing build up to the finale)
  • Oh My Golly (stomping crowd pleasing build up to the finale)
  • U-Mass (stomping crowd pleasing build up to the finale)
  • Down to the Well (medley of greatness finale)
  • Is She Weird? (medley of greatness finale)
  • Gouge Away (medley of greatness finale)

Encore:

  • I’ve Been Tired

Second encore (unplanned, because it was just too wonderful):

  • The Happening (if they could pull this off I could die happy – “I’m almost there to Vegas where they’re putting on a show they’ve come so far I’ve lived this long at least I must just go and say hello”).

Final Score: Surfer Rosa/Come On Pilgrim 4; Doolittle 5; Bosanova: 5 (who would’ve thunk it); Trompe le Monde: 3

Notably missing (mostly because they’re too quiet):

  • Dig For Fire
  • Where Is My Mind
  • Caribou
  • Levitate Me
  • Cactus
  • River Euphrates
  • Brick is Red
  • Hey!
  • Letter to Memphis
  • Subbacultcha

Thankfully missing to the chagrin of most of those attending:

  • Monkey Gone To Heaven
  • Wave of Mutilation

The Mobile Web

As detailed elsewhere I have found my Nokia 7250i’s XHTML browser to be singularly crap because of memory limitations. As part of my attempts to make this phone more useful I have written a web page shrinker that allows you to enter a URL and get a stripped-down version of that page’s contents.

As the dominate web use mode is to search first on google the program also has the ability to shrink google searches.

Both entry points support link rewriting so any link in the pages is rewritten to point back at a shrunken version of the page being linked to (basically you never visit anything apart from my servlet – it goes and grabs pages and shrinks them as required).

The shrinking and rewriting are fairly brittle. There is a lot of nonconformant and just plain weird HTML out there and I have not done much work on coping with boundary cases but enough pages should shrink to make the app useful. If you find a page that doesn’t work or have any other kind of bug report/feature request put in in the comments or feel free to mail me at bakert+mobileweb@gmail.com.

The URLs for your phone are (stick them in bookmarks):

URL entry: http://bluebones.net/miniweb/?cmd=url

Google search: http://bluebones.net/miniweb/

The Google search uses the brilliant Google Search API.

CSS, Content-Type For RSS

I have updated my RSS feed to use the W3C’s CSS file for RSS (which you can see in action at W3C News Syndication).

I have also fixed a minor problem I was having. Internet Explorer would not display my RSS feed. It was because I had not set a MIME type. A quick bit of Response.ContentType = "text/xml" later an voila a browser-readable RSS feed. I wanted to use application/rss+xml as previously recommended at Dive Into Mark (now using Atom) and seen until recently in my <link> tag but this causes browsers to pop up a download box rather than render the XML. Because of this I have also updated my link tag that refers to my RSS feed to <link rel="alternate" type="text/xml" title="RSS" href="http://bluebones.net/rss.asp" />.

You can view the ASP source to my feed.

Network Client Assigned 169.154 Address

Just spent half an hour fixing this one. My laptop was assigned a 169.154.*.* address and I could not ping even my gateway server via IP. I checked the network cable and lights on the hub and the docking station, changed the cable and used the built-in network card on the laptop itself. I tried a whois on the strange IP I was getting assigned:

NetRange:   169.254.0.0 - 169.254.255.255 
CIDR:       169.254.0.0/16 
NetName:    LINKLOCAL
NetHandle:  NET-169-254-0-0-1
Parent:     NET-169-0-0-0-0
NetType:    IANA Special Use
NameServer: BLACKHOLE-1.IANA.ORG
NameServer: BLACKHOLE-2.IANA.ORG
Comment:    Please see RFC 3330 for additional information.
RegDate:    1998-01-27
Updated:    2002-10-14

RFC 3330 has the following to say:

169.254.0.0/16 - This is the "link local" block.  It is allocated for
   communication between hosts on a single link.  Hosts obtain these
   addresses by auto-configuration, such as when a DHCP server may not
   be found.

After trying various registry fixes I realised the awful truth: my DHCP server’s network cabled was unplugged!

Streetmap for Mobiles

I have been disappointed with the capabilities of my Nokia 7250i’s XHTML browser. Although it can theoretically load almost any web page in practice virtually all web pages are too big for its miniscule memory and result in an error.

One site that I wish I had remote access to is streetmap (specifically the London street search). But even trying to load one GIF (no HTML) from the resultant map gives the error, “Not enough memory”.

Rather than be defeated, however, I have written a Java servlet that does searches on streetmap, screen scrapes the central GIF (the one with the road you searched for on), resizes it (actually I make it slightly bigger) and reencodes it as a JPEG. For some reason the phone seems better able to cope with JPEGs than GIFs at the size we are talking about (15-20KB). You can access the service via a browser (phone or computer based but not WAP) at http://bluebones.net:8080/map/. (Sadly I am having to run Tomcat on port 8080 at the moment so this won’t work behind some firewalls – if anyone knows how I can run IIS and Tomcat on port 80 simultaneously please drop me a line (address below).) You need to Zoom the image once you receive for street names to be legible.

I really need to drop the colour depth on the image when resizing to reduce its weight (streetmap images come at 256 colours but look fine at 16) and thus the cost of using this (plus increase the loading speed). I also need to add in links for North, South, East and West because the map is much less useful if your road happens to be near the edge (with the streetmap website you get the eight surrounding squares as well as the one with your road in it). Of course by the time you read this I might have made these changes.

If you use this service and have any comments/requests please send them to bakert+streetmap@gmail.com.

The Mercy Seat

The Mercy Seat with John Hannah and Sinead Cusack is playing at the Almeida Theatre until December 6 2003. Tickets are almost entirely sold out but due to popular demand a new matinee show (3:30pm) Wed 3 December 2003 has been added for which tickets are available at the time of writing (29 November 2003).

This review contains mild spoilers.

Set on the 12th September 2001 in New York, the Mercy Seat is about a couple having an affair. Ben (Hannah) was supposed to be in the World Trade Center on the morning of the 11th but instead visited Abby (Cusack), his mistress (and also his boss). Ben decides this is the ideal opportunity to leave his wife and kids – by pretending he has died along with the others – and run off with Abby. The play then centres around his plan and the fact that Abby wants him instead to ring his wife and tell her he is alive and then leave her.

It is impossible to believe that Ben really would rather his two daughters thought him dead and he was never able to see them again as well as have to construct an illegal false identity. The play goes some way towards making us believe he really thinks this (at least for today) but the premise is sadly slightly absurd. More believable is Abby’s wish that Ben would leave his wife in more conventional fashion. Plausability aside this tension in desires gives the play most of its interesting moments. Something is being said about female desire for honesty whatever the consequences and the male desire to avoid those same consequences even if that means being duplicitous.

The Mercy Seat is not a brilliant play nor a brilliant production. Hannah feels slightly miscast (perhaps someone whose casting is a bit younger, more misanthropic?) Cusack’s performance is strong though. Real truths emerge from the play in bursts. The writer Neil LaBute is right when he says the play is about, “why [we are] willing to run a hundred miles around simply saying to someone, ‘I don’t love you anymore’? Why? Because Nikes are cheap, running is easy, and honesty is the hardest, coldest currency on the planet.” But bursts is all there is. The twist at the end is strong but not enough to elevate the play to the level of a must-see.