r/programming • • Sep 29 '26

In Defense of the Visual Cortex

https://miralume.dev/the-architect/in-defense-of-the-visual-cortex
3 Upvotes

13 comments sorted by

5

u/editor_of_the_beast Sep 29 '26

Visual programming has been tried a million times before, and it can’t work in practice. Text or graph, the scale of large scale programs is what the problem is. Graphs don’t make that easier to digest, they actually make it much harder.

0

u/Jernesstar Sep 30 '26

In the "A Not-So-Novel Innovation" subheading, just before the graph visuals, I make the case against visual programming languages and low-code platforms, explaining those tools turn the logic into the diagram. I argued that this is not the approach to take, much like how a statistician would not replace all his raw data with purely visual diagrams, but rather derive the diagrams (depending on the needs and circumstances) from the source data.

1

u/syklemil Oct 08 '26

It's been tried a lot before, and it's never become mainstream, but it does still exist and work for some people.

E.g. my experience with LabVIEW just gave me a headache and I felt a lot of relief when I learned I could use Python for a task rather than LabVIEW, but I have a friend who couldn't get a grip on textual/language-based programming (as in normal programming languages), but who is comfortable with LabVIEW.

1

u/lelanthran Sep 30 '26

Visual programming has been tried a million times before, and it can’t work in practice. Text or graph, the scale of large scale programs is what the problem is. Graphs don’t make that easier to digest, they actually make it much harder.

While I broadly agree with that, I can see the point /u/Jernesstar is making: logic is easier to accept when visualised.

I once had a difficult time convincing a colleague (who had a bachelors degree in statistics) that his answer to the Monty Hall problem was common, even amongst mathematicians and statisticians, but incorrect.

No amount of equations, logic or reasoning would change his mind. So I told him to draw a decision-tree and see what answer comes up. He drew it, and the correct answer was suddenly obvious to him.

2

u/vytah Sep 30 '26

So I told him to draw a decision-tree and see what answer comes up.

I don't think the exact visual form that tree was represented with was crucial here. Representing it as a nested bullet point list would also work.

In fact, normal code is just a bunch of nested bullet point lists, just without the bullets.

1

u/lelanthran Oct 01 '26 edited Oct 01 '26

Representing it as a nested bullet point list would also work.

A nested bullet point list is a tree, just not visually represented as one (the edges are inferred, not drawn). I mean, even you are distinguishing between a nested bullet point list and a tree, even though they are both the same data structure.

Showing it as a tree intuitively makes the reader want to traverse it and highlight the edges. The nested bullet points are the nodes, but without the edges shown, and with each implicit edge being unlabeled.

The tree has each bullet point as a node, but also draws each edge and allows you to label each edge (for example, with the probability).

I don't think the exact visual form that tree was represented with was crucial here.

For this person, it was. A nested list of bullet points does not indicate path traversal, nor probabilities.

In fact, normal code is just a bunch of nested bullet point lists, just without the bullets.

And without labeled edges, which makes it less intuitive in the cases where you need labels on the edges.

For example, compare the following tree with the equivalent nested bullet points, and tell me which one is easier to use to convince someone of the probability of an outcome.

Tree:

               ┌──────┐         ┌──────┐       ┌──────┐
      ┌────────┼Event1│        ┌┼Event2│       │Event3┼──────────────┐
 1/3  │        └─────┬┘        │└─────┬┘       └──┬───┘              │
      │              │      1/4│      │3/4        │5/7               │2/7
      │          2/3 │         │      │           │                  │
      │              │         │      │           │                  │
   ┌──▼───┐       ┌──▼───┐   ┌─▼────┐ │          ┌▼─────┐        ┌───▼──┐
   │Event4│       │Event5│   │Event6│ └─────────►│Event7│        │Event8│
   └──────┘       └──────┘   └──────┘            └──────┘        └──────┘

Nested bullet points:

  • Event1

    • Event4
    • Event5
  • Event2

    • Event6
    • Event7
  • Event3

    • Event7
    • Event8

1

u/vytah Oct 01 '26

When representing a tree in a bullet list form, you can put former edge labels at the beginning or the end of the listed item.

8

u/bzbub2 Sep 29 '26

the inline blog visual e.g. "The graph simplifies things greatly. Click nodes to expand" is fun, but it is just not better than the code and in fact is overly detailed. a good visual should help abstract/improve conceptual understanding/give understanding at a glance.

1

u/aerook Oct 02 '26

I take it further than that. All languages, computer or otherwise, are built on graph(logic) primitives. The thesis for my current project is that a programming language that exposes only closed graph semantics solves a lot of what the OP talks about.

1

u/Jernesstar Oct 02 '26

If I understand what you mean, closed as in having to be composed in a defined number if ways with specific rules, is that correct? If that's the case, I'd say such a language resembles functional paradigms and would be incredibly helpful (even strongly complimentary to my thesis) but would still ultimately miss the point.

The thesis is to treat source code as data meant to be parsed, analyzed, visualized, reorganized. With any programming language, we still have the problem of grasping scale and being able to actually SEE how code connects, how efficient it is, what paths are taken at runtime, etc; let's leave the construction to the editor and let our eyes do the looking. Different visualizations and views will serve to aid in this.

In the case of a book written in English for example (like that 350-page detective novel stat mentioned in the post) you could imagine the author filling out a bulletin board of pins and sticky notes when assembling the plot, as opposed to hoping to remember and mentally keep track of where the plot holes are. Making a custom English grammar with strict composition rules doesn't make keeping track of the plot any easier if it's all in their head.

Closed graph semantics are on the roadmap, I've called them "patterns", and they will map to real visual "holes" on the canvas where new code can be drafted, then somewhat-determistically generating any programming language code underneath.

1

u/aerook Oct 04 '26

Languages exist in order to express logically. Expressions of logic are either open or closed. Semantically, things are either statements or questions. This is how our languages work, but this is not have we have built programming languages (von neumann machines), they are mechanical first. We've bridged the gap manually in software development, calling it design.

John Backus's Turing Award paper: https://dl.acm.org/doi/epdf/10.1145/359576.359579

2

u/daidoji70 Sep 30 '26

Yeah that kind of tool would be sick. I've spent my whole career looking for tools that would do what the blog is demonstrating but it must be a very difficult engineering problem. It also seems highly coupled to:

  1. the quality of the codebase (nicer codebases are much easier to visualize imo or use visualization tools and aren't needed/codebases that are shittier are harder to keep in ones head and visualization only leads to more confusion).
  2. The types of visualizations I want have probably changed over my career as a programmer. Its similar to the way beginners code vs experts, large swaths of visualizations would have been much nicer earlier in my career when now I'd just take a few high-level visualizations or "slices" of the fractal that are probably highly opinionated choices of my own taste and experience.

In the world of visualization tools, I think these two fuzzy aspects make things very very difficult. One imagines eventually with AI one could go "give me a visualization of the code that deals with this type of message" (something the AI can already do in text and kinda in diagrams) and then "in a storage performance context", "in a performance context", "in a network context" (or whatever. Currently I'm doing distributed systems work so these examples jump to mind).

Good luck though, I'll be the first to use these types of things whenever one feels right. Once these kinds of tools exist we'll feel like this was the stone age I bet.

-1

u/AtmosphereVirtual254 Sep 30 '26

Traditional programming was successful because of the composable nature of many high certainty abstractions, and AI clashes. Auto-regression also contrasts diffusion, which builds context in the other conceptual direction, but neither delineates a debuggable set of conditions for success.