Are You Sublime or Ridiculous?

Sometimes I wonder at the simplicity of us humans. Its often hard to see the simplicity though, when we act in such complex ways, but I think the following describes our ‘behaviour‘ quite succinctly.


Pretty simple huh? Well it looks a bit like this when you draw a graph:

See what I mean? You sate a need, and over time its intensity increases till it starts to get unbearable. Obviously this graph represents my dependency on caffeine, and is based on entirely randomly chosen numbers, scales & so on. But you get the picture? It’s fairly indicative of how we react if we don’t attend to our needs over time.

You may be wondering why (in addition to taking a rather dismal tone in this post) on earth I felt the urge to create such a model. Well the answer is (in addition to giving me a chance to play with gnuplot, mathomatic and \LaTeX all in the one post) that I’m producing the rules to go with the little Freudian drive ontology I showed you in my previous post. There, in the 20-odd lines of N3 notation, I was able to produce a nice little model of our baser urges – what you might call our reptilian heritage 🙂

What amuses me is that we can describe such deeply felt aspects of our personalities in such simple terms. I mean, that equation earlier wasn’t that complex was it? It’s not like it needed quaternions or new fields of analysis! It reminds me of a blog post I read a few months back by some guy who’d discovered how to initiate a transition in the state model of his grizzly daughter. Whenever she started to cry, and he or his wife couldn’t console her, they put her into her cot. After a while she forgot why she was crying (remember FSAs are stateless:) and so when they lifted her out of her cot, she immediately thought she’d gotten what she wanted and stopped crying. She’d transitioned from in_cot/[Cry] to the out_of_cot/[Smile] state.  It also made me remember that the common house-fly’s visual navigation algorithm is about as complex as the equation I just gave. It’s not that the algorithm is complex, but that the environment it reacts to is.

So, are you a meaty algorithm, or the pinnacle of god’s creation? Me? I’m just off for a coffee and a fag, before going to sleep. 🙂

Domain Modeling and Ontology Engineering

The semantic web is poised to influence us in ways that will be as radical as the early days of the Internet and World Wide Web. For software developers it will involve a paradigm shift, bringing new ways of thinking about the problems that we solve, and more-importantly bringing us new bags of tricks to play with.

One of the current favourite ways to add value to an existing system is through the application of data mining. Amazon is a great example of the power of data mining; it can offer you recommendations based on a statistical model of purchasing behaviour that are pretty accurate. It looks at what the other purchasers of a book bought, and uses that as a guide to make further recommendations.

What if it were able to make suggestions like this: We recommend that you also buy book XYZ because it discusses the same topics but in more depth. That kind of recommendation would be incredible. You would have faith in a recommendation like that, because it wasn’t tainted by the thermal noise of purchaser behaviour. I don’t know why, but every time I go shopping for books on computer science, Amazon keeps recommending that I buy Star Trek books. It just so happens that programmers are suckers for schlock sci-fi books, so there is always at least one offering amongst the CompSci selections.

The kind of domain understanding I described above is made possible through the application of Ontology Engineering. Ontology Engineering is nothing new – it has been around for years in one form or another. What makes it new and exciting for me is the work being done by the W3C on semantic web technologies. Tim Berners-Lee has not been resting on his laurels since he invented the World Wide Web. He and his team have been producing a connected set of specifications for the representation, exchange and use of domain models and rules (plus a lot else besides). This excites me, not least because I first got into Computer Science through an interest in philosophy. About 22 years ago, in a Sunday supplement newspaper a correspondent wrote about the wonderful new science of Artificial Intelligence. He described it as a playground of philosophers where for the first time hypotheses about the nature of mind and reality could be made manifest and subjected to the rigours of scientific investigation. That blew my mind – and I have never looked back.

Which brings us to the present day. Ontology engineering involves the production of ontologies, which are an abstract model of some domain. This is exactly what software developers do for a living, but with a difference. The Resource Description Framework (RDF) and the Web Ontology Language (OWL) are designed to be published and consumed across the web. They are not procedural languages – they describe a domain and its rules in such a way that inference engines can reason about the domain and draw conclusions. In essence the semantic web brings a clean, standardised, web enabled and rich language in which we can share expert systems. The magnitude of what this means is not clear yet but I suspect that it will change everything.

The same imperatives that drove the formulation of standards like OWL and RDF are at work in the object domain. A class definition is only meaningful in the sense that it carries data and its name has some meaning to a programmer. There is no inherent meaning in an object graph that can allow an independent software system to draw conclusions from it. Even the natural language labels we apply to classes can be vague or ambiguous. Large systems in complex industries need a way to add meaning to an existing system without breaking backwards compatibility. Semantic web applications will be of great value to the developer community because they will allow us to inject intelligence into our systems.

