Live data from Hacker News

Ask HN: Why does visual programming suck?

news.ycombinator.com

141–150 of 325 posts

Re: Ask HN: Why does visual programming suck?

#142

It doesn't suck if your code involves complex flows of relatively simple data. Programs like Reaktor and Max MSP have been hugely successful for this kind of coding in the music world. If your data structures are more complex and require more convoluted logic, which is more often the case than not, then the benefits of visual programming diminish and the downsides are much more apparent.

I've seen a research lab in Tokyo use Max MSP for controlling the motion of a humanoid robot (using pneumatic actuators). I believe that whenever there is some flow involved it is easier to model it graphically than textually.

Re: Ask HN: Why does visual programming suck?

#143
Unreal has a VPL and it is a pain to use. A simple piece of code takes up so much desktop real estate that you either have to slowly move around to see it all or have to add more monitors to your setup to see it all. You think spaghetti code is bad imagine actually having a visual representation of it you have to work with. Organization doesn't exist you can go left, up, right, or down. If you ever try to enforce coding standards think about adding x and y coordinations and other location standards. Finally I could only imagine the black magic that goes along with such a thing. Visual studio black magic is already horrible to deal with one little hiccup and you are lucky if all you have to do is create a new project and migrate your files/folders over to it.

Re: Ask HN: Why does visual programming suck?

#144
post #35

Earlier quoted context omitted.

> I do believe that a better code editor is possible through non-plaintext programming. (Serialize token trees and ASTs, instead of plaintext.) Funnily enough, this is itself another of those mirages, like visual programming, that have been chased for years and failed to gain traction (outside specialised applications). For my money, the reason for this is that a human editing code needs to write something invalid -…

I've been thinking along the same lines. The "fighting your editor" problem cannot be ignored, and it's common in VPs. Real programming code needs "jank". We need to be able to move between different states: Bags of characters Unstructured trees of tokens ASTs (BTW paredit is super cool and I'd like to see more of its kind!)

Thing is, the architecture you just described is a modern IDE with refactoring etc.

This is a well-trodden road. It starts with "wouldn't it be awesome if we could manipulate everything as ASTs", then usability intervenes and we fall back to "well, we need to be able to selectively edit as text", which means you need to be able to convert everything to bags of characters and back. And now you've built that conversion, you might as well represent the "source of truth" as bags of characters like everyone else does.

Re: Ask HN: Why does visual programming suck?

#145
post #35

Earlier quoted context omitted.

I've been thinking along the same lines. The "fighting your editor" problem cannot be ignored, and it's common in VPs. Real programming code needs "jank". We need to be able to move between different states: Bags of characters Unstructured trees of tokens ASTs (BTW paredit is super cool and I'd like to see more of its kind!)

Thing is, the architecture you just described is a modern IDE with refactoring etc. This is a well-trodden road. It starts with "wouldn't it be awesome if we could manipulate everything as ASTs", then usability intervenes and we fall back to "well, we need to be able to selectively edit as text", which means you need to be able to convert everything to bags of characters and back. And now you've built that conversion…

I agree with what you're saying, except the last part. Using ASTs as the source of truth (embedded in a source control forest) has benefits that are worth the difficulty.

Re: Ask HN: Why does visual programming suck?

#146

I think visual programming is one of those ideas that intuitively seems like a good idea but never is. Thus, it never really dies, it just gets picked up as a kind of rite-of-passage by new generations of developers. Managers also tend to like the concept as it would allow them to bypass the pesky code monkeys and just feed their drawings to the computer. For my master's thesis, some 15 years ago, I programmed a syst…

Except there is a successful visual programming tool and it probably runs a large chunk of software in your car. It's called Matlab Simulink:

https://mathworks.com/help/simulink/examples/anti-windup-con...

Obvious lectures from this:

1) Don't be silly and copy a text based language into visual blocks. Nobody wants to drag&drop the components of a while loop or click a box to enter a variable name. If you have variable names, you probably failed this one already.

2) It's about the data, stupid. There is very very little explicit control flow in Simulink diagrams. Instead it's all about the flow of data.

