The Limiting Factor

- semi-structured line noise.

Open Source Upsides

| Comments

I am really looking forward to the goto cph conference this year.

One of the talks on my personal iteneary is How to train your corporation to prefer open source by Richard Lander from the Microsoft team.

Microsoft is undergoing profound changes at the moment expecially in its approach to open source. One of the more prominent examples of this is the open sourcing of the .NET stack which I am sure Richard will be mentioning in his talk.

The irony of course is that Microsoft still inflicts the pain of closed source on its customers on a monumental scale – and as closed licensors go Microsoft unfortunately is at the bad end of the spectrum and showing no signs of becoming even more rigid with time. My last encounter with Microsoft’s licensing machine was less than a year ago, and for the umpteenth time numerous very reasonable requests for changes and clarifications to the license terms were summarily dismissed. It would be great to see a fresh approach to software licensing from Microsoft similar to how IBM has – although imperfectly – reinvented its terms and conditions.

There are of course many reasons to prefer open source to the extent possible. A prominent one is that you avoid the pain of license audits by vendors who missed their last quarter or who wants to strong arm you into using their latest solution that they haven’t been able to sell to customers voluntarily, better known as the Oracle approach

Full Disclosure: I am receiving a free GOTO ticket from the producers in exchange for blogging about the conference.

Om, Clojure/ClojureScript and Event Sourcing

| Comments

goto CPH is closing in rapidly.

As mentioned previously I am especially looking forward to David Nolen’s talk Putting the Dream Machine to Work.

Om is getting a lot of coverage and even if it is still very new, it is seeing some heavy duty prodcution usage, for instance at Prismatic. But Prismatic has gone even further that just using Om and released om-tools, which makes it even more straight forward to use Om. I especially like how it smoothes over some of the slightly ugly Javascript interop that Om requires out of the box.

Another talk I am looking very much forward to is Greg Young’s talk on Event Sourcing. Event Sourcing is a very interesting pattern which has a very natural fit to many common business scenarios, and I am looking forward to Greg Young giving us some examples of that. The benefits of the event sourcing pattern appears to me to overlap somewhat with the benefits of the Clojure based database Datomic which also emphazises the need for a solid model of time.

If you are interested in dabbling with Event Sourcing and have been inspired by David’s talk on Om/ClojureScript you should check out the JVM Soup post on Event Sourcing in Clojure. This post demonstrates how to use core.async Clojure/ClojureScripts CSP implentation, which David also recommends to do inter component communication when using Om, to do event sourcing in Clojure/ClojureScript.


| Comments

Looks like I will be at goto CPH again this year.

The format this year is quite different, but looks very interesting nonetheless. Especially the Leading & Bleeding Edge track looks interesting. At this track I am especially looking forward to seeing David Nolen’s talk Putting the Dream Machine to Work.

David has created a ClojureScript framework on top of React called Om. Om is not just a wrapper around React. It leverages ClojureScript’s immutable datastructures to substitute costly object and array compares with reference equality checks. This results in quite significant performance improvements.

David in his tutorials encourage another ClojureScript feature core.async for intercomponent communication.

As Om is still very new there are not many presentations available but Functional UI programming with React.JS and ClojureScript is a very good introduction.

If you understand Norwegian (and maybe even if you don’t) Magnar Sveen and Christian Johansen have recorded a very entertaining series of pair programming screencast where they use ClojureScript, Quiescent (an alternative React ClojureScript library) and a TDD approach to create a Zombie themed Memory Flash Game called ZOMBIECLJ

Licensing Done Right!

| Comments

Just attended a very nice overview talk on the Unity game development system at goto Aarhus 2013.

The tech in Unity itself is very impressive, especially the ability to deploy the same code base and assets to 10+ platforms, including iOS. But Unity has also put a lot of thought into how the product is licensed. Not only was it a very conscious decision by the founders that Unity be royalty free, but the same thoughtfulness has also been applied to the Unity Asset Store.