The current Web2.0 drive to add value to the user experience will eventually call for more intelligence than can practically be got from our massive OO systems. A market-driven search for competitiveness will drive the software development community to more fully embrace the semantic web as the only easy way to add intelligence to unwieldy systems.

In many systems the sheer complexity of the problem domain has led software designers to throw up their hands in disgust, and opt for data structures that are catch-all buckets of data. Previously, I have referred to them as untyped associative containers because more often than not the data ends up in a hash table or equivalent data structure. For the developer, the untyped associative container is pure evil on many levels – not least from performance, readability, and type-safety angles. Early attempts to create industry mark-up languages foundered on the same rocks. What was lacking was a common conceptual framework in which to describe an industry. That problem is addressed by ontologies.

In future, we will produce our relational and object oriented models as a side effect of the production of an ontology – the ontology may well be the repository of the intellectual property of an enterprise, and will be stored and processed by dedicated reasoners able to make gather insights about users and their needs. Semantically aware systems will inevitably out-compete the inflexible systems that we are currently working with because they will be able to react to the user in a way that seems natural.

I’m currently working on an extended article about using semantic web technologies with .NET. As part of that effort I produced a little ontology in the N3 notation to model what makes people tick. The ontology will be used by a reasoner in the travel and itinerary planning domain.

:Person a owl:Class .
:Need a owl:Class .
:PeriodicNeed rdfs:subClassOf :Need .
:Satisfier a owl:Class .
:need rdfs:domain :Person;
rdfs:range :Need .
:Rest rdfs:subClassOf :Need .
:Hunger rdfs:subClassOf :Need .
:StimulousHunger rdfs:subClassOf :Need .
:satisfies rdfs:domain :Satisfier;
rdfs:range :Need .
:Sleep a :Class;
rdfs:subClassOf :Satisfier ;
:satisfies :Rest .
:Eating a :Class;
rdfs:subClassOf :Satisisfier;
:satisfies :Hunger .
:Tourism a :Class;
rdfs:subClassOf :Satisisfier;
:satisfies :StimulousHunger .

In the travel industry, all travel agents – even online ones – are routed through centralised bureaus that give flight times, take bookings etc.  The only way that an online travel agency can distinguish themselves is if they are more smart and easier to use. They are tackling the later problem these days with AJAX, but they have yet to find effective ways to be more smart. An ontology that understands people a bit better is going to help them target their offerings more ‘delicately’. I don’t know about you, but I have portal sites that provide you with countless sales pitches on the one page. Endless checkboxes for extra services, and links to product partners that you might need something from. As the web becomes more interconnected, this is going to become more and more irritating. The systems must be able to understand that the last thing a user wants after a 28 hour flight is a guided tour of London, or tickets to the planetarium.

The example ontology above is a simple kind of upper ontology. It describes the world in the abstract to provide a kind of foundation off which to build more specific lower ontologies. This one just happens to model a kind of Freudian drive mechanism to describe how people’s wants and desires change over time (although the changing over time bit isn’t included in this example). Services can be tied to this upper ontology easily – restaurants provide Eating, which is a satisfier for hunger. Garfunkle’s restaurant (a type of Restaurant) is less than 200 metres from the Cecil Hotel (a type of Hotel that provides sleeping facilities, a satisfier of the need to rest) where you have a booking. Because all of these facts are subject to rules of inference, the inference engines can deduce that you may want to make a booking to eat at the hotel when you arrive, since it will have been 5 hours since you last satisfied your hunger.

The design of upper ontologies is frowned upon mightily in the relational and object oriented worlds – it smacks of over-engineering. For the first time we are seeing a new paradigm that will reward deeper analysis. I look forward to that day

StumbleUpon Toolbar Stumble It!

Linguistic development

Child Linguistic Development is a document that I wrote when I was at university on the stages of language development. Since Emily and Thomas are now a week short of 18 months it is time for Kerry and I to start learning about learning. I’d forgotten most of this stuff, so it will make interesting reading for me too! I’ve put a link in to kerry’s gorgeous new blog/journal, where she describes her day-to-day experiences of raising twins. Hair raising more than twin raising, if you want my opinion…

Feverish Gibbering

Memetically, I’m lying in my bed sweating till the sheets are drenched.

Memetically, the family is stood around the foot of my bed and the priest has been called up from the village.