3) Seriously, nobody wants to click together while loops. Simulink works because it has a very large and very powerful library of blocks that you need just a few of at a time to build very complex functionality.

Re: Ask HN: Why does visual programming suck?

#147
post #101

Earlier quoted context omitted.

I don't think that meaningful whitespace counts as "visual programming." That just means that a whitespace character has meaning, just like a word character or a punctuation character. It's still purely text-based. I think that "visual programming" means that the editing environment to some extent visually represents the intended outcome of the program. WYSIWYG web editing is the obvious extreme example of this. Whit…

Ah, I see. But other than WYSIWYG editing I'm having trouble imagining how a language could be general purpose and could still be visually representative of the output of the program rather than the behavior of the program (much like the visual layout and syntax coloration of modern text languages conveys). Are there other examples of those cases? Edit: maybe I was presumptive to assume that they had to be "general p…

Now that I Google it a bit, it seems you're right that my definition of "visual programming" is too strict, although I do still think that most people wouldn't consider Python's whitespace to qualify. It looks like most so-called visual programming environments are effectively visual diagrams of standard control flow mechanisms like loops and conditionals.

Re: Ask HN: Why does visual programming suck?

#148
I wonder how many people have physical issues with computer screens. My own anecdote is that I get severe eyestrain headaches and neck / wrist fatigue, when I have to do fine manipulation on a computer screen.

I spent a few months using LabVIEW, more than 20 years ago, and it was physically debilitating. I also have a hard time doing CAD. When I'm typing code, I'm not really focused on the screen unless I need to be. Sometimes I close my eyes and type, or look away from the screen.

Another thought about text based languages is that they make it much easier to create and explore new languages, because you don't need to program a full blown graphical editor every time, make it work on every platform, etc. Especially for languages that are supported by volunteers, maintaining graphical tools might not be the best allocation of effort.

Re: Ask HN: Why does visual programming suck?

#149
post #117

Earlier quoted context omitted.

I think you are chasing something that does not exist. While i submit to the idea that programs are "data", and could be represented not just like text, the expressiveness when using a visual representation is small, but the exactness is as high as normal languages. I've seen large visual-programming programs, and they explode into complexity, and I think there is a reason for that, the expressiveness of a symbolic l…

Visual programming does not have to mean 100% not text. https://joshondesign.com/2014/08/22/typopl

You talk about the compiler having to be sufficiently smart, but I think you actually just need good IDE support, then you can store the code as text but display a nicer rendering.

E.g. the image literal could actually be Image.loadFromPath("../.../image.png"), but you don't see the code unless you want to; and if you drag and drop a file into your program, the IDE automatically inserts the corresponding code.

Re: Ask HN: Why does visual programming suck?

#150
post #97

Earlier quoted context omitted.

then why does everyone sketch a picture when trying to convey an idea? text is obviously useful but so is visual information. the complete dismissal of visual programming by text-based programmers is often infuriating. visual programming can provide an immediate indication of structure and dataflow, something that text-based languages struggle with. in my mind, the best case scenario is some sort of hybrid, where vis…

> then why does everyone sketch a picture when trying to convey an idea? Does everyone do that? I think I very rarely do. When I need to convey an idea on a whiteboard, it's still almost completely text, with a few extra symbols like directional arrows that I think are still effectively just symbolic written language. Literally the only time I can remember sketching a picture to convey an idea is while playing Pictio…

Sometimes they do. In my view the most prominent example is documentation for installing computer hardware and software on Windows computers. The instructions will be a series of pictures, with circles and arrows, and a paragraph on the back of each one (sic). This goes on for page after page. And when the OS is updated and the dialogs all change a bit, the documentation becomes confusing or even obsolete.

In contrast, the instructions for the Linux version of the same thing will be something like:

    sudo apt-get install this
    sudo bing bam boom
    ...
Post reply on HN