Ask HN: Why does visual programming suck?
141–150 of 325 posts
Re: Ask HN: Why does visual programming suck?
#142It 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.
Re: Ask HN: Why does visual programming suck?
#143Re: Ask HN: Why does visual programming suck?
#144Earlier 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!)
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?
#145Earlier 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…
Re: Ask HN: Why does visual programming suck?
#146I 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…
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?
#147Earlier 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…
Re: Ask HN: Why does visual programming suck?
#148I 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?
#149Earlier 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
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?
#150Earlier 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…
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
...