HN user

btwrto

2 karma
Posts0
Comments2
View on HN
No posts found.

It's a language that predates C. Maybe some the things that you take for granted are not there, and some syntax is weird, and order of evaluation is strict left-to-right. (i.e. "'x+1=2+3" first computes 'not x', i.e. 0 or 1 if x=1 or x=0 respectively, then adds 1 to the result, then compares that result to 2, then adds 3 to that result, giving either 3 or 4 as a final answer).

but if you write controlled, sensible code, then it's actually not. certainly never my language of choice but it it's not just still used due to inertia... it's pretty fast, it makes database interaction easy, it's pretty easy to understand if the code isn't doing something awful like assuming variables and relying on hidden state. (which you can do, yes.)

if you're talking about the Daily WTF articles, then no it's not nearly as bad as those articles would imply. I worked for a company that is probably featured in one, but not all, of those articles... we had good tools, good coding standards/dev process, a good internal API/libraries that do quite a lot, and sensible people. Under these circumstances it was not bad--I'd actually grown quite fond of it. (No codebase of a large old company will be WTF-free but this isn't language-specific. I don't think any actual code from those Daily WTF articles actually comes from that company...)

Also, "A Case of the MUMPS" gets many things wrong.

'Scope of IF and FOR is "remainder of current line."' Nope. That's what 'do' is for. Note that ';' comments out everything to the right on the same line.

    for i=1:1:100 do  ; equivalent to 'for(int i=1;i<101; i++) { }', with the lines below indented with a period serving as the body of the brackets  
    . write !,"line 1 of code block, iteration "_i
    . write !,"line 2 of code block, iteration "_i
    . write !,"line 3 of code block, iteration "_i
    write !,"Done with loop" ; this gets executed after the for loop
Note that I'd actually write this as 'f i=1:1:100 d' and 'w "string"' in place of "for i=1:1:100 do" and 'write "string"'. It's just as easy to read if you know the language, especially if you have nice syntax highlighting, and easier to write. Which brings me to...

'To edit the code stored in the “database”, developers needed to use the internally-created text editor.'

Not in our case, and this makes me wonder how long ago this guy's experience was. in our case, the vendor provided an IDE and we also had our own, written in C#, which is actually my favorite IDE from any language.

Those are horror stories, recall. If you want to write bad code then you can do it in any language. These stories don't resemble what I have experienced. (I work for a healthcare software company in Wisconsin.)

In particular, a sensible coding style and sensible development practices (yes, name your variables sensibly! yes, use source control! yes, have code review and automated tools to catch common errors) can remove the bad. It also helps if your company wrote its own (quite good) IDE for the language so you don't have to use Intersystems'.

Honestly the most fun thing about M/MUMPS/Caché is that there's very little boilerplate and you can write sensible code quickly. It's like being stuck with Java and then suddenly moving to Python or Ruby. (With, yes, a few pitfalls that these languages don't have, and quite a few features missing. I still prefer modern languages for personal projects. But you quickly pick up a sense for practices to avoid.)

I can't say all companies that use Mumps are great places to work. But mine honestly is. </soapbox>