After stumbling across no-www.org, I have added no-www Class B support to markallanson.net.
What does this mean? Well its really quite simple, any request that comes in to markallanson.net with the www prefix will politely be redirected to its no-www equivilant. For Example, "http://www.markallanson.net/" will be automatically redirected to "http://markallanson.net". This is done via modifications to the apache .htaccess.
Head on over to no-www for more information...
PS: I will have a bit of work ahead of my to change all my hyperlinks to remove the www., however I will get around to this in due course. (Note however, that the apache redirection works for the hyperlinks too)
I hereby refer myself to My COM Interop Golden Rule #1 and formally slap myself on the wrist.
Seeings as others seem to be doing this at the moment, its an interesting statistic to track I guess. Here is my browser usage chart since May. This chart covers 2 domains, those being *.ftowa.com and *.markallanson.net. Given that FtoWA.com is a completely non-tech site, this gives a reasonable cross-section of society.
Im not sure if you can glean anything from these charts other than IE is still completely owning the market, despite the fact that Mozilla is slowly edging up. The "Unknown" section on this chart is sources that AWStats can't classify, and all the RSS news aggregators generally get lumped in here. "Others" are those that I couldn't be bothered breaking down into individual sources as they would basically be a straight line at almost zero, this list includes (but is not limited to) Netscape, most Mobile Phone browsers, LibWWW (general purpose http library), Safari, Gaelon, Konqueror, Lynx, etc...
I think out of everyone, Opera seems to be taking the biggest hammering, poor little guy, up and down like a rollercoaster. Without further ago I present my graph.
PS. I tried to do some neat sparklines for this post, but excel sucks to much at creating nice resolution charts. In fact, I even tried generating a nice big graph, then sampling down to a very small one in a photo program, but I don't think I actually have enough samples to generate a nice sparkline. Maybe if I had daily, or even weekly samples since May I might have enough data for some sparklines.
So, after drunkenly fumbling through my wallet for 2 pounds late on Thursday night to take the tube from Liverpool street station to Tower Hill, It struck me that here in London we did manage to draw the (extremely) short straw with relation to travel charges. Hence here I am on Saturday night investigating transport costs on various public transportation systems worldwide (Give me a break, I have a cold and feel really shit so im not going to be doing anything else).
Anyway, I'm sure the table below will not be a surprise to any of us who travels around London on a regular basis, and it definately won't be a surprise to any tourists who have found their wallets and purses severely lightened by travelling on the underground.
The table below shows the various systems from a sample worldwide, the ticket type (I tried to include similar types of travel on rail based systems), the fare cost in local currency, the fare cost normalised down to the US Dollar (using XE.COM for currency conversion), and the percentage fare compared to the fare cost in London (with London being 100%).
The results speak for themselves. (And how I wish I lived in Russia)
| City | Type of Fare | Fare (Local) | Fare (N) | % LDN |
|---|---|---|---|---|
| London | 1 Zone | £2.00 |
$3.85 |
100% |
| Chicago | 1 Ride (No Distance Limit) | US$1.75 |
$1.75 |
45% |
| New York | 1 Ride (No Distance Limit) | US$2.00 |
$2.00 |
52% |
| Los Angeles | 1 Ride (No Distance Limit) | US$1.25 |
$1.25 |
32% |
| Sydney | Single Trip | AU$2.20 |
$1.65 |
43% |
| Perth | 1 Zone (3 hours re-travel within zone) | AU$2.00 |
$1.50 |
39% |
| Tokyo | 1-6km Regular | ¥160 |
$1.52 |
39% |
| Moscow | 1 Trip (No Time Limit) | 7 Rubles |
$0.25 |
6% |
| Berlin | Single Ticket Journey (Zone A-B) | €2.00 |
$2.64 |
69% |
Serialization is a great thing, except when you can't get it to do what you want it to do. Case in point: I was serializing a small class that was going to be farmed off to a logger, which took the data and stored it in a logging database sitting on SQL Server. If you have ever done any serialization before, you will know that when you use the System.Xml.XmlSerialization.XmlSerializer to serialize a class you get a number of artifacts in the resultant xml, something along the lines of that below: (note I was serializing a class called ContextItem)
The artifacts are the xml processing instruction as the root node of the serialized class, and the declaration of the xsd and xsi namespaces within the ContextItem node.
In the case above, serialization was done using an System.Xml.XmlTextWriter combined with the XmlSerializer, and the artifacts are due to a combination of the two working together. The Xml processing instruction is placed in the resultant output by the XmlTextReader, and the xsd and xsi namespace delcarations are placed in the resultant output by the serializer.
Removing the xml processing instruction
Seeings as the XmlTextReader is responsible for writing the xml processing instruction at the top of the above document the trick here is to fool it into not writing the xml processing instruction. This is done by lines 6 and 7 in the above code snippet. Setting the formatting just tells the XmlTextWriter not to apply any type of formatting to the output document (the serialized output will be one long string). Line 7 however, puts the XmlTextWriter current node into mixed mode (the node can contain both text and child xml nodes), therefore causing the xml processing instruction not to be output.
Removing the xsd and xsi namespace declarations
I am not sure if the method I have used to remove the xsd and xsi declaraions is actually embedded in the implementation of the XmlSerializerNamespaces class or if it is an unintended side effect of the implementation. Maybe Dare could clear this up?
An overloaded method of the XmlSerializer.Serialize() function takes a third argument, specifically an XmlSerializerNamespaces object which is normally used as a container for a collection of namespaces and prefixes to use in the serialization of the object. To remove the xsi and xsd namespace declarations you need to create an empty XmlSerializerNamespaces class and add a single entry, specifying an empty namespace prefix and namespace uri as shown in lines 110-111 in the above sample.
Output after these two operations cleans up the xml nicely, ready for logging into a SQL server thousands of times if required. Final output is shown below.
This has got to be the strangest receuitment email I have received in recent times. I wonder if he honestly expects his statement in the first paragraph will prompt people to consider the offer more legitimate.
"Please excuse the impersonal and frankly spam nature of this email but wanted to tell you about a permanent role I'm presently recruiting for (to develop music software), salary c.£35k. Read on if interested....
My client requires several VC++ software developers to join their London-based team working on music software projects. To apply, you must have good experience of C++ development on Windows, expecially including component development COM/ActiveX. This must combine with excellent problem-solving skills and an ability to work well in a team to a tight delivery schedule. Must have a demonstrable external interest in music. Other relevant skills include computer music or audio experience, and advanced musical knowledge.
Based in London
Permanent.
Please send an uptodate cv if you are interested.
Regards
xxx xxxxxx"