Author: Felix Leipold

  • Strategie

    Unablässiges Gerede von Strategien ist das Markenzeichen des schlechten Taktierers.

  • Readability vs Runtime Feedback

    In my scala explorations I also came across the problem of testing and verifying mocks. In scala it is trivial to pass around predicates, however these are function objects, that can be applied, but don’t know much about their implementation. So while the code is readable the feedback can be quite bad. Groovy’s assert statement…

  • Scala Compiler Quirks

    Recently I have been dabbling with scala a bit. As it happens I found a few quirks in the compiler. So does the following bit of code compiler and, if so, what does it print? object Example { val x = y val y = true def main(args: Array[String]) { print(x); } } Yes you’ll…

  • Don’t use DITA if you don’t have to

    I am currently for a large organisation that seems to embrace DITA for their documentation. In theory this is a nice thing. There is a wealth of tools to edit dita files and to transform them to all sorts of formats. The reference implementation is the DITA OPEN TOOLKIT. First of all I am not…

  • Getting notified when a job is done

    I really like the interaction of the command line with more advanced user interfaces. So today I got around to finally writing a little wrapper script for the mac, that notifies me with speech output when a program has finished using the say utility. The problem I was trying to solve was getting feedback when…

  • Exception Handling – The Catch Block should go Last

    I have just stumbled across a piece of code like this: Object getSomeValue() { Object value = null; try { value = errorProneOperation(); } catch (IOException e) { throw new IllegalStateException(e); } return value; } Now I find this really awkward. Why initialise something to null to keep the compiler happy? Surely you want to…

  • 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.…

  • Why I don’t like Wikileaks

    Warning: Some of the statements in this piece contain irony and sarcasm, if you are unfamiliar with these concepts you might want to stop reading here. This week there is barely a day, where I am not bored with some trivia from the “embassy cables”. Now my first problem is that most of this is…