I hated JavaScript before I got MUMPS

While there are both old and newly-minted ways to extend the browser run-time environment with various add-ons, several coming from some very big players, if you want to write software and keep to the browser as your client-side run-time platform without such add-ons, then JavaScript (ECMAScript, to be precise) is your only choice.

I avoided JavaScript for a long time. I was initially appalled by the name of the language, first because of the word “script” in it (had we not gone beyond procedural languages?) and then with the word Java in it, when there was no Java to be found. I read some code written in the language way back when and wasn’t impressed.

Later I gave it a try. A few years back I had an opportunity to write a little JS code and, son-of-a-gun, I liked it. It felt comfortable. Were it not for things like closures, it might even seem as straight-forward to write as BASIC and Fortran. Why did we move beyond procedural languages again? No, don’t answer, I’m not in the mood for that discussion.

I’m not a language theorist nor even an expert connoisseur of a wide variety of computer languages, but I have used several in production code and I’ve taught four languages at the college level.  I have not been all that picky in some respects, as I have liked most languages I have tried. Now I even like JavaScript. That’s good, because we are using it in this project. I hope to learn it better over the course of the next few years.

My initial distaste and subsequent appreciation for JavaScript has led me to be overly incautious when jumping into Cache’, I suspect. We are writing the software that runs on the server-side using MultiValue BASIC enhanced by InterSystems for object-oriented programming. The libraries we are using are all written in another language-Cache’ Object Script (COS). This language is pretty much the old MUMPS (aka M) language enhanced over time and also enhanced with OO constructs.

In Java it might be

Dog myDog = new Dog();

In COS if Dog were delivered for use by us in programming, that would be

Set myDog = ##class(%SystemPackage.Dog).%New()

This is but a small hint at how funky characters are strewn throughout the language. Before I give any more of my two cents about COS, I better note that I am very happy working with InterSystems and with the people who work there. The MV, Zen (AJAX), SQL, and other teams have been very helpful. They hire very intelligent people, many with more patience than I will ever have. The MV implementation is solid, especially for being the newest major implementation of MultiValue. I’ll admit that I’m sucking up (hey, they know the answers to my questions and I’m gonna continue to need their help), but I am not exaggerating. 

Our biggest learning curve has come from working with Cache’ in places that extend typical MultiValue functionality, where COS/MUMPS-like thinking seems to be around every corner.  When I looked at COS originally, I didn’t like it. Recalling that I did not like JavaScript at first either, I figured it would be fine, I just had to try it and warm up to the language. Plus I only had to learn to read it enough to understand examples or for debugging purposes, not to write it, I figured, since we are writing our source code in MultiValue BASIC for the server-side and JavaScript for the client-side, combined with XML specifications for web page components.

Anywhere in Cache’ that a developer can write COS, we should be able to write MVBASIC instead, in theory. This has mostly panned out, except in some places in Zen, the AJAX framework, such as those where the code being written is a parameter value that must be written in COS. I didn’t want to have any COS in our source code, but there is a little bit at this point.

Well, shucks. I have been looking at COS code for more than a year now and I hate to say it, but I like it even less than I did when I started. It seems to be the reason why in Zen “everything compiles and nothing runs,” as one developer put it. It is also dog ugly (no offense to canines), with tons of non-alpha special characters to make the language far from Grace Hopper’s vision for computer languages, I suspect.

Most AJAX examples distributed by InterSystems are in COS. Most of the doc assumes you know COS. I feel that this language keeps getting in the way of us coming up to speed in writing MV BASIC web-based software. I want it to go away. If the delivered examples and the libraries of delivered components were written in MV BASIC and JavaScript, just like we will be writing them, that would cut the learning curve for the team down considerably,  I would think. Over time, we should have enough examples in our code to help anyone new to the project get off the ground without reading much COS, knock on wood.

I thought perhaps if I wrote some COS myself I would like it better, just as I did with JavaScript. Well, I’m not at all proficient in COS, but I did write a little and I’m not there yet. I like the Cache’ data model, on top of which the MV data model is written, but the COS language still messes with me when I see it. In addition to all of the funky characters are words like “kill” in common use. I don’t want to read the word “kill” while I am working. While the language has not yet resonated with any of the male developers on our team either, I can’t help but wonder how many women in the world are drawn to this language.

I’m guessing I should go for some immersion therapy and really try to learn it rather than sticking with my avoidance stance, but for now I’m putting “MUMPS skills” in the same category as great artistic skills–I’m not able to drum them up myself, so someday I might have to pay for them.

Advertisements

One response to “I hated JavaScript before I got MUMPS

  1. Hey there, I was wondering if you might know any developers who have solid cache objectscript and zen background….I’d love to talk to them. I greatly appreciate any help you may be able to offer. Best, Lisa

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s