That's really great.
I know it's polarizing but I truly think that visual programming remains an entirely unexplored area. I'm convinced that the current state of "text" programming is totally ineffective and in fact we are the last domain producing things with computers which still insist in being limited by the text files in folders abstraction.
It's a shame that in 2024, I still have to search for text in files like it's 1970, guess which file does what based on the dozen of characters of the file name and can't see at a glance which other files are dependencies or uses.
I can't "see" my entire codebase, zoom in and out, I still have to guess the relation between some line of code and another in another file.
My ideal IDE of the future just allows me to see all my codebase like a big fractale.
Visual programming languages have been around since at least the 1970s:
https://en.wikipedia.org/wiki/Visual_programming_language
Several are used real-world production cases:
https://en.wikipedia.org/wiki/LabVIEW
https://en.wikipedia.org/wiki/Simulink
https://en.wikipedia.org/wiki/Pipeline_Pilot
https://en.wikipedia.org/wiki/IBM_Cognos_Analytics
While visual programming systems work better for some use cases, they are usually less agile versus text-based systems for several generalized programming tasks: 1) difference comparisons ("diffs"), 2) version control, 3) code search, and 4) code input (Most visual systems require a mouse and careful placement of connectors).
Visual programming systems tend to excel for domain-specific tasks carried out by non-technical or semi-technical users, but for generalized programming, text-based programming systems are more popular for highly technical software developers.
Another problem with visual programming is it forces your program to be planar, or at least nearly planar with some crossovers.
In my experience real code can't be represented legibly on a 2D plane. "Generate code map" features of IDEs usually produce incomprehensible graphs, when you try them on actual codebases.
I never tried CodeSee before it shut down, was it any better?
What is code in a text editor if not a legible 2D planar representation of the "real code"? The real difference between text and a graph of definition-use edges and nodes is that the text representation does not have any intrinsic information on the real code's structure and does not display definition-use edges - at least by default. Most code editors provide some way (via LSP/etc) to display the edges however - usually as a list of the other end of the edge in a dialog/window/similar separate from the code. Given that some textual representation (e.g. variable names) of source and target is possible, a graph-displaying editor can just "abbreviate" an edge (or: make it implicit) by using the other end of the edge. If a graph editor makes all edges implicit by a certain strategy of using names/whitespace/parentheses/etc, the result would be a text representation a text editor displays. The main issue is not in difference of display, but in the mode of editing: a text editor allows much more partial input that violates the structure a graph is expected to have: malformed definitions of programming constructs that are neither a node nor an edge in the graph. A graph editor must either allow such partial input in some way (e.g. enter temporary textual representation, transform into group) or use a different input model that doesn't allow such unrepresentable input, e.g. using mostly mouse, or an editing keyboard language like Vim's objects & verbs. On the other hand a text editor requires you to agree on a formatting style with your colleagues and running autoformatters, looking past useless formatty diffs in code review, fixing syntax errors, dangling else,...
i think the parent meant "planar" in the graph sense, that is, capable of being drawn in a plane with edges not crossing each other.
Or if you do functional Scheme Bricks is perfect visual programming language for scheme/lisp
https://github.com/nebogeo/scheme-bricks
And text forces you to be linear. It’s no coincidence that everything asynchronous is treated as a minefield of potential race conditions and ephemeral bugs.
“Real code” allows you to hide the mess behind imports (I think everyone had experience of dealing with accidentally circular imports at least once in their career) and abstractions. But once you put your code as a graph on a 2D plane, you realise what kind of horror you are dealing with. And sometimes even this trick doesn’t work: For example, it’s hard to abstract away the states and transitions of a finite state machine; so while they may look fine on a diagram, they often look like a mess of spaghetti as code.
There are also the three graphical PLC languages standardized by the IEC - Ladder, Function Block Diagram, and Sequenced Function Chart.
They're used everywhere - anywhere you see a shiny metal cabinet with conduit running in and out, there's a chance there's a PLC plugging away in there.
Ladder dates back to the 70s and I'm willing to bet is the most used graphical language in existence. It looks like the relay diagrams that electricians use.
If you count flowcharts (which one should, IMO), it has been around older than any text programming languages even.
Text vs visual programming is a topic that comes round regularly. I've tried to write summary of why both have their place here:
https://successfulsoftware.net/2024/01/16/visual-vs-text-bas...
It agrees with quite a few of the points you make above.
I used LabVIEW for a couple of years. The big issue for me was ergonomics. Coding was physically laborious, and I went home with splitting eyestrain headaches. It occurred to me at the time that a dataflow programming language could support either text or graphical input, depending on the user's ergonomic preferences. I have the same problem with CAD.
I think lines of code in a text editor is a terrible way of describing state machines and flow diagrams.
And I think flow diagrams are a terrible way of describing many algorithms.
Flow diagrams look great for multi-processing pipelines and event suff.
I'm interested in this as an addition to current coding practices.
100%! Cherry-picking what makes sense to "elevate" to the visual sphere and having it co-exist with traditional coding is the only way I believe visual programming can be truly useful.
Yeah I completely agree. Simulink works quite well because it's modelling things that are naturally physical networks. DSP/Blender style node graphs also work quite well because you really want an interactive control on every node.
In contrast visual systems that try to recreate traditional programming (add, multiply, loops, etc.) seem to be mostly awful. LabVIEW is a complete disaster (probably not helped by its dire graphic design but even so). UE Blueprints are bad.
Scratch is not too bad, but only because it's basically building a normal text-based program with lego, rather than nodes and edges.
While I agree that text might not be the best way to represent a program, text files have many convenient properties that make them hard to replace:
- Simplicity: every computer and most humans can interptet it without any issues
- Diffing: it's relatively easy to tell what changed in a text file between revisions
- Editing tools: text editors, formatters, etc. exist and many people know how to use them efficiently
Also, modern developer setups allow you to manipulate code as a syntax tree (see tree-sitter text-objects) and intellisense and snipping tools allow you to type much less.
This seems more like a matter of having more tooling because 99.999% of programming has been text based.
If we spent the time building tools for visual coding it’s possible we’d be able to do way more.
Just thinking about diffing for example, it would be much easier to see which nodes have changes in the whole codebase by just highlighting them red. It’d be easier also to depict something like “the flow for this process changes from this to this”
Author here. Diffing is a great example. The first incarnation of Flyde had naive version control built into it and had such diff features!
Diffing from VSCode already makes a bit of sense (see https://imgur.com/a/WXj89tx). Next step is to color it differently, and finally, add a browser extension to render diffs nicely from GitHub/Gitlab's UI as well :)
Couldn't agree more, which is why I spent the last three years building the tech that gets us there -- a universal document object model for code! If you thought you'd be waiting 10 years for this tech, it's probably more like 2 now.
I was like WAIT that sounds REALLY familiar :D
I see it as comparing comic book (visual) vs text book (text code). You can express some visual better with comic books, but in the end, I find text books easier to define richer and complex matter.
there's a lot of effort being put into hiding the file based systems underneath (i.e. "libraries" in MacOS, mobiles OSes like android). if something doesn't work or data is lost, it takes people who know what files are, to fix things. Please don't take files away from us, we just want to be able to help.
IDK i started using TouchDesigner and while it was cool...had to watch tons of tutorials before i was remotely effective, and once I figured out how to have it call a python script, everything was much more productive/simple.
I suppose it all depends on personality: some swe's prefer to write, some prefer to draw (I do both, but would hate to only have to deal a 1mil-lines-of-code fractal, but would be (and am) fine with the 1970 approach). The OP's solution then might be a great addition to my toolbox.
That's the outcome I'm hoping to get from all these VR/AR tech people are working on. I believe we have the hardware to make this work and someone just needs to build the software.
Thanks! I agree, and while no one knows how development will look in 5-10 years from now, I find it hard to believe it'll be _just_ textual based, and I hope Flyde will help inspire that move.
What you are describing sounds a lot like C4: https://c4model.com/
I attempted to do this [1] and explored topic of why VPL are not a mainstream too, but postponed project for maturation of VR/AR ecosystem as I see them usable only in VR now. This year actually I think to return to work on it.
[1] Rethinking Visual Programming with Go - https://divan.dev/posts/visual_programming_go/
Hard agree. For me, it's the delegation of concerns that visual programming excels at.
I don't have to care how you're getting a random point in a sphere. Whatever algorithm you want to use works for me. And since you know which algorithms work better for which scenarios, you can put all of that delegation under the hood. All I have to know about is which node to use. And if something starts breaking, I know that it can't be my problem; it has to be a problem with the node's code and that domain professional can address it.
Of course, a good dev might say "That's just having a really good API", which is true! But once you have an API so good that you don't need to know any of its internals, you're essentially trying to write a graph using documents, which is kind of silly. High-level servers are a great example (node servers, python servers, etc). There's not any utility in writing an expressJs server with text that isn't satisfied by writing it as a flow chart. Servers, at that level of abstraction, are so simple that all you really need to do is tell which keys go where, when. And that's most simply done by drawing boxes and arrows that all point to each other.
Put more starkly: there's no difference between writing `Lib.Physics.GetPointInSphere(param1, param2, param3)` and linking a `GetPointInSphere` node to `param`s 1, 2, and 3. So I think that if you're in a domain that is already at that level of abstraction, visual programming is a fantastic way to go. And if you're not already at that level of abstraction, there's value in getting there (even though it's probably going to require fracturing/modularizing existing concepts).
Not really, most software in your car for example is written in the visual programming language Simulink, which IMO is leagues ahead of the concept of Flyde in layout and composability.
Simulink has been around and in heavy use for at least 2 decades but I think the $20k/yr price point is why we don’t see many other applications of it (even though people HAVE written games and web apps and such with it)