The Asset Store is Unity’s equivalent of the App Store, but instead of apps you can buy art (e.g. graphics, models, audio) and code assets for inclusion in your Unity project. Had Unity left the choice of license up to the creators of the submitted assets, it would have completely undermined the royalty free nature of the Unity engine, as each asset could potentially inject it’s own royalty model into a product created with Unity. Instead all assets are per definition subject to standard royalty free TOS & EULA, and as explained in the below excerpt from Unity’s Asset Store submission guidelines it is not possible to sell assets in the Asset Store that are subject to other/additional terms.

6.2 Licensing your Content

For consistency sake, all Asset Store offerings are covered by a license we have created. Please have a look at the End User License Agreement to be sure you are comfortable with it. If you are offering your content for free, you have the further option of selecting one of three free-licenses, which override the basics of our commercial license. Please do not include your own license terms in your offering.

It is very refreshing to see how licensing models can be designed to enhance the usefulness of a product and its eco-system, while at the same time serve as the underpinning of an indisputable financial success.

If you have any use-cases involving 3D graphics you really should check Unity out. And please note that Unity is not limited to games. Unity Studios have done some really cool non-game applications, including a simulation for training safety procedures at sea and a brilliant app for Velux that let’s you simulate the effects of installing Velux windows in your own home.

Hit Record!

| Comments

Richard Baeckman just did an excellent presentation on Java Flight Recorder at goto Aarhus 2013. Java Flight Recorder is an – enhanced – port of JRockit Flight Recorder to the Oracle(Sun) JVM. It ships with Java SE Development Kit 7u40 and includes a very nifty GUI called Java Mission Control that provides an excellent overvie of all the data collected in your recordings. I was very interested in seeing how useful JFR is when running Clojure code. Fortunately installation is very easy. After installing Java Platform (JDK) 7u40 I just added the following options to my project.clj file.

:jvm-opts ["-XX:+UnlockCommercialFeatures" "-XX:+FlightRecorder"]

On OS X you have to start the JMC from a terminal invoking the binary located at:


This brings up the JMC GUI. If you start your Clojure app (in my case Rich’s ants.clj), your jvm(s) should be visible under the JVM Browser tab. From here you can start a recording by double-clicking the relevant JVM, right-clicking the Flight Recorder entry and choosing “Start Flight Recording…”. I have inlcuded a screenshot below of a 1 minute recording of ants.clj. As you can tell JFR collects an immense amount of information but the overhead is minimal, approx 3% according to Richard.

Java Mission Control

Please do note that the Java Flight Recorder and JMC are both Commercial Features, which I have written about previously here. This means that neither JFR and JMC may be used for production purposes without a separate payable license from Oracle. There is currently no public information regarding prices and other conditions available from Oracle.

Flexible Contracts

| Comments

It was suggested to me to look into the concept of Flexible Contracts, a new approach to contracting for agile it projects championed by Gabrielle Benefield who will be providing training in agile practices in connection with goto Aarhus 2013.

Flexible Contracts are born out of the observation that traditional contract models are a very poor fit for agile IT projects. This is hardly a novel observation, but Gabrielle’s work (and that of her collaborators) distinguishes itself by actually having produced a practical alternative, which they have commendably licensed under the CC Attribution 3.0 Unported license. Only the lite version – Flexlite 0.1 as it is designated – appears to be presently available, and can be accessed if you are willing to sign up to the Flexible Contracts mailing list here.

It is worth noting that the overview attached to the contract clearly states that the Flexlite contract is to be considered a “minimum viable contract”, but after having reviewed the document I still find that the current version lacking in a number of ways.

Below I will outline a subset of the issues I have identified and for some suggests some possible remedies. Please note that I am commenting on the UK version (which you might want to keep handy if you want to make sense of my comments) of the contract which is the system of law I am most familiar with, but most of my comments should apply to both versions, with the exception of the issue of “best endeavours” where there is a significant difference between US and UK law.

Statetment of Target Outcomes (SOTO)

The contract focuses on the use of SOTOs instead of specifying the desired results through requirements or a more traditional solution specification. A SOTO:

means a statement of target outcomes as agreed by the parties in accordance with clause 1.1;

According to clause 2.2 the Supplier must for each Target Outcome create:

Options that have the potential to achieve the Target Outcome. In respect of each Option the Supplier shall provide a forecast in terms of the estimated value, costs, risks and expiry date (if any) for that Option and shall inform the Customer of any requirements for execution of the Option and any circumstances in which the Option may expire.

