This blog is highly personal, makes no attempt at being politically correct, will occasionaly offend your sensibility, and certainly does not represent the opinions of the people I work with or for.
Internal, Definitional and Interfacial, a note on complexity

The title of this entry, wasn't easy to find. Turns out that I don't have the correct word to refer to (at least) the last of the four concepts I am going to talk about...

My watch is a white automatic TAG Heuer, an expensive watch that I bought in 2009. Being an automatic watch, it has a complex internal mechanism; so complex that I would not be able to put it back if one day I disassemble it; in fact there aren't that many people able to assemble those things. I will say that it has a high measure of internal complexity. This said, if I were to explain to somebody who've never seen a watch what it does, I would simply say that it is a device that displays the time (it also has a chronometer function, but I will ignore that). I will say that it has a low definitional complexity; in other words, it is easy to describe what it was made for and what it does. The user manual is easy to digest and the interface is easy to interact with: a display with five hands (three of them contribute to the primary function and actually only two suffice, and one display of the date). The buttons are easy to use (start and stop of the chronometer and the multifunction crown). I will say that it has a low-to-medium interfacial complexity.

Now, comes the interesting question of what I can built with this watch, which kind of system it can become a part of? Answer: not much really, it's just a watch. I will say that it has a null energy measure.

I don't know which word would best describe the ability of a system to contribute, as a component, to a much larger and more complex systems. I use the word 'energy' to refer to this capacity.

Memcached is a in-memory caching service used by about everybody in the world for realtime applications, notably web applications. I have never seen its source code, but since I would be able to reimplement it without fuss, I estimate that it has a low internal complexity. Explaining what it does, well I just did that; therefore a low definitional complexity. The interface is simple, with or without language bindings, therefore a low interfacial complexity. The energy measure, is more difficult to establish, but from my own experience with memcached and similar systems (I build one for myself which is a bit like Redis), I can say that amazing things can be done with a nice fast in-memory key value store, therefore a high energy measure.

Ok, this is so much fun, let's do it again. This time with, say Twitter. The actual internal complexity is really non trivial, but that's because it has more than 200 million users, the theoretical internal complexity is so low that I have implemented twitter several times during my leisure coding, sometimes by accident. The definitional complexity is low: microblogging platform. The interface complexity is low (a text box, type your junk up to 140 chars and hit send). The energy measure, this time, is the highest of all examples so far. There are many non trivial uses of a system like twitter, in ways that have yet to be explored (would be easier to do in the company wasn't run by douchebags developer unfriendly people).

Ok, now that we get it, let me move to my main point. Internal complexity is a direct measure of how painful it is to repair, change, update the system. I am not interested in this today. The definitional complexity is also not on today's menu. I want to talk about interfacial complexity versus energy measure (for lack of a better word). I have noticed, recently, that my mind has been using the ratio between energy measure and interfacial complexity (the higher the better) to select systems I want invest time exploring, playing with and hack against; as well as systems I build.

For instance, I am not interested in Facebook. Even ignoring the internal and definitional complexities, the very high interfacial complexity together with the very low energy measure (really, what else can you do with a Facebook account than what you usually do with it?) makes it totally useless to me; along the fact that the idea of programmatically interacting with a Facebook account is really painful just thinking about it. Compare that with the fact that I have a daemon on my computer which has its own twitter account, or even all the interesting stuff you can do with a (G)mail account (filesystem over imap anyone ?...)

Note that in the previous paragraph I talked about web apps, just not to miss an opportunity to trash Facebook, but it would have worked better if I has focused on smaller systems (with a clearer idea of what it is that they were made for...).

Permanet (I still need to write the third part of the three part series describing it), has a medium internal complexity, a low definitional complexity, a low interfacial complexity and a stratospherically high energy measure.