Live data from Hacker News

We need visual programming. No, not like that

blog.sbensu.com

31–40 of 505 posts

Re: We need visual programming. No, not like that

#31

Earlier quoted context omitted.

But program code is 2D as well. And quite limited 2D, with 80 characters width max (or similar, but never unlimited).

Code is 1d with named links. Visual languages trade named links for global wiring, which is very cluttered for serious problem solving.

Code is not 1d, a single if() already creates another line that makes it 2d

Re: We need visual programming. No, not like that

#32
> Developers say they want "visual programming", which makes you think "oh, let's replace if and for". But nobody ever made a flow chart to read for (i in 0..10) if even?(i) print(i).

I'm not convinced by this particular example. Wouldn't a visual programming language just represent the logic here as a pipeline connecting two more atomic operations: you'd have a visual representation where you pipe the (0..10) range through a function that filters for even values, and then pipe the result to a print function.

Re: We need visual programming. No, not like that

#33
The "swimlane diagram" (I've not heard that term, before) looks a lot like the classic bus timing diagrams that I've used since the 1980s.

I tend to use the same kind of diagram, whenever I'm illustrating a linear flow (or, more often, a set of linear flows).

One of my most useful tools is OmniGraffle.

Re: We need visual programming. No, not like that

#34

This article seems focused on "how do we help programmers via visual programming", and it presents that case very well, in the form of various important and useful ways to use visual presentation to help understand code. There's a different problem, of helping non-programmers glue things together without writing code. I've seen many of those systems fail, too, for different reasons. Some of them fail because they try…

Shameless plug, but this is what we’re trying to do at Magic Loops[0].

We joke it’s the all-code no-code platform.

Users build simple automations (think scrapers, notifications, API endpoints) using natural language.

We break their requests into smaller tasks that are then mapped to either existing code (“Blocks”) or new code (written by AI).

Each Block then acts as a UNIX-like program, where it only concerns itself with the input/output of its operation.

We’ve found that even non-programmers can build useful automations (often ChatGPT-based like baby name recommenders), and programmers love the speed of getting something up quickly.

[0] https://magicloops.dev

Re: We need visual programming. No, not like that

#35

Earlier quoted context omitted.

Specifically, textual programs use symbols to build a graph of references between computations, where the average visual language tries to use explicit lines between blocks. But the reference graphs of non-trivial programs are often decidedly non-planar, which only becomes a problem when you try to lay them out on a plane.

Why does laying out code on a line not cause a problem with spatial reasoning but a plane would? Are we somehow incapable of applying spatial abstractions when we move up into a higher dimension than 1?

Writing is based on speech, which is one-dimensional. Most programming is actually already highly two-dimensional thanks to its heavy line orientation.

But most visual programming isn't trying to be a kind of "2D orthography" for language, it is trying to be a "picture" of a physical mechanism.

Re: We need visual programming. No, not like that

#36

> Developers say they want "visual programming", which makes you think "oh, let's replace if and for". But nobody ever made a flow chart to read for (i in 0..10) if even?(i) print(i). I'm not convinced by this particular example. Wouldn't a visual programming language just represent the logic here as a pipeline connecting two more atomic operations: you'd have a visual representation where you pipe the (0..10) range…

That's a good point. Functional programming is a much more appropriate foundation for visual coding. Not only because of functional operators in your example, but immutability and purity also makes things simpler when represented visually.

Circuit modeling (like in Max/MSP, Reaktor, Pd) is something that also works way better visually than imperative programming.

Re: We need visual programming. No, not like that

#37
It’s a problem I think about more generally quite a bit. In general, the problem is optimizing efficiency of translating thought into machine code. Our thoughts move much faster than our hands. Our thoughts don’t execute linearly— able to seek to many random ideas and back without much of a sweat. I don’t think visual vs. text is going to make much of a difference, because both use the same interface device. Honestly, if you think about it that way, text based workloads are going to win every time because the keyboard is much more precise and fast than a mouse. My point is that this will always be an interface device problem, not a visual vs text (mouse vs keyboard) problem. FWIW I think KBM and text with modern tooling is incredibly efficient already, but my mind is open to some new interface device that changes everything. Not so sure that means VR, because VR is really just a pair of pointers (two mice)

Re: We need visual programming. No, not like that

#38

Earlier quoted context omitted.

Specifically, textual programs use symbols to build a graph of references between computations, where the average visual language tries to use explicit lines between blocks. But the reference graphs of non-trivial programs are often decidedly non-planar, which only becomes a problem when you try to lay them out on a plane.

Why does laying out code on a line not cause a problem with spatial reasoning but a plane would? Are we somehow incapable of applying spatial abstractions when we move up into a higher dimension than 1?

Text doesn't use spatial abstractions.

The problem with spatializing complex relationsips becomes very apparent when one tries to lay out graphs (as in nodes-and-edges) graphically. Unless the relationships are somehow greatly restricted (e.g. a family tree), the layouts become a total mess, as the connectedness of the nodes can't be mapped to distances and the edges by necessity have to make a lot of crossings on top of each other.

Re: We need visual programming. No, not like that

#40

Earlier quoted context omitted.

But program code is 2D as well. And quite limited 2D, with 80 characters width max (or similar, but never unlimited).

Code is 1d with named links. Visual languages trade named links for global wiring, which is very cluttered for serious problem solving.

> Visual languages trade named links for global wiring

Existing visual programming langs can definitely do "named links". A lot support named function-like blocks which are another form of avoiding wires.

> which is very cluttered for serious problem solving

This clutter is also problematic in textual programming, and is the reason abstractions and programming structures are used. Perhaps the hint here is that we need better ways of representing abstraction in visual programming.

Post reply on HN