Even after reading the overview it remains unclear exactly what the function of the Options are and what, if any, the work-flow for calling these are.

It appears odd that acceptance (adoption) of the Outcome Delivery is left to the Supplier but I assume this is considered reasonable given that one of the objectives of the Flexible Contract is to provide as much flexibility to vendor in deciding in how to achieve the SOTO. I don’t think any customer would be comfortable with this construct, especially if the Supplier’s payment hinges in part on achieving the Target Outcomes, which is one of the models (option B) suggested in the model SOTO schedule attached to the contract. Clause 2.7 isn’t much help in this context, as 2.7. (a) is stating the obvious and (b) lacks fundamental precision. As such in can easily be interpreted as granting the Customer defacto veto rights against any Outcome Delivery, which is hardly constructive either.

Related to this issue is the lack of consistency between clause 3.1 which states that:

In consideration of the provision of the Services by the Supplier, the Customer shall pay the fees in the amount and on the dates or with the frequency as set out in each SOTO.

and the “Hybrid Outcome-based fees” model in the model SOTO schedule, where payment is conditioned upon achieving the Target Outcomes.

Best Endeavours

I also find it fundamentally concerning that the contract relies on a unqualified “best endeavours” standard when defining the Suppliers responsibility under the contract. It is simply not good practice not to agree some further specification of what the parties intend “best endeavours” to mean. This can for instance be done by indicating what financial/resources the Supplier must expend in its attempt to fulfill its obligation. Failing to provide such guidance is to invite conflict and to introduce unnecessary uncertainty. While I applaud the authors stated aim of brevity this is not an area where one wants to sacrifice lack of precision for terseness. I have included a few links below that provides more in-depth information on the subject.

Intellectual Property Rights (IPR)

The IPR as specified in clause 5 model appears fairly sensible and reflects the reality of the deliverables being a composite of bespoke, vendor, third party proprietary and FOSS. That said the specific license granted to the Customer in respect of Supplier Software (clause 5.4) will in many cases have to be adapted to the needs of the Customers, both in respect of scope but also rights to create derived works etc. I would suggest moving the specification of this license to the SOTO schedule to facilitate this. This also applies to the specification of what types of software (Customised, Supplier, Third Party, Open Source) will constitute part of the Outcome Delivery, so the Customer may determine the feasibility of the rights obtained and clear any necessary rights.

While the contract does provide a warranty for non-infringement in respect of the Services and Outcome Delivery it does not address the issue of indemnification for such infringement, which any prudent customer will require.

The above is a summary of some of the issues I have identified with the current draft of the Flexlite contract. I summation I think the contract does a good job of capturing the idea of an outcomes focused contract, but unfortunately it does so at the expense of the customers position under the contract should things not go as planned.

I hope to have the opportunity to discuss Flexible Contracts with Gabrielle during goto Aarhus 2013 and do one or more follow posts on Flexible Contracts.

Links regarding best endeavours:

“All reasonable endeavours” a lesser obligation than “best endeavours”

Best and EffortsCase Analysis and Practical Guidance Under U.S. and U.K. Law

My delicious links about “best endeavours”

Full Disclosure: I am receiving a free GOTO ticket from the producers in exchange for blogging about the conference.

GOTO Aarhus 2013 - ClojureScript

| Comments

I put together my first draft itenary for GOTO Aarhus 2013. You can see it here.

Fortunately the programme did not pose too many dilemma’s for me to resolve, although choosing between “Obstacles And Patterns To Maximize Flow In IT Operations” and “Lambdas in Java: A peek under the hood” on Tuesday morning was a bit difficult.

I was especially pleased to see that David Nolen is giving a talk. David is fairly prolific in the Clojure community. He is the driving force behind core.logic and a significant contributor to ClojureScript. Core.logic is a implementation of miniKaren and provides robust logic programming facilities in Clojure and ClojureScript. As an example of how concise logic programming can be please see below Sudoku solver by David Nolen.

;; based on core.logic 0.8-alpha2 or core.logic master branch

(ns sudoku
    (:refer-clojure :exclude [==])
        (:use clojure.core.logic))