Memetically, I am raving while the hospital staff tie straps to my arms and legs to prevent me from hurting myself.

Memetically, I am on the back of a wagon being taken to the unmarked grave called “yuletide casualties“.

Yes, Christmas is here to provide the memetic straw that breaks this camel’s back. I was already infected by the recent wave of Wiggles that was going around (the Di Dickey Doo Dum even shows on my face, and if the office is too quiet people can hear my subvocalised Big Red Cars). Add to that the background malaise from all that twinkle twinkling and the blind mice that race up and down my spine (presumably competing for mind-space with the little piggies) at night.

But now I am mordant with memes that are thick as fleas on a dogs back – it is Christmas and the new rash of novelty singing toys are out. Kerry and her mother thought it was in the yuletide spirit to have about a dozen of these monstrosities wandering the house singing songs that are so virulent they should be ranked alongside military grade bioweapons.

I know the ill-disciplined mind of a child needs something seriously catchy to get an idea through the background noise of the forming mind. The effect on us adults, though, is little short of being mustard gassed in the trenches for a solid month.

That sacred space that is the core of a centred mind is, in my case, so infected with viral memes it bears more than a passing resemblance to an ambulatory slime mould.

And don’t get me started on those ruddy 50’s and 60’s Xmas tunes from the likes of Bing Crosby.

No meme would be worth its salt if it didn’t compel me to sing you a song, so here goes:

I’m the happiest Christmas tree – Ho Ho Ho. He He He.
Came one day, and they found me, and took me home with them.

I’ve got tiny bells that tinkle,
And tiny little lights that twinkle
And if anybody passes by
I wink my lights, and blink my eyes!

Oooh, I’m the happiest Christmas tree,
Christmas day – wait and see
I’ll be laughing happily
With a Ho Ho Ho He Heeeee.

Naturally, it doesn’t sound right unless it’s accompanied by a banjo and a red flashing nose.


Oh, and a merry Christmas to you!

Dodgy theory of the week

Aymeric put me onto a cool application called Neuro Programmer 2 (from the sinister sounding Transparent Corporation – makes me think of Umbrella Corporation), that generates brainwave entrainment sessions. We tried out one called Caffeine Replacement, and were quite amazed at the effect it had on us. We both ended up euphoric afterwards.

That got me to thinking, if you can entrain your brainwaves deliberately to give you more vitality and concentration, isn’t it possible to accidentally find yourself in an environment that has the opposite effect on you? I wonder whether the distinctive sounds of computer fans, air conditioning, strip lights and conversational hubbub in an open plan office can combine to have a suppressive brainwave entrainment effect. Maybe that contributes to sick building syndrome?

Imagine how cool it might be to be able to use your laptop’s speakers to modulate the background noise to put you in the frame of mind you require. You could have a menu in the system tray with options like [Receptive & Creative], [Relaxed], [Energetic]. I would like that.

Let the Flame Wars Begin…

Alec has provided a few of the reasons he hates Microsoft. They all seem like sentimental attachment to other peoples litigation defeats… In honour of that, I have changed the colour of my blog for a day or two…

I too went through an undergraduate phase of anti-MS zealotry, and adopted obscure platforms as a kind of protest (i.e. Linux, Java, etc) then I went out to work, and realized that as far as the relevance of my skills is concerned, it didn’t matter whether the standards I knew were de jure or de facto, just so long as they were standard. Microsoft made it easier for me to pay the rent, so I am grateful that they were there doing what they do best.

Besides, I would have behaved in exactly the same way if I were in his position, so I can’t pretend to sit on the moral high-ground casting judgments at successful strategies designed to increase shareholder value. That was his job – he did it well.

Apart from that, it was just a little image that popped into my head during a discussion here at Readify – I did qualify my analysis as being a little bit dodgy so – caveat emptor!

Dodgy Postmodernist Analysis

Funny. There really is a large Oedipal component to anti-MS zealotry. The non-alpha nerds (especially very young under graduate level or recently post graduate level nerds) presumably see Bill Gates (and Microsoft in general) in the same way as they saw their fathers when they were very young children… Bill is the ultimate competitor for all that they desire in the world of their technical explorations (mother). If they cannot displace him and his organization from the affections of mother (the PC buying, technology using public) then they learn to sublimate their hatred of him into 500 word anti-MS blog posts on sites like slashdot.

So when you next read one of these /.esque diatribes, you can imagine a little boy throwing a tantrum because Mummy is talking to Daddy rather than playing with him instead.