segunda-feira, 30 de junho de 2008

To check out how awesomely obfusticated Mumps style coding can get, see the example at the end of this wikipedia article.
Hi, my name is Phil and I'm a ... modern programmer. I mean, you can usually find me over on my other blogs raving about exciting new developments in programming platforms and languages.

I love Python. I'm a keen student of Erlang. I think functional programming is cool. As are Lisp and Smalltalk ... and I need to learn about Monads.

When new stuff is going on, I'm down with it. (I mean, maybe Lisp and Smalltalk are not exactly new, but they're very contemporary and hip)

But I have a confession to make, ... you won't find it on my homepage or my CV.

I am, by day, a Caché programmer!

The reaction to such an admission usually ranges from incomprehension (you what?) to that of my ex-colleagues from the University of Brasilia computer science department : outright ROFL hilarity.

"You're writing MUMPS??!!!" they cackled. And, more or less, I am. Yes.

Er ... you what?

Intersystems Caché
is the latest in a long line of MUMPS based integrated database+programming environments. It styles itself a "post-relational" database but this is really a fancy name for saying it's a good old fashioned hierarchical database of the kind that Codd and Date did battle with in the 70s. At heart the programming language is tightly integrated with the database access so that reading and writing to it is more or less the same as reading and writing in-memory arrays.

Cache has layered over this, an SQL-like view, and an object-oriented language with built-in persistence. In fact, although most people, me among them, would agree that Codd and Date won their argument with the hierarchical database people (essentially by showing that forcing programmers to explicitly recognise the database structure and to traverse pointers was an unnecessary encumbrance when compared to the relational model), when your data is already hierarchically structured (as are nested objects) reading and writing them in a hierarchical database can be pretty fast. And Caché is increasingly selling itself as a fast, object database.

In forthcoming posts I'll explore this further.

But, in general, why blog about this? It's dull day-job stuff.

Or so I thought.

But I'm starting to wonder.

Firstly; despite my original impression of Caché's built in language - called, confusingly, ObjectScript, even though it *isn't* object-oriented - which was more or less along the lines of OMFG! Get me OUT of here!!! I have started to, grudgingly, respect some of its features as I've become more familiar with them.

Secondly, more importantly, a good programmer should be able to discover the patterns that make for "beautiful code" in any programming language.

And thirdly, most importantly, because there's a challenge here. This world of Caché is decidedly unhip. It's as far as possible from the excitement of web 2.0 as one can imagine. It's old-skool, conservative, enterprisey, legacy (the original MUMPS hails from the early 70s and a lot of the code you see looks like it!), proprietary. There are few companies who sell expensive systems to governments and health-services and hospitals. (MUMPS's stronghold is medical, patient records, management of warehouses of medicines etc.) Such companies (my own employer among them) look at you bewildered when you ask their policy on blogging. They shudder at the thought of open-source software.

And yet, if things are going the way that I assume they are, even this world must change. It will be challenged by SaaS and commodity, free-software. The patient (read Google) will take responsibility for their own medical records and hospitals will learn to speak to the outside world. There will be Caché blogs and wikis and twitters ... at least, I imagine there must be, if there is to be any ecosystem at all. But how will this good-old-fashioned, staidest of the staid, enterprise deal with the rise of "Enterprise 2.0"?

All fascinating topics to be explored on this blog.