(defn get-square [rows x y]
    (for [x (range x (+ x 3))
          y (range y (+ y 3))]
              (get-in rows [x y])))

(defn init [vars hints]
    (if (seq vars)
        (let [hint (first hints)]
                (if-not (zero? hint)
                    (== (first vars) hint)
                            (init (next vars) (next hints))))

(defn sudokufd [hints]
    (let [vars (repeatedly 81 lvar)
          rows (- vars (partition 9) (map vec) (into []))
          cols (apply map vector rows)
          sqs  (for [x (range 0 9 3)
                     y (range 0 9 3)]
                     (get-square rows x y))]
                (run 1 [q]
                    (== q vars)
                    (everyg #(infd % (domain 1 2 3 4 5 6 7 8 9)) vars)
                    (init vars hints)
                    (everyg distinctfd rows)
                    (everyg distinctfd cols)
                    (everyg distinctfd sqs))))

;; ====

    [0 0 3  0 2 0  6 0 0
     9 0 0  3 0 5  0 0 1
     0 0 1  8 0 6  4 0 0
     0 0 8  1 0 2  9 0 0
     7 0 0  0 0 0  0 0 8
     0 0 6  7 0 8  2 0 0
     0 0 2  6 0 9  5 0 0
     8 0 0  2 0 3  0 0 9
     0 0 5  0 1 0  3 0 0]))


ClojureScript compiles Clojure into Javascript which is guarenteed to be digestable by the Goolge Closure compiler. While the ClojureScript implementation of core.logic is somewhat limited compared to the Clojure based one, you can still do some interesting things with it. If you are not familiar with ClojureScript you might want to check this tutorial out. Some interesting examples of using canvas / SVG with ClojureScript, can be found here

Full Disclosure: I am receiving a free GOTO ticket from the producers in exchange for blogging about the conference.

SAS vs. World Programming – Opinion of the Advocate General

| Comments

So the Advocate General to the ECJ has submitted its opinion to the Court on the questions submitted by the High Court of Justice of England and Wales in the SAS vs World Programming case that i wrote about here and here.

The Advocate concludes the following:


Article 1(2) of Council Directive 91/250/EEC of 14 May 1991 on the legal protection of computer programs is to be interpreted as meaning that the functionalities of a computer program and the programming language are not eligible, as such, for copyright protection. It will be for the national court to examine whether, in reproducing these functionalities in its computer program, the author of the program has reproduced a substantial part of the elements of the first program which are the expression of the author’s own intellectual creation.


Articles 1(2) and 6 of Directive 91/250 are to be interpreted as meaning that it is not regarded as an act subject to authorisation for a licensee to reproduce a code or to translate the form of the code of a data file format so as to be able to write, in his own computer program, a source code which reads and writes that file format, provided that that act is absolutely indispensable for the purposes of obtaining the information necessary to achieve interoperability between the elements of different programs. That act must not have the effect of enabling the licensee to recopy the code of the computer program in his own program, a question which will be for the national court to determine.


Article 5(3) of Directive 91/250, read in conjunction with Articles 4(a) and (b) and 5(1) thereof, is to be interpreted as meaning that the expression ‘any of the acts of loading, displaying, running, transmitting or storing the computer program [which the person having the right] is entitled to do’ relates to the acts for which that person has obtained authorisation from the rightholder and to the acts of loading and running necessary in order to use the computer program in accordance with its intended purpose. Acts of observing, studying or testing the functioning of a computer program which are performed in accordance with that provision must not have the effect of enabling the person having a right to use a copy of the program to access information which is protected by copyright, such as the source code or the object code.


Article 2(a) of Directive 2001/29/EC of the European Parliament and of the Council of 22 May 2001 on the harmonisation of certain aspects of copyright and related rights in the information society is to be interpreted as meaning that the reproduction, in a computer program or a user manual, of certain elements described in the manual for another computer program may constitute an infringement of the copyright in the latter manual if – a question which will be for the national court to determine – the elements reproduced in this way are the expression of their author’s own intellectual creation.

The opinion is pretty much a slam dunk for World Programming. The only hiccup is the issue related to the copying of parts of SAS’ manuals, but that is a minor issue compared to a situation where World Programming would have been restricted in their ability to produce a product compatible with SAS’ product. Now we just have to hope that the Court agrees with the Advocate General.

Oracle Java 7 and ‘Commercial Features’

| Comments

Oracle has just announced the general availability of Java 7 SE including Java SE Advanced and Java SE Suite.

Being a software license nerd I of course skimmed the Java SE License Agreement (full title “Oracle Binary Code License Agreement for the Java SE Platform Products”).

The license contains some interesting wording regarding “Commercial Features” in section 1, 2 and SUPPLEMENTAL LICENSE TERMS section A and G. The “Commercial Features” are defined in this document (PDF version with better layout here). Please note that the specification of “Commercial Features” is not part of the license as such and therefor subject to change at Oracle’s discretion.


It turns out the “Commercial Features” are subject to rather draconian restrictions (SUPPLEMENTAL LICENSE TERMS section A):

COMMERCIAL FEATURES You may not use the Commercial Features for running Programs, Java applets or applications in your internal business operations or for any commercial or production  purpose, or for any purpose other than as set forth in Sections B, C, D and E of these Supplemental Terms.  If You want to use the Commercial Features for any purpose other than as permitted in this Agreement, You must obtain a separate license from Oracle.

As you can tell any meaningful business use of the “Commercial Features” are subject to a separate license.

So does the regular Java 7 SE download contain any of these “Commercial Features”? It does not look like it and the Java Se Advance and Java SE Suite packages doesn’t either, because they do not exist. From below two sections that appear at end of this document, it is clear that the Java SE Advanced and Java SE Suite “products” are a combination of the Java 7 SE and a number of separate packages.

Installation of Java SE Product Editions

Oracle does not provide installation programs that correspond directly to Java SE, Oracle Java SE Advanced and Oracle Java SE Suite. Depending on the features licensed, one or more of the following individual packages must be downloaded:


JRockit JDK

JRockit Mission Control

Java for Business JRE

Java for Business JDK

Licensing Considerations and Restricted-Use Licensing

Some of the packages described in Installation of Java SE Product Editions install commercial features that are restricted to Oracle Java SE Advanced or Oracle Java SE Suite. For example, the JRockit JDK comes with a deterministic garbage collector that requires a Oracle Java SE Suite license.

If you download (which you can do for instance here and here) and use these extra packages for the purposes outlined above (any meaning full business use) in combination with Java 7 SE you are subject to a separate (ostensibly payable) license.

The only mention I can find of this change from Oracle is this blog post with the clearly misleading title “JRockit is Now Free (and Other Java License Updates)”, as this does not apply to the JRockit “Commercial Features” listed above.

You should make sure that your developers, ops people and relevant vendors of such service knows this, or you could end up breaching your license and owing Oracle a lot of money.

Dropbox Unzip

| Comments

Inspirer by this post where the author shows how to add automatic unzipping to a Dropbox folder on OS X, I wanted to see if something similar was easily achievable on Ubuntu (10.10).

After a bit of searching I found incron. Quoting from the website incron “is an “inotify cron” system. It consists of a daemon and a table manipulator. You can use it a similar way as the regular cron. The difference is that the inotify cron handles filesystem events rather than time periods.”

To create a folder in your Dropbox that automatically unzips any zip file dropped into it first install incron. It is available in the Ubuntu Universe repository and can be installed using:

sudo apt-get install incron

After the package is installed you must add the username of all users who should be permitted to add jobs to incron to /etc/incron.allow like this(replace [username] with your username):

sudo echo “[username]” >> /etc/incron.allow

Next create the unzip folder in your Dropbox folder:

mkdir [path to your Dropbox folder]/unzip

Next we need to add the actual unzip job row to incron like this:

icrontab -e

This opens the user incron table in the deafult editor. Insert the following line, replacing [path to your Dropbox folder] with the absolute path (don’t use ~) to your Dropbox folder:

[path to your Dropbox folder]/unzip IN_CLOSE_WRITE unzip $@/$# -d $@

Check that the job row was added to your incron table:

incrontab -l

This should output the line you just added above. If this works try copying a zip file into the Dropbox/unzip folder. If everything works it should unzip automatically. This obviously only so long the machine you installed the incron job is online.