Arnt Gulbrandsen
About meAbout this blog
2012-07-26

An aside on Json.net and the Xbox 360

Json.net is a fine library. High DWIM factor. So I was happy when Microsoft suggested that I use Json.net instead of the class Microsoft had previously suggested as the best-supported, JavascriptSerializer.

Starting with the July 2012 release, the Xbox ADK contains an integrated version of Json.net. Unfortunately it seems dynamic types don't work on the Xbox 360, so they removed all the dynamic parts of JSON (ie. JS and most of the O).

Thus, for using Json.net on the Xbox, the following three rules apply: Use using Json.Net.Adk; instead of the proper package name. Use only JsonTextReader and its helpers (JsonToken, IJsonLineInfo) to parse. Use printf to write JSON.

Should you feel tempted to use json.net's excellent higher-level functionality, forget it. It's not there. The Microsoft Help page spends six sentences describing json.net, and that really is everything you can use.

I do wonder why dynamic doesn't work, and why that and the lack of the Microsoft.Csharp assembly isn't documented.

2012-07-22

Oryx failed

About ten years ago, Abhijit Menon-Sen and I discussed email storage, archiving and access, and set out to write something good. We failed. It's time to think about why; if this reads like a stream of consciousness it's because I'm thinking.

We were right: Archiving all mail and searching it is the right approach. Gmail has a billion users. (Hm. How many of the people who told me I was wrong in 2002 use gmail now? I can think of at least five.) But we still failed. (more…)

2012-07-20

Man is the measure of all things

Le Corbusier said so. Noone seems to understand it.

A window sill is not 1m above the floor. A window is properly located so its centre is 1.0 eyeheights above the floor and its size is 1.0 visionwidths, because man is the measure of all things. A good architect resolves these difficult units appropriately to the building.

The same applies to doors, stair steps, GUI animation times and technical writing. The reader's comprehension is the measure, not logical structure or the writer's composition ideal.

2012-07-19

Trolltech's documentation process

When I arrived at Trolltech, there wasn't much documentation for Qt. Some good intentions, some outdated Τεχ source, no plan for improvement. Having suffered from that (I was the world's first external Qt user and needed documentation) I set about writing a usable documentation tool and documentation. One of my jobs became Documentation Supremo. I wrote some/much documentation, wrote the tools, kept track of quality and gradually improved the way we produced our documentation.

I did not write all of the documentation, far from it. While I wrote much and looked at the rest, I could not have written all. It was essential that everyone who wrote code, also wrote documentation.

Our documentation process worked (we wrote documentation and it largely satisfied the readers), so in this post I attempt to document what we did and what made our process succeed. (more…)

2012-07-12

Colour calibration with linux and the Colorhug

My main desktop computer is a linux box with three screens. Today I calibrated all three screens, one of them for the first time ever.

An aside. There are two real ways to calibrate a monitor. The cheap option is to use a colourimeter: a device which measures red, green and blue levels. (more…)