« October 2004 | Main | December 2004 »
November 25, 2004
Scoble and Randy Holloway on marketing
Scoble agrees that Channel 9 is marketing. Randy Holloway asks, apropos of http://blogs.msdn.com, "What isn't marketing?"
These guys get it. Marketing isn't a separate function to be carried out by droids, bullshitters and ponytailed fashionistas. It's something that everybody does, all the time. It's everything from the paper you print your invoices on to the presence of your techies in newsgroups to the way you negotiate terms and conditions.
My old boss told me, "Marketing is your entire company, seen from your customers' point of view." Haven't found a better definition yet.
November 25, 2004 | Permalink | Comments (0) | TrackBack
November 18, 2004
Property helpstrings in .NET/COM interop
If you're exposing a .NET class to COM and want to provide helpstrings, you use the DescriptionAttribute.
This works fine for methods, but appears to be ignored on properties.
The trick is to apply the DescriptionAttribute to the get/set declarations, not the property itself:
public interface IPenguin { int Airspeed { [Description("Gets the airspeed")] get; [Description("Sets the airspeed")] set; } }
November 18, 2004 in Software | Permalink | Comments (0) | TrackBack
November 11, 2004
XML shaping in .NET
Finally lost patience with the MSDN documentation on XML shaping attributes. Lots of description of how to construct the attributes and apply them and inject them and so on, but not a single illustration of what they actually do to the XML! I found I kept writing little test harnesses to check whether, for a given XML format, I needed XmlArrayAttribute or XmlElementAttribute or XmlTattooItOnYourDogAttribute or... anyway, I'm now doing what I should have done from the start, capture the effects systematically and put the document somewhere I can find it again.
The Sample Type Definition
public class Widget
{
private Grommit[] _grommits;
public Grommit[] Grommits
{
get { return _grommits; }
set { _grommits = value; }
}
}
public class Grommit
{
private string _thread;
public string Thread
{
get { return _thread; }
set { _thread = value; }
}
}
Default Serialisation
Default behaviour:
- The array maps to an element with the same name as the property (Grommits)
- The members of the array map to child elements of this, with the name of the type (Grommit)
<Widget1>
<Grommits>
<Grommit>
<Thread>Left</Thread>
</Grommit>
<Grommit>
<Thread>Right</Thread>
</Grommit>
</Grommits>
</Widget1>
Customising the Name of the Array Container Element: XmlArrayAttribute
If you apply XmlArrayAttribute to the Grommits property:
- The array maps to an element with the name specified in the attribute
- The members of the array map to child elements of this, with the name of the type (Grommit)
<Widget2>
<GrommitList> <----------------------- This element name has changed
<Grommit>
<Thread>Left</Thread>
</Grommit>
<Grommit>
<Thread>Right</Thread>
</Grommit>
</GrommitList>
</Widget2>
Customising the Name of the Contained Elements: XmlArrayItemAttribute
If you apply XmlArrayItemAttribute to the Grommits property:
- The array maps to an element with the same name as the property (Grommits)
- The members of the array map to child elements of this, with the name specified in the attribute
<Widget5>
<Grommits>
<JustOneGrommit> <-------------------- This element name has changed
<Thread>Left</Thread>
</JustOneGrommit>
<JustOneGrommit>
<Thread>Right</Thread>
</JustOneGrommit>
</Grommits>
</Widget5>
Elements Without a Container: XmlElementAttribute
If you apply the XmlElementAttribute to the Grommits property:
- There is no container element -- no XML tag corresponding to the Grommits property
- The members of the array map to child elements of the root, with the name specified in the attribute
<Widget3>
<JustOneGrommit> <--- No grouping element around grommits, direct child of Widget3
<Thread>Left</Thread>
</JustOneGrommit>
<JustOneGrommit>
<Thread>Right</Thread>
</JustOneGrommit>
</Widget3>
Obviously these can be combined where appropriate.
November 11, 2004 in Software | Permalink | Comments (0) | TrackBack
Ashcroft: mission accomplished
John Ashcroft resigns claiming that "the objective of securing the safety of Americans from crime and terror had been achieved.".
Job done? Funny, that's not what the White House was saying during the election campaign. Can we therefore assume that no further invasive, oppressive measures will need to be introduced in the name of security, and that Ashcroft will fearlessly speak out if they are?
November 11, 2004 in Current Affairs | Permalink | Comments (0) | TrackBack
November 06, 2004
Democratic exodus?
canada.com:: "Canada's immigration website is being flooded with a record-smashing number of visits from U.S. Democrats dismayed by the prospect of four more years living under President George W. Bush... within hours of Bush's acceptance speech... 115,016 [visitors] were from the United States. Many were doing more than just casual surfing, a spokeswoman for Citizenship and Immigration suggested Thursday."
Brilliantly, one Republican is quoted as suggesting that anyone who does move will end up paying more for worse health care. Uh, earth to GOP...
November 6, 2004 in Current Affairs | Permalink | Comments (0) | TrackBack
November 05, 2004
Thieves at work in the "marketplace of ideas"
Kos: "Laura makes $6/hour. She drives a dying Ford Escort. Her latest crisis is her insurance expired on Oct. 9 (her ex-partner cancelled policy). She needs to come up with $211 to get insurance for one month or face a $1,000 fine if she gets caught driving with no insurance. We have public transportation between 7 am and 6 pm. She has to be at work at 6am. She has been walking to work lately but it is about 2 miles, she is 5 months pregnant, it is dark at 5 am, and winter is coming. Solution? Go begging at the churches who have money for these things if she attends bible school until 9 pm. This week she moves into low income subsidized housing. Her newest crisis is she has found out when [her employer] is closed for the Christmas holiday (one month) she has no employment. She is hoping to find temporary employment as a seasonal retail worker to tide her over. She doesn't know what she will do when the baby is born, hopes she can work up till the last week (she is on her feet all day with this job). She will be eligible for subsidized daycare.
"She voted for Bush because of his 'family values.'"
The neo-conservative perversion of language defies belief. How did "freedom" come to mean "free rein for corporate robber barons"? How did "family values" come to mean "putting mothers and children at the mercy of abusive fathers"? How did "individuals" come to mean "fundamentalist Americans" while "liberal elite" came to mean "non-fundamentalist Americans"?
How did the "marketplace of ideas," a laudable concept in an open and engaged democracy, come to mean "a thieves' kitchen where you'll get rolled, ripped off and made to accept that you want it to happen again."
How can the centrists claim the language back?
November 5, 2004 in Current Affairs | Permalink | Comments (0) | TrackBack
China Mieville, Perdido Street Station
"For once," squeaks a breathless Jon Courtenay Grimwood on the cover, "comparisons to Gormenghast are justified." Well, true, in the technical sense that "nothing like" is a comparison, but surely such an evasion is not what the moral arbiters of the Guardian intended. Nor, despite what you may hear, is it much like Viriconium, though there are constant reminders (the phrase "a storm of wings"; the lassitude of the dream-sickness, so like the plague of In Viriconium; and in the sequel, The Scar, even a restaurant called the Unrealised Time).
No, the touchstone we are looking for is very definitely Mary Gentle's Rats and Gargoyles.
This is not a complaint: I loved Rats and Gargoyles, and I loved Perdido Street Station. They are hugely entertaining and imaginative adventure stories, deeply bound up with fascinating and intellectually engaging city settings and themes. Neither book is a revolution, a rediscovery of the fantasy genre, but they're still rewarding and fun.
Perdido Street Station is about a vast, timeless city, the bloated, sluggish metropolis of New Crobuzon. You recognise the genre already, of course: you can already hear resonant one-line paragraphs like "Mieville vomited architectural nightmares into the fatty adjectival froth." You are already ready for the my-grotesque-is-more-grotesque-than-your-grotesque grotesques, the my-building-is-bigger-and-weirder-than-your-building architecture, the my-cosmic-force-is-more-arbitrary-and-incomprehensible-than-your-cosmic-force supernaturals. You are ready for the eccentrically plausible pseudo-science, check, the familiar-and-yet-not-familiar profanities, check, the strangely archaic technologies that are yet strangely futuristic, checkedy-check, checkedy-check. Here they all are, present and correct.
And for the most part they are doing magnificent service. New Crobuzon is beautifully realised, with copious incidental detail making it much more than a mere backdrop. The cliques of artists, thaumaturges and revolutionaries are brought fully to life. The aliens are adequately alien, and the mad science is moderately scientific and gloriously mad. Minor plot hiccups aside -- and let's face it, we are not here for the plot, whose schtick of "How do you beat up something you can only look at in a mirror" is little more than a flimsy excuse given the novel's 850+ pages -- the delivery is faultless.
And yet, and yet... the problem is that Perdido Street Station feels like an exemplary genre novel in a genre which has not yet been defined. It is a wonderfully professional execution of a story without surprises or challenges. It is a wonderful page-turner, but never transcends that. It is hugely imaginative, but in oh-so-predictable patterns. The whole feels less than the sum of the parts.
Is it worth reading? Yes. The pages fly by, packed to the brim with ideas and images. Is it the literary triumph fans and critics have touted it as being? No. Clearly that is Mieville's ambition, but this is still a journeyman work. A superb journeyman work, to be sure; but different in its very nature from a masterpiece.
November 5, 2004 in Books | Permalink | Comments (0) | TrackBack
November 04, 2004
Canada 2.0
Mena Trott: "I'm staying put. The borders? Well, that's another story."
November 4, 2004 in Current Affairs | Permalink | Comments (0) | TrackBack
Two nations under God
BBC News has a fascinating graph suggesting that the political divide in America is fundamentally a religious divide. Suddenly the Daily Kos poster who described the Bush regime as an "authoritarian theocracy" seems a lot less melodramatic.
November 4, 2004 in Current Affairs | Permalink | Comments (0) | TrackBack
Under Bush's thumb
I am so glad I'm getting out of the 51st state.
November 4, 2004 in Current Affairs, UK-NZ Migration | Permalink | Comments (0) | TrackBack