• JakeyC (unregistered)

    I'd like to think that after all that, the output is just "Hello World".

  • gac (unregistered) in reply to JakeyC
    JakeyC:
    I'd like to think that after all that, the output is just "Hello World".
    That might be the intended output, but it'll almost definitely just crash until National Instruments have helped troubleshoot it over the phone and pointed out which non-documented bits of version-specific code you need to insert, and which as-yet-unreleased toolbox you need to install to make it work.
  • Mike Caron (unregistered)

    What does it do? Without context, it may be justifiable.

    (That said, +1 for literal spaghetti code)

  • Madmanguruman (unregistered)

    That's actually fairly clean code compared to some LabVIEW that I've seen. If you want to really scare them, do a print-screen of the VI hierarchy for that pictured VI ... think "plans for the Death Star"...

  • QJ (unregistered)

    I just tried to edit it in Visio, having got it confused with the document that I'm in charge of keeping updated (another change in requirement, y'know). This sort of thing is worldwidely popular.

  • Donald (unregistered) in reply to Madmanguruman

    Waiting for scary print-screen.

  • 13olle (unregistered)

    yes looks very very familar.

    and its made me sad

  • Asiago Chow (unregistered)

    I'm not sure if this is why you should, or shouldn't, teach would-be software people some basic electrical engineering.

    On the one hand, if whoever wrote that interface hadn't been an EE, they wouldn't have used the schematic metaphor and the screenshot never would've bubbled up here.

    On the other...if the person freaked out by that image had learned to deal with schematics for even mildly complicated circuit boards, they would shrug off that image as nothing special and it never would've bubbled up here.

    Not judging the quality of the software depicted...I don't know what problems they were trying to solve and I've never used labview.

  • (cs)

    ...and can you find the six hidden lollipops in the picture?

  • Hoffmann (unregistered)

    Lollipops? I found walter (twice)!

  • undefined (unregistered) in reply to Mike Caron
    Mike Caron:
    What does it do? Without context, it may be justifiable.

    (That said, +1 for literal spaghetti code)

    Mach numbers, EPOS and Omega (), air and fuel pressures, position sensors... It must be something like F-35 aircraft or high-end swiss watch.

  • (cs) in reply to Hoffmann

    Why would early 21st century humans make something this complex and convoluted. No no no-- HOW could they make something this complex and convoluted. Not on their own-- no, wait, why was a better question. Yes, and the answer..

    [image]

    EXTERMINATE!!!!

  • J (unregistered)

    Nothing a stiff drink can't fix, especially when it is chased by a few more.

  • Herbert (unregistered)

    Great. So some people write ugly code in LabVIEW code. Can you find a language that a dedicated programmer couldn't write ugly code in with sufficient determination?

  • Zelda (unregistered) in reply to Hoffmann
    Hoffmann:
    Lollipops? I found walter (twice)!

    I only found Waldo...

  • (cs)

    Do you see what happens when test engineers try to avoid programming?

    Look at it!!!

    Repeat after me: "VI is TRWTF."

  • Will (unregistered)

    I think my favourite part is that they're using windows.

  • (cs)

    The Real WTF is Windows.

  • (cs) in reply to Mike Caron
    Mike Caron:
    What does it do?
    Credit card processing, of course. After all, it says VISA; no doubt the Mastercard and American Express are in a part of the program that is not visible.
  • (cs) in reply to Mike Caron
    Mike Caron:
    What does it do? Without context, it may be justifiable.

    (That said, +1 for literal spaghetti code)

    It controls a wind tunnel by measuring temperature and air pressure, and providing feedback to a wind generator, of course.

    BTW- All Labview code is spaghetti code. It's the "wires" that make it look that way.

  • (cs) in reply to Mike Caron
    Mike Caron:
    What does it do? Without context, it may be justifiable.

    (That said, +1 for literal spaghetti code)

    And a -1 to you for misusing the word "literally".

  • Anon (unregistered) in reply to QJ
    QJ:
    I just tried to edit it in Visio, having got it confused with the document that I'm in charge of keeping updated (another change in requirement, y'know). This sort of thing is worldwidely popular.

    I think you might have misunderstood. That isn't a document describing the LabView program. LabView is a graphical programming language, and that is the ACTUAL LabView program.

  • (cs)

    This is naturel for most proceses. Once proces is imploding it will show less complex diagram. Once you explode proces, it will get huge, cumbersum and complex.

  • Nagesh (unregistered) in reply to JakeyC
    JakeyC:
    I'd like to think that after all that, the output is just "Hello World".
    Well said, from point of view user who write complexity only of "Hello, World!" program. Now, if you exusing Nagesh, I will writing some serious code.
  • tarnold (unregistered)

    You can do a Google picture search for [cycling74 Max] and find similar pictures, this is how programs in graphical programming languages look like. Max is designed for real-time audio synthesis and DSP, and if you've ever seen a classical analog synthesizer environment, the usual cable chaos literally looks like Spaghetti...

  • tarnold (unregistered)

    You can do a Google picture search for [cycling74 Max] and find similar pictures, this is how programs in graphical programming languages look like. Max is designed for real-time audio synthesis and DSP, and if you've ever seen a classical analog synthesizer environment, the usual cable chaos literally looks like Spaghetti...

  • Pete (unregistered) in reply to Madmanguruman
    Madmanguruman:
    That's actually fairly clean code compared to some LabVIEW that I've seen. If you want to really scare them, do a print-screen of the VI hierarchy for that pictured VI ... think "plans for the Death Star"...

    Many Bothans died to bring us this information

  • grumpy (unregistered) in reply to Herbert
    Herbert:
    Great. So some people write ugly code in LabVIEW code. Can you find a language that a dedicated programmer *couldn't* write ugly code in with sufficient determination?

    Whitespace...?

  • Yair (unregistered)

    That code is terrible (and that's the programmer's fault, not LabVIEW's), but if I had to guess, I would guess that it probably does mostly work.

    Also, with terms like pitch, yaw, mach, air and tunnel strewn around the code, I wouldn't be surprised if the wind tunnel option someone referred to earlier is the correct answer.

    P.S.:

    [image]

    P.P.S. Here are some other bad LabVIEW diagrams I collected over time. The tinted floating window shows a zoomed out version of the code:

    [image] [image]
  • (cs)

    This map is confusing. All the big arrows point east and I can't find the interstate anywhere. Who labeled this thing?

  • Axel (unregistered)

    Doesn't look more cryptic than Haskell

  • wingcommander (unregistered)

    I think you might have misunderstood. That isn't a document describing the LabView program. LabView is a graphical programming language, and that is the ACTUAL LabView program.

    Exactly so. I use (and sometimes teach) Labview. Many people who use text-oriented languages hate it. However- when used properly- (and this example is a long way from "properly") it can be efficient to write, hierarchical, and re-usable.

    One of the challenges in teaching Labview is persuading people to forget (temporarily) text-based languages.

  • (cs)

    Is it actually possible to draw / write clean code in LabView? It kind of looks like a filmstrip, is there a direction to follow?

  • A Gould (unregistered) in reply to Herbert
    Herbert:
    Great. So some people write ugly code in LabVIEW code. Can you find a language that a dedicated programmer *couldn't* write ugly code in with sufficient determination?

    Lolcode. Fairly sure anything written in that language is funny by definition.

  • Steve (unregistered)

    Would some of the LabView evangelists please post screenshots of LabView programs that aren't incomprehensible? I've never seen one before. (That last one by Yair is about the best I've ever encountered).

  • Meep (unregistered)

    Yar, used labview once, didn't think it was a bad concept, but there's way too much futzing around to line things up neatly.

    (Not that I haven't seen people spend hours drawing box comments in ASCII...)

  • Meep (unregistered) in reply to Steve
    Steve:
    Would some of the LabView evangelists please post screenshots of LabView programs that aren't incomprehensible? I've never seen one before. (That last one by Yair is about the best I've ever encountered).

    Not an evangelist, but I've used it and thought that, while it takes some work to understand, it's not bad.

    Any complex machine is going to take some work to comprehend. Ever tried reading a patent?

  • (cs) in reply to Kiss me I'm Polish
    Kiss me I'm Polish:
    Is it actually possible to draw / write clean code in LabView?
    No, it's impossible. When a single boolean or arithmetic operation takes at least three drawings and two wires then you're in for a WTF.
  • Boris Vladamir (unregistered) in reply to Nagesh
    Nagesh:
    This is naturel for most proceses. Once proces is imploding it will show less complex diagram. Once you explode proces, it will get huge, cumbersum and complex.
    Typical American stupidity. I heard story of United States Space Program's engineering of a pen to work in zero gravity whereas the Cosmonauts simply brought pencils!
  • just me (unregistered) in reply to tarnold
    tarnold:
    You can do a Google picture search for [cycling74 Max] and find similar pictures, this is how programs in graphical programming languages look like. Max is designed for real-time audio synthesis and DSP, and if you've ever seen a classical analog synthesizer environment, the usual cable chaos literally looks like Spaghetti...
    Not true. You can actually write quite clean and understandable code in MaxMSP once you know the caveats and apply some discipline (and probably in LabVIEW too, but I've never done anything in this order of complexity in LabVIEW).

    In this respect, graphical programming is not very much different from textual programming.

    I would post some screen shots, but my Max patchers are at home and I am at work.

  • tom103 (unregistered)

    TRWTF is LabView...

  • (cs) in reply to tom103
    tom103:
    TRWTF is LabView...
    Seriously, it sits way above VB and PHP in the scale of WTFness
  • Harold III, Sr. (unregistered) in reply to Boris Vladamir
    Boris Vladamir:
    Nagesh:
    This is naturel for most proceses. Once proces is imploding it will show less complex diagram. Once you explode proces, it will get huge, cumbersum and complex.
    Typical American stupidity. I heard story of United States Space Program's engineering of a pen to work in zero gravity whereas the Cosmonauts simply brought pencils!
    I've always found that story odd: people bragging about not being able to engineer something that works in zero gravity? What do you do with the pencil shavings? They didn't have digital pencils back in the '60s.

    Clearly, the Americans are the bright ones in this story, and the Russians are little brighter than the monkeys we sent up.

  • mung (unregistered)

    It is actually possible to produce clean, well documented code in LabView. I write tons of LabView code, and none of it looks like that! NI provides style sheets, and design patterns that programmers can use to create neat diagrams. That being said, LabView does provide spaghetti coders a whole new realm of possibilities. It is incredibly easy to end up with a rats-nest if you do not know what you are doing.

  • Meep (unregistered) in reply to HellKarnassus
    HellKarnassus:
    Kiss me I'm Polish:
    Is it actually possible to draw / write clean code in LabView?
    No, it's impossible. When a single boolean or arithmetic operation takes at least three drawings and two wires then you're in for a WTF.

    Computers are hard!!!!! Call the waaaaaaaahmbulance!

  • Meep (unregistered) in reply to Harold III, Sr.
    Harold III:
    Boris Vladamir:
    Nagesh:
    This is naturel for most proceses. Once proces is imploding it will show less complex diagram. Once you explode proces, it will get huge, cumbersum and complex.
    Typical American stupidity. I heard story of United States Space Program's engineering of a pen to work in zero gravity whereas the Cosmonauts simply brought pencils!
    I've always found that story odd: people bragging about not being able to engineer something that works in zero gravity? What do you do with the pencil shavings? They didn't have digital pencils back in the '60s.

    Clearly, the Americans are the bright ones in this story, and the Russians are little brighter than the monkeys we sent up.

    Clearly the idiot is someone who thinks they're going to have graphite dust floating around sensitive electronics.

  • Steve (unregistered) in reply to Meep
    Meep:
    Steve:
    Would some of the LabView evangelists please post screenshots of LabView programs that aren't incomprehensible? I've never seen one before. (That last one by Yair is about the best I've ever encountered).

    Not an evangelist, but I've used it and thought that, while it takes some work to understand, it's not bad.

    Any complex machine is going to take some work to comprehend. Ever tried reading a patent?

    I don't expect to take one look and instantly know what it does, I just want to see a screenshot that doesn't look like a rats nest. I want to get a sense of organization. I shouldn't have to print the whole dang thing out and trace it with highlighters to figure out how things are connected. That's why I pointed out Yair's screenshot -- the second one does actually appear to have a "flow", but it's just a little too dense.

    Just saying "yeah, I write really great LabView code all the time" isn't very convincing. Pics or it didn't happen.

  • Peter (unregistered)

    If this is actually the control program for a transsonic wind tunnel, as it appears to be, TRWTF is using Labview to control something that can kill you.

    Somone has much more faith in National Instruments and Labview than I do.

  • (cs) in reply to Meep
    Meep:
    Harold III:
    Boris Vladamir:
    Nagesh:
    This is naturel for most proceses. Once proces is imploding it will show less complex diagram. Once you explode proces, it will get huge, cumbersum and complex.
    Typical American stupidity. I heard story of United States Space Program's engineering of a pen to work in zero gravity whereas the Cosmonauts simply brought pencils!
    I've always found that story odd: people bragging about not being able to engineer something that works in zero gravity? What do you do with the pencil shavings? They didn't have digital pencils back in the '60s.

    Clearly, the Americans are the bright ones in this story, and the Russians are little brighter than the monkeys we sent up.

    Clearly the idiot is someone who thinks they're going to have graphite dust floating around sensitive electronics.

    yes pencil shaving is dangerus in instruments in space. Boris (fake rusian) you have been outed. so quit posting.

  • HipHopAnonymous (unregistered)

    I programmed a fair bit of LABView in college. The trick to writing clean code is utilization of modules, sequence frames, and loop structures, which is obviously not happening here. LABView isn't terrible for non-programmer types, and it has great libraries for connecting to various instruments, but I wouldn't go back to it unless I absolutely had to.

Leave a comment on “Labview Spaghetti”

Log In or post as a guest

Replying to comment #347194:

« Return to Article