Month: January 2011

  • JSON Builder – Fun with Generics

    On the train back to Berlin I spiked a little fluent Json Builder in Java. Here is one of my acceptance tests: JsonBuilder builder = new JsonBuilder() .addObject(“name”) .addProperty(“first”, “Holden”) .addProperty(“last”, “Caulfield”) .end() .addArray(“contact”) .addPrimitive(“00447903217666”) .addObject() .addProperty(“street”, “5 Mayton St”) .end() .addPrimitive(“004915151183666”) .end() .addProperty(“date”, “2011-12-12”); JsonObject clientFile =builder.build(); This yields: { “name”: { “first”:”Holden”, “last”:”Caulfield”…

  • Processing large XML files with Shell Scripts

    I recently did some work around analysing xml files for data imports. This kind of task is usually well suited for taco bell programming. Now xml is not easily manipulated with standard unix utilities, so I looked for a way to run xqueries against my files. The first thing I found was the eXist xml…

  • Reading the Classics – The CLU Reference Manual

    Last year I started reading or rereading some of the classical texts in computer science. The first one was the CLU Reference Manual by Prof. Liskov et al. The book and the language were conceived in the seventies. CLU is object based the central concept being the abstract data type essentially encapsulated objects without inheritance.…