Live data from Hacker News

Ask HN: Why does visual programming suck?

news.ycombinator.com

171–180 of 325 posts

Re: Ask HN: Why does visual programming suck?

#172
>Then you interact with their API: this table pulls in data from this SQL statement; this button executes this HTTP query; this dropdown publishes this value, which this SQL statement uses via string interpolation. These "widgets" publish their data, which can be used by other widgets (w1.value), and inside SQL queries. The tables can pull in data from SQL queries. You can use string interpolation inside SQL queries, so dropdowns can influence the query being run. So selecting a drop down value would cause the query to change, which would automatically propagate changes to the table.

This is very similar to Xcode Cocoa/CoreData bindings, but these are too restricted to create anything nontrivial. IME I always had to fallback to delegate and data source methods in source code.

Re: Ask HN: Why does visual programming suck?

#173
post #147

Earlier quoted context omitted.

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.

The point I was trying to make is that the text in a programming language like Python is like a visual diagram of standard control flow mechanisms. I can see the for loop, what it iterates, and what the body of the iterator is. The language has visual clues. And with syntax highlighting it's even more visual.

But, I get that there is a class of visual languages, often dealing more with interconnected nodes like a directed graph, for which graphics might be better at communicating. But they seem more domain-specific rather than general purpose programming (like most text languages).

Re: Ask HN: Why does visual programming suck?

#174

There is a couple of reasons. First, VP is essentially just putting code snippets into nicely coloured boxes, which adds no value apart from making you have to scroll/zoom more. Additionally the structure of the visual becomes important, opposed to text which can be infinitely appended to, and so once you add enough complexity the whole thing becomes complete spaghetti. VP also hides away a lot of implementation deta…

>> For example, when would the dropdown run the SQL query? on page load? on drop down open?

You seem to be dancing around what I came to comment on, and that is event driven programming. It's OK for simple UIs but it tends to break down as complexity increases.

Re: Ask HN: Why does visual programming suck?

#175

Earlier quoted context omitted.

I think the "visually representative of the output" isn't a suitable way to describe it. The visual language I always think of is LabVIEW. It is very different than a textual language.

No it's not. A for loop is a block with inputs, a space for sub-blocks, and outputs. To add an iteration limit, a box with a literal number can be attached. This is visually represented of the program's flow graph. Which does make sense when actual signals are concerned, to extend the wire metaphor of analogue equipment. Reason did that too, where instruments had a back pane to connect them to effect panels via actua…

> This is visually represented of the program's flow graph

LabView is more of a data flow graph than a control flow graph, aside from the boxes that represent deviations from the usual rules (For loops, conditionals, sequences, etc.)

This isn't as much pedantry as it might seem... this is one of the big differences between LV and 'traditional' programming... LabView evaluates its data flow graphs in data-dependency order, which can also mean evaluations are done in parallel. (IIRC, for linear execution speed, wires in LV all have a fixed type and blocks can be compiled to machine code with an LLVM back end.)

Re: Ask HN: Why does visual programming suck?

#178
post #6
post #4

Because of the Deutsh limit: https://en.wikipedia.org/wiki/Deutsch_limit

That's like saying it's impossible to design a motherboard because you can't show all the bypass capacitors on the top level schematic. Hierarchical design and layers of abstraction are vital in both hardware and software.

True; but visual programming means you need more 2D space (screen) to see the same amount of logic. Maybe with bigger screens it could work better?

Re: Ask HN: Why does visual programming suck?

#180

Imagine a world where people only bought bespoke suits. You go to a tailor and are measured and pick out your fabric and wait a few weeks. Then you pick up your suit. It's perfect. You pay $5000 and take it home. Most of us don't do that. Most of us make due with off the rack suits with some tailoring for 1/10th the price. With programming we have an expectation of bespoke design, so anything less, even if it's much…

you win the prize for asking the right question. the answers are like with AI, where once it's done in a certain domain, then that's not AI anymore. that is, with visual programming, once it's done in a particular domain, people don't think it's programming anymore.

the big examples i have in mind are: * spreadsheets -- very visual, everything's in a grid. the relationships are spatial. * electronic music -- people lay out their various effects in a flowchart format and chain them from one to another * video games -- consider a game like RimWorld. you're clicking on all kinds of things and specifying what you want done with them. the behavior of the actors in the environment are modified by your specifications.

So, it's all in various optimized subdomains. As it should be!

Post reply on HN