?

Log in

No account? Create an account
Gavin Greig [userpic]

MUMPS

February 1st, 2006 (09:28 pm)

Once upon a time, in a Regional Health Authority far, far away, there lived a programmer. The programmer was very poor, because Health Authorities couldn't pay much to their employees, but everyone believed in what they were doing because the Health Service is a Good Thing.

The poor programmer had to get up very early in the morning - something he hadn't been used to as a student or when unemployed - and work all day for his living. He was forced to slave over a hot PDP-11, which was antiquated kit even at the time, and support the National Breast Screening System. Yea, throughout the South West he supported Bristol, worked in Jersey and suffered the subsequent Taunton.

Worst of all, however, was the abusive language he had to suffer. It was quite the worst language you have ever heard of, and it infected all the poor programmers who worked in that place. And the name of MUMPS was feared throughout the land.

More recently, thanks to a link sent to me over Christmas by flybynightpress, I have tracked down what happened to MUMPS. Most of the implementations seem to have been bought over by InterSystems, and the ANSI standard for the language - first established in 1977 - seems to have been effectively superceded by the standard of one supplier.

MUMPS seems to have become little more than a scripting language inside one suppliers' database product, and it seems you can, if you wish, use a form of BASIC instead. APIs are exposed for other languages.

For the sake of nostalgia, I took InterSystems up on their offer of a single-programmer free copy of Caché, the product that contains MUMPS, and it is currently running on my PC under Windows XP. (The MacOS and Linux distributions come on the same CD.)

It took me a while to get back into it and recall exactly why I disliked it so much. I could go on about it at length, but let me give you just one example. What do you think this code does:

	f  
I hope you admired my nice terminal colour scheme - it certainly feels like a blast from the past for me. So, what does the code do?

Well, I don't know if there's a language it is possible to write a more succinct infinite loop in. It takes four characters, and only one of them is visible. If you select the line, you'll see that it begins with a tab, and terminates with two spaces. The tab is compulsory to begin every line of code, and the two spaces denote that we are not providing any limiting parameters to the for loop - so it can go on repeating forever.

Nowadays, I could actually have written for in full without impacting on the performance of the interpreter, but when I was scraping a living supporting legacy code we were just emerging from the times when it made a significant difference. As a result, legacy code tended to look a malicious pixie with a bottle or three of the hard stuff inside him had performed the entirety of Riverdance across the keyboard.

I think there is now one programming language more horrible still than MUMPS in imbuing invisible characters with significance; but Whitespace is meant to be a joke!

People without any knowledge of software development can make an immediate and, in my view, accurate judgement as to which language is more easily supported if presented with a page of "classic" MUMPS and A.N. Other language.

But I'm cheating by giving you that code sample first. Just so you can say you've been fully versed in introductory MUMPS, here's the traditional first program known and loved by all:
	w "Hello world"

Comments

Posted by: Marcus L. Rowland (ffutures)
Posted at: February 2nd, 2006 07:53 am (UTC)

You forgot to put the tab before the w

Posted by: Gavin Greig (ggreig)
Posted at: February 2nd, 2006 09:16 am (UTC)

I wouldn't put it past myself to do that, but it is there - 	 - and I can see it displayed properly in current versions of IE, Firefox, Opera, Netscape, Lynx and SharpReader.

2 Read Comments