• Rick Poleshuck (google)

    And still more readable than APL.

  • Little Bobby Tables (unregistered)

    My face feels a little bit swollen and tender, and I think I'm a little feverish. I think I'll go home.

  • (nodebb)

    I feel sick reading this.

  • Ano (unregistered)

    I agree with the last comment whenever I see MUMPS: ;don't hang around if there's no need Accidents are waiting to happen, otherwise.

  • Latengo Rica (unregistered)

    The comments do not anywhere say that the %uForceBkg flag has anything to do with the time zone.

    "Will fork off from the current process if the correct OS-level user is already specified, unless the %uForceBkg flag is set."

    This sentence ends in a full stop. After the full stop, there is a new sentence, about time zones. That new sentence has nothing to do with %uForceBkg.

    The documented behaviour is:

    1 If the correct OS-level user is already specified, and %uForceBkg is not set, just fork off from the current process. 2. If the correct OS-level user is not already specified, forking is WRONG, so submit it to the background. 3. If %uForceBkg is set, forking is NOT WANTED, so submit it to the background.

    This is clear and unambiguous and even makes sense. It also has nothing to do with time zones.

    Now, as far as the rest of the article is concerned, it may be that the implementation of this is inadequate, or buggy, or partial. But the function of %uForceBkg is clearly stated, once you understand that a full stop marks the end of a sentence.

  • Zach (unregistered)

    Sometimes I end up crying when reading an article on this site. Today was one of those days :)

  • HL7rkah (unregistered)

    This code is frequently found in Hospitals/Electronic Health Records (EHR) systems for high transaction processing. It accesses its internal database(s) directly, no other layers exist. Last I knew MEDITECH used some form of this. Its a wild ride to deal with, and I'm still a bit scarred from all that time in healthcare. Never again.....

  • Matt (unregistered)

    The fact that it has comments at all makes it more readable than most of the mumps I saw at the VA.

  • Chronomium (unregistered)

    I like how the code blocks are formatted with code class="mumps" despite the syntax highlighter not doing anything with it.

  • ray10k (unregistered) in reply to Latengo Rica

    The "description" section of the comment does state, Will fork off from the current process if the correct OS-level user is already specified, unless the %uForceBkg flag is set. It will always start in the system default time zone.

  • MiserableOldGit (unregistered) in reply to Latengo Rica

    You beat me to it, I agree.

    I'd say that, based on that, the true bug is that the so called if statement is has buggered up logic, but I'm no Mumper. What I do know is the apostrophe preceding %uForceBkg negates it, so current behaviour says if the background user is valid and we're not "Forcing", do this thing. I suspect an else if block was forgotten for the override scenario, as we'd likely need some jiggery pokery to create a new process.

    The comment says it will fork off the current process if the supplied background user is correct unless the force flag has been set, which is what would then happen.

    It's a bit crufty to have that sort of override in a background process, but that kind of rot just creeps in to code bases after a while.

    Reads like a simple error of omission has now been replaced be something worse!

  • MiserableOldGit (unregistered) in reply to ray10k

    The time zone comment is a separate sentence unrelated to the ForceBkg bit, the full stop is just a clue there.

  • ern0 - Zalka Ernő (github)

    The problem is not MUMPS, but check the number of parameters for this function: RunBkgJob(%uOrigRou,%uJobID,%uBkgTag,%uVarList,%uJobParams,%uError,%uForceBkg,%uVerifyCond,%uVerifyTmo)

    MUMPS was key-value database before it was cool, it was object-oriented database before it was invented, and also it was pretty quick. It ran a company with 30-50 workstations on a PDP-11/40 (-clone, the Hungarian TPA-11/40 with 256 kBytes of memory, then on a HP PA-risc with 64 Mbyte of memory.

    It was a pretty good choice for enterprise purposes, much better than dBase/Clipper/Foxpro with Novell Netware file server.

  • Dave (unregistered) in reply to Latengo Rica

    What do you think 'it' refers to?

  • Rod (unregistered) in reply to Latengo Rica

    The comments do not anywhere say that the %uForceBkg flag has anything to do with the time zone.

    I believe the author knows this. It was an attempt at humor.

    http://articles.chicagotribune.com/1989-06-11/features/8902080413_1_impaired-mister-language-person-humor-column

  • Somebody Somewhere (unregistered)

    The real WTF is submitting the request to %ZeUMON without first offering %ZeUMON the appropriate rites and sacrifices.

  • Developer Dude (google)

    Gibberish

  • airdrik (unregistered) in reply to Dave

    The function itself (as all sentences in that description use as the implicit subject, as is not altogether uncommon in documentation). It certainly doesn't make any sense to expect the parameter to do anything but modify some behavior of the function (which behavior was specified wholly in the preceding sentence and again in the description for the parameter itself which also makes no reference to time zones, which should in turn remove confusion about the effect of the parameter on the timezone).

    (trwtf is Remy and anyone else reading that description and trying to construe it to imply that the uForceBkg flag has anything to do with timezones?)

  • Cache4Life (unregistered)

    Honestly, the two M function headers were easier to read than 90% of these comments. Hello, Jerd!

  • I dunno LOL ¯\(°_o)/¯ (unregistered) in reply to Rick Poleshuck

    APL? It's all Greek to me.

  • (nodebb)

    IME it is bad to introduce new ideas/subjects mid-paragraph. They did this correctly for each of the other description lines, just not this one about timezones. Not only that, but they introduced "full stop" after having established a pattern of not needing them. For instance, this is the description text without carriage returns:

    ; DESCRIPTION: Submit request to monitor daemon to run the specified tag as a background process Used to ensure the correct OS-level user in the child process Will fork off from the current process if the correct OS-level user is already specified, unless the %uForceBkg flag is set. It will always start in the system default time zone.

    Are we expected to believe that, since there is no full stop until the part about timezones, that that entire "sentence" is one single idea? You can't have it both ways!

  • I'm not a robot (unregistered) in reply to Tsaukpaetra
    You can't have it both ways!
    Sure you can, because the comments are read by humans, who are (mostly) smart enough to overlook trivial inconsistencies like that and figure out the obvious meaning.
  • airdrik (unregistered)

    Are we to believe that the people who review the documentation can't figure out what constitutes a whole thought vs. where the boundaries are? It was obvious to me and Latengo Rica how to parse that documentation; perhaps it just took a grain more intuition (just enough to trip up most natural language processors) to arrive at the proper conclusion that the last sentence wasn't linked to the flag mentioned in the previous one.

    Sure it wouldn't pass a technical writer's inspection (Probably should have added full stops at the ends of each of the single-line sentences once the multi-line sentence was added, as well as moving that last sentence to its own line, plus removing the opening "it" in that sentence to match how the others refer implicitly to the subject being described), but it's descriptive enough for anyone who needs to read it (may $deity have mercy on their soul).

    (I would hardly describe any of that in terms of paragraphs, except maybe to call the whole thing a single paragraph as it is all relating to the subject of the function being described, despite being laid out in multiple lines)

  • Deve Stickmann (unregistered)

    #Nnnn

  • Benjamin (unregistered)

    After graduating in '06, I had a phone interview and coding exam for a company in the midwest that uses MUMPS extensively. At the time, I was disappointed when they turned me down. In retrospect, it may be the greatest thing that's happened to me in my whole career.

  • siciac (unregistered) in reply to Tsaukpaetra

    IME it is bad to introduce new ideas/subjects mid-paragraph. They did this correctly for each of the other description lines, just not this one about timezones. Not only that, but they introduced "full stop" after having established a pattern of not needing them. Are we expected to believe that, since there is no full stop until the part about timezones, that that entire "sentence" is one single idea? You can't have it both ways!

    And here I thought the customers in those late night infomercials were actors.

  • Judy (unregistered)

    Isn't that interesting?

  • Joe Malin (unregistered)

    My brother has made a career as a MUMPS developer. I have new respect for him. This post also proves what I've always believed about him.

  • Vic (unregistered)

    Damn. I'd totally forgotten about the existence of MUMPS.

    And now, I can't remember if I ever used it, or had seen a program written in it, or if someone just complained to me about them having to use it.

    On the one hand, none of the code, or the explanation, looks familiar, so I probably never used it or saw a program in it.

    But on the other hand, it's possible that my brain walled off everything I knew about it as a self-preservation mechanism.

  • (nodebb)

    OH GOD. it's like someone opened a file written in some actual normal programming language, but the read operation got mistakenly offset by half a byte, and all that data still got somehow parsed into vaguely text-like output.

  • Dave (unregistered) in reply to airdrik

    You missed the point I er... didn't actually make yet. There's a clear ambiguity here. Does 'it' refer only to the preceding sentence, or is it a separate comment applying to the whole thing? I haven't a clue if that's a big deal or not.

  • B (unregistered)

    Why would you use the person's real name? You idiot you got someone fired today.

  • (nodebb)

    Okay, articles about MUMPS should have 'TRIGGER WARNING: MUMPS' at the top for people who still have PTSD about this issue. But since I'm already in therapy and I picked the scab off my brain long enough to look at the code here, I can point out:

    The article inverts the logic, not that it matters much:

    i '%uForceBkg,$$zValidBkgOSUser() d q %uRet

    The apostrophe means 'not', so if this were written in a proper language, it would look like this:

    if( (! uForceBkg) && zValidBkgOSUser() ) { // except MUMPS doesn't have short-circuit logic ZdDEBUG.inheritOff() uRet = ZdUJOB(uBkgTag,"",uVarList,uJobParams['ZeDIR'],uJobParams['ZeNODE'],zTZSystem[1],"","","","",uJobParams['ZeOvBk']) ZdDEBUG.inheritOn() return uRet }

    The orderlies want me to go back to my cell now, I guess the screaming is bothering the other inmates.

    Addendum 2018-08-16 10:47: It turned out even worse. I don't know how to do code formatting in dailywtf comments.

  • Anon (unregistered)

    RIP Alex. Hope you didn’t want to keep your job.

  • airdrik (unregistered) in reply to Dave

    I understand that there appears to be a grammatic/syntactic ambiguity due to the sloppy way they composed that line, which makes it seem almost as though "it" could have been referring to the field being introduced in the subordinate clause of the previous sentence. However, once you consider the greater context it becomes apparent that "it" must refer to the function.

    I have to admit that when I first read through the code my eyes first trained to the Parameters section to find the comment on the parameter in question which has a rather precise description which makes no reference to time zones. Having skipped the Description (of the function) entirely read the next paragraph scratching my head why they seemed to be caught up on time zones.

  • Bart (unregistered)

    I did a summer course in MUMPS when I was in med school. Saw some of that code back 15 years later. Could not understand a single line or even word/character I wrote back then...

  • Nobody (unregistered)

    FWIW, this code is from the Epic Systems Corporation's software and the developer who posted it here got fired for doing so. A little birdie told me.

  • Burrito (unregistered)

    Alex F was actually fired yesterday because of this post.

  • Cat (unregistered)

    There's really no WTF here at all. The entire TL;DR version of this story is: function call behaved unexpectedly because the caller didn't read what the parameters did. Seems pretty clear to me that the time zone thing was just discussing what timezone the new process would run in, and was unrelated to that parameter.

    Yes, M syntax takes a few weeks to get used to, but it's no harder to learn than any other non-C-style language. It's a procedural language, so anyone who's done any C-style language can pick up the overall flow and structure of the code pretty easily. It's not even close to the hardest language I've learned.

  • Friedrice the Great (unregistered)

    (Crosses MUMPS off career development list)

  • (nodebb)

    As someone who writes .NET services that have to interface with a large MUMPS system, I deal with code like this on a daily basis. The thing that has always astounded me most, isn't the indefensible 'features' of MUMPS, like failing to provide any sort of data integrity in the inbuilt database (s DOB="light bulb", sure... I mean everything is a string so that works), or the ability to execute dynamic code contained within variables (which must make our Security Team have regular cardiac episodes), or even the complete lack of functional structure in 'routines'. The thing I found most astounding is how much of a cult is built up around this product. Those who are in, have truly drunk the Kook-Aid, to an astounding degree. No one is allowed to question the almighty MUMPS. To do so is banishment and a guarantee of a dead end career in a MUMPS shop. To hear them speak, you'd swear MUMPS is the peak of software development, and no other languages, tools or work ever needs to be considered... ever. To those who've never had to experience the nightmare that is MUMPS, or the thinly veiled not-MUMPS known as Cache, consider yourselves extremely lucky.

  • (nodebb) in reply to Tsaukpaetra

    No, we are not supposed to read all that as one single thought up until the bit about time zones. Fortunately, English has some redundancies that can work as error checking: the capital W in “Will” shows that a new sentence begins, from which we can conclude that the writer missed to mark the end of the previous one with a full stop.

  • Nobody (unregistered)

    Ctrl-F perl

    Disappointed :(

  • Propertius (unregistered)

    I've said it before and I'll say it again: if people just programmed in assembler, as God and Seymour Cray intended, there would be a lot less bad software in the world.

  • (nodebb)
    Comment held for moderation.

Leave a comment on “Isn't There a Vaccine For MUMPS?”

Log In or post as a guest

Replying to comment #:

« Return to Article