User: Password:
|
|
Subscribe / Log in / New account

Turning VistA into a "real" open source project

Turning VistA into a "real" open source project

Posted Mar 19, 2011 10:15 UTC (Sat) by dark (guest, #8483)
In reply to: Turning VistA into a "real" open source project by njs
Parent article: Turning VistA into a "real" open source project

In another thread about VistA, I quoted a snippet of WorldVistA code. I reproduce it here so you can judge for yourself. I didn't go out of my way to choose a particularly bad snippet, this is just a random bit:

; get billing info from 350
; first find the charges and sort
K ^TMP("IBECEA",$J)
S Y="" F S Y=$O(^IB("AFDT",DFN,Y)) Q:'Y I -Y'>IBEDT S Y1=0 F S Y1=$O(^IB("AFDT",DFN,Y,Y1)) Q:'Y1 D
. S IBX=0 F S IBX=$O(^IB("AF",Y1,IBX)) Q:'IBX D
.. Q:'$D(^IB(IBX,0)) S IBZ=^(0)
.. Q:$P(IBZ,"^",8)["ADMISSION"
.. I $P(IBZ,"^",15)<IBBDT!($P(IBZ,"^",14)>IBEDT) Q
.. S ^TMP("IBECEA",$J,+$P(IBZ,"^",14),IBX)=""
There's another two million lines of this, in about 25000 tiny files with names like IBCNEHL3.m Of course, it's possible that none of this is a problem with the language, and the programmers of this project happened to like to write their code that way. I just don't think it's likely.


(Log in to post comments)

Turning VistA into a "real" open source project

Posted Mar 19, 2011 15:19 UTC (Sat) by Guhvanoh (subscriber, #4449) [Link]

And all that snippet is doing is looping thru the global IB, checking some conditions and setting up a temporary global. It is pretty easy to read when you know what the commands are: K kill; S set; F for; Q quit; I if. I don't know what all the fuss is about. MUMPS is a pretty easy language to pick up. For instance the line '.. Q:'$D(^IB(IBX,0)) S IBZ=^(0)' just means go on to the next iteration if there is no data at the node ^IB(IBX,0) else set IBZ equal to the data held at that node. Yep, $D is used to test for existence. I guess that's enough MUMPS for today.

Turning VistA into a "real" open source project

Posted Mar 20, 2011 20:27 UTC (Sun) by vonbrand (guest, #4458) [Link]

Looks something like Teco...

(Or line noise during a particularly bad thunderstorm ;-)

Turning VistA into a "real" open source project

Posted Mar 20, 2011 21:29 UTC (Sun) by jthill (subscriber, #56558) [Link]

However, just a few commands suffice to get real work done, and a novice TECO user can begin creating and editing text files after only a few hours of instruction.

Gonna see if I can't remember more than IHELLO$0TT$. What the hey. Maybe this'll get me to write a vi shell function to refuse to create a file, make you type vim to get it to make one; I still miss that.

And of course you know the first file I made, right?

Thanks for the link.

Turning VistA into a "real" open source project

Posted Mar 27, 2011 20:29 UTC (Sun) by rtweed (guest, #73902) [Link]

I'd suggest looking at this series of postings and their comments before exercising the usual tired old ill-informed prejudices about the Mumps language once more:

http://programmers.stackexchange.com/questions/5490/is-mu...

In summary:

Yes, there are historic reasons why the arcane style of coding in old VistA code was used.

No, a modern developer would not code this way (unless they were either having to maintain old legacy code or inept)

Like it or not, VistA has been highly successful, unlike the many eye-wateringly expensive failed attempts over the years to replace it with "better" or "more modern" technologies. Go figure, as they say in the US.

Turning VistA into a "real" open source project

Posted Mar 27, 2011 22:12 UTC (Sun) by vonbrand (guest, #4458) [Link]

Alfred North Whitehead said it best: "It is a profoundly erroneous truism, repeated by all copy-books and by eminent people when they are making speeches, that we should cultivate the habit of thinking of what we are doing. The precise opposite is the case. Civilization advances by extending the number of important operations which we can perform without thinking about them. Operations of thought are like cavalry charges in a battle — they are strictly limited in number, they require fresh horses, and must only be made at decisive moments." (thanks to Wikiquote)

Turning VistA into a "real" open source project

Posted Mar 28, 2011 6:12 UTC (Mon) by dark (guest, #8483) [Link]

Prejudices? I wasn't exercising any prejudices. I went and actually looked at the VistA source code and I posted what I found. Then I drew conclusions based on what I found. Indeed, those conclusions are not based on what the code might have looked like if VistA were written again today, but I don't think that's a flaw.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds