Live data from Hacker News

Where should visual programming go?

tonsky.me

21–30 of 77 posts

Re: Where should visual programming go?

#22

I've wanted the ability to embed diagrams in code for sooooo long. How is this basic and obviously useful feature still not possible??

Totally agree. It also hard to do diagrams in a lot of document management systems so you end up with this crazy mix of Word docs and Visio diagrams. In the 90s they tried to fix this with OpenDoc and OLE but somehow that got out of fashion.

Re: Where should visual programming go?

#23
post #3

When this last round of discussion of visual programming happened I had a minor epiphany. For a little background, I’ve maintained that visual programming goes absolutely nowhere until we have visual diffs that work (work as in workflow). I’ve been saying that since before the UML Trough of Disillusionment kicked into high gear. Without diffs, without analysis, we are going nowhere fast. Almost every other link of th…

The challenge with visual programming from my perspective is how to get the abstraction level just right. It's like Terraform/HCL modules: too granular, you wind up passing in a billion parameters, and the module adds little value. Too high-level, too many assumptions, also adds little value. I have an idea that I think would be suitable for visual programming. Every time I think about it, I come to the conclusion th…

I think this idea has promise but I wonder how it would work when many of the visualizations I create to help explain logic wouldn't fit neatly into a DSL/schema. For example, I might use red in some places to refer to data from a particular client, or underlines to indicate constants, or arrows to indicate things that are related from a business perspective but not data or logic flow. I guess this could be standardized, but that almost defeats the purpose of having the computer do the heavy lifting.

In other words, not only does understanding these diagrams assume a ton of knowledge in the problem domain, but the crude tools at hand for creating them (lines, words, symbols, shapes, colors) can be repurposed in so many ways by different people and different projects that I don't see how generic motion detection will be able to detect high level changes. Sure, detecting changed nodes and descriptions might be easy, and possibly useful, but I think there will never be a substitute for human comments like "removed XYZ because the boss said so" or "renamed foo to bar because of IRS regulation so-and-so."

Re: Where should visual programming go?

#24
> Sebastian argues that we shouldn’t try to replace all code with visual programming but instead only add graphics where it makes sense

I just interviewed Daniel Kallin, the maker of the language/tool Nomnoml (https://www.nomnoml.com/), for making beautiful diagrams, which is one such place where it makes sense [0].

He had an expression I liked, wanting to make a tool/lang that felt like "drawing with ascii".

I think this is the way for visual programming. You must do nice DSLs side by side with the visual representation. The text must be source of truth. It _has_ to be that way! That's how computers work!

---

Don't let the hard to pronounce name throw you off, Nomnoml is a super fast and handy tool for making beautiful visualizations, hand crafted over 10 years and with no ads or login and fully open source.

[0] interview: https://pldb.io/blog/danielKallin.html

Re: Where should visual programming go?

#25
Non-programmer here. I’ve long desired to program Arduino microcontrollers but haven’t had the ability and/or the patience to learn programming. I’m a very visual person and get confused if I have to keep more than a few lines of code in my head. Even if I understand how I want a signal to be processed into an action, when the flow chart in my head needs to be translated into text I get overwhelmed.

A solution arrived for me in the form of a number of visual arduino IDEs. Flprog, Outseal, and Open PLC. They all allow programming in ladder logic, and Flprog and Open PLC allows for function block programming. Ladder logic is useful for many tasks involving discrete I/O (Ex. A button latches a contact which turns on a relay which turns off a light and turns on a motor.) Function block programming has enabled me to perform more complicated functions like creating an HMI using a menu system displayed on an LCD connected via I2C. These are tasks that I wouldn’t have a chance of accomplishing without the complex arduino code being contained in graphical functions blocks which I can wire together and configure with a gui.

Prior to compilation, Flprog displays the raw arduino code in the arduino IDE, which gives me a chance to exam the actual code produced by my function block program. I find it to be very educational.

As a non-programmer, I have no idea if this embedded programming use case can be generalized to more complex programming tasks, but for my limited use case it’s been transformational.

Re: Where should visual programming go?

#26

Non-programmer here. I’ve long desired to program Arduino microcontrollers but haven’t had the ability and/or the patience to learn programming. I’m a very visual person and get confused if I have to keep more than a few lines of code in my head. Even if I understand how I want a signal to be processed into an action, when the flow chart in my head needs to be translated into text I get overwhelmed. A solution arrive…

Curious, what's your profession? To me you do sound like a programmer.

Re: Where should visual programming go?

#27
It's interesting to see how different programming languages approach building software.

Languages like Lisp are all about planning out the whole program structure (the "Abstract Syntax Tree") upfront, kind of like a blueprint. But modern tools and visual programming often take a more piece-by-piece approach. You build smaller parts first and then connect them together, gradually building up the whole thing.

This bottom-up method feels more natural to how we solve problems in real life. Visual tools make it even easier because you can just drag and drop components instead of worrying about complex code structures.

I wonder if this kind of visual, incremental approach could make programming more accessible to everyone. It might help bridge the gap between our everyday thinking and the formal world of code.

Re: Where should visual programming go?

#28
post #3

When this last round of discussion of visual programming happened I had a minor epiphany. For a little background, I’ve maintained that visual programming goes absolutely nowhere until we have visual diffs that work (work as in workflow). I’ve been saying that since before the UML Trough of Disillusionment kicked into high gear. Without diffs, without analysis, we are going nowhere fast. Almost every other link of th…

Animation solves this with onion skinning and I can visualize a number of ways you could use onion skinning and similar to diff two or more graphs.

https://en.wikipedia.org/wiki/Onion_skinning

Re: Where should visual programming go?

#29

not a well thought out take, but i think visual programming should stop trying to encode application logic and focus on: - building good UIs rapidly (e.g. improving & simplifying layout options, look & feel, etc.) - make debugging trivial & powerful - make deployment trivial Visual Basic was on the right track in almost every way except as a language. Hypercard maybe had the language thing figured out: use english as…

The problem with Hypercard is that it used an extremely restricted subset of English constructions. Once you got used to the limitations, it was fine, but could be very frustrating for users learning what sorts of phrasing Hypercard expected.

Allowing too large a subset of English ends up allowing more ambiguous statements and more user surprise. Also, more complex grammar increases the chances of mistakes in implementation.

My current experience with LLM hallucination makes it clear that at present, we can't just throw an LLM at the parsing and semantic analysis side of programming language implementation.

Re: Where should visual programming go?

#30

Non-programmer here. I’ve long desired to program Arduino microcontrollers but haven’t had the ability and/or the patience to learn programming. I’m a very visual person and get confused if I have to keep more than a few lines of code in my head. Even if I understand how I want a signal to be processed into an action, when the flow chart in my head needs to be translated into text I get overwhelmed. A solution arrive…

Curious, what's your profession? To me you do sound like a programmer.

Former machine technician. I used to repair machines in factories. I’ve been lurking on hacker news for over a decade because I find the work of programmers fascinating, but my brain just doesn’t cope well with code. I do however, understand machines and control logic, so for me visual programming is a sweet spot.
Post reply on HN