by DrMiaow · 2y ago · 0 comments
Beyond some specific use cases, they don't seem to scale cognitively. The tangle of connections is a problem. The previous HN link from @andsoltis has a better critique than me.
Don't get me wrong. Besides being experientially cynical about these things, I'm also firmly in the camp of "one more UI breakthrough, bro and we might crack it!"
This one has some deep design that definitely attempts to extend the state of the art but still struggles with that aforementioned problem.
TBH though, the coolest feature is that widget that focuses on what you are doing. There is something there with it, I'm just not sure what the "there" or "it" is, but I do know I like it.
I'd love it if someone found a solution to that, but it feels like an intractable problem beyond some specific use cases as you say.
I really hope I'm wrong.
Support for embedding such things in another language (Like we do with SQL and regular expressions) would be important, too.
That might be a place to start. Can we replace regular expressions with a visual language? What would it take to have “railroad diagrams” widely available in at least one programming language and many editors?
Consider how hard it is to even get people to use additional symbols, like the APL's do...
Along with markdown, there’s also increasing support for math equations in forums and blogging software.
In practice every attempt I've looked at either become hard to communicate about the code in, or the visual aspect tends to end up just becoming a secondary visualisation of code that you still treat as textual first.
In the latter case, turning it into a better UI is an unsolved problem, because round tripping reliably between something readable as text and a meaningful visual representation is really hard.
As I said, I hope someone solves this, but most attempts aren't even pushing the boundaries into uncharted territory - a lot of attempts have been made over the years.
https://youtu.be/70PH5cQQEdQ?si=y4YmhnimzferVpCD
Since you develop inside vr you can also talk about and show the code in the same vr environment.
It's probably at this level we need to rethink stuff to make visual programming practical.
This also makes it easier to verify that you have all the same capabilities in both representations, as the ways of manipulating the AST are enumerable.
I grant that this makes the project significantly larger if you're going to remove that constraint.
Open up the source code for this web page: is it compact and readable? The answer seems to be that HTML is "good enough" in that regard, and I suspect CSTML will be the same especially as more developer tooling for it becomes available.
Advantages are:
- discoverability --- it seems pretty easy to arrange all elements in a hierarchy and make them accessible via clicking/revealing
- no syntax errors --- if things fit together/connect, then it should be a syntactically valid program
The problem is, it relies on a couple of concepts we don't seem to have a good solution for:
- What does an algorithm look like?
- How to deal with an algorithm which is larger than the current screen/window size? (it's all-too easy to have the same sort of problem of a not-wrapped program with lines longer than the current window size and more lines than will fit in a window, and there doesn't seem to be a 2D graphical equivalent of turning on word-wrapping)
- If programs are broken down into discrete modules, then connected together, one is back to the wall-of-text description which presumably one was trying to escape from, just wrapped up in boxes and connectors
Two pages with cautionary images are:
https://blueprintsfromhell.tumblr.com/
and
https://scriptsofanotherdimension.tumblr.com/
I've been trying to use OpenSCAD Graph Editor: https://github.com/derkork/openscad-graph-editor in my own work:
https://github.com/WillAdams/gcodepreview
and the screen grab from there sums up the difficulties pretty well:
https://raw.githubusercontent.com/WillAdams/gcodepreview/mai...
Even in text, you don't try and look at everything at once, zooming out for a "structure overview" seems useful, but that is not what is happening here, its just imperative code being shoehorned into a DAG and left wherever a user left it instead of organizing itself, which is the whole benefit to graphical programming.
This demo of "unit" at least seems to organize nodes and views of nodes better.
One of the really nice things in Literate Programming
http://literateprogramming.com/
is that one gets a nicely typeset PDF which has a hyperlinked ToC which does serve as a "structure overview": https://github.com/WillAdams/gcodepreview/blob/main/gcodepre...
I agree, some facility for automatic re-organization and adjusting what is shown/readable in terms of hierarchy based on how much or little of the program is being shown would help a lot.
for consideration, one need not change the encoding medium to achieve this: JetBrains MPS <https://www.jetbrains.com/mps/#:~:text=Why%20MPS> (Apache 2 licensed: https://github.com/JetBrains/MPS ) is like a middle ground between "flashing cursor in a textarea" and "drag-and-drop programming" and they alleged to have written their bugtracker (YouTrack) using MPS but they have since removed the citation in the footer so I don't know if it was true or is true
I can sling text with my eyes closed, and have managed the ergonomics of typing well enough that it hasn't injured me in almost 50 years.
On the other hand for applications where dataflow was a good paradigm for the problem being solved, I appreciated its benefits.
This just isn't true. I've actually built things in visual languages. It just requires the same organization as text-based languages. One could write an entire text-based program in a single file in a single function, which would be a similar mess. In fact, the benefit or feature of visual languages is that they showcase poor code more readily than text-based code.
I have used LabVIEW, among other visual languages, and built systems with 1,000+ VIs, which are the fundamental building blocks of code organization, and hundreds of classes. LabVIEW has VIs, clusters, classes, libraries, and projects, all of which are useful and required for a well-managed, decoupled code system.
With good software principles, there's nothing that says you can't organize and scale visual code well.
I one time interviewed at a place that had swore off LabVIEW and were moving to Python. The reasons of switching from LabVIEW were the same tired reasons of organizational issues. When I asked to see their Python code, they showed me a single Python file over 10,000 lines long, and there were function signatures that were over 20 lines long. That was just the function signatures. This example, along with many more, and my experience in both visual languages and text-based languages make me very skeptical about claims about not being able to organize and scale code in visual languages.
We see the tangle representing a complex system and say the tangle is ugly. We hide the tangle in text and names and say it is better. There is something odd there.
That the tangle is perceived to be uglier than the word.... is it that our brains deal better with a sliding window of symbols rather than gazing upon the sprawled true tentacled glory of some large algorithmic expression?
The promise of VP is that the program is the architecture is the monitoring tools.
Should we learn to love the sprawl?
So, I'm making two parallel attempts at this again. One more serious ( https://youtu.be/sqvHjXfbI8o?si=-PDXQes5i4JglBQj&t=411 ) and one as a game/exploration.
The first will be for tiny machine-generated programs linked together, which will be for a research project. The second is for an abstract physics game which will be for learning, fun, and hopefully some tiny profit on Steam. (Will appear here https://store.steampowered.com/search/?publisher=My64K when playable)
In, both I am adding severe constraints to the VP design but the game one will be the most interesting. I'm looking to add a kind of cellular automata mediated physics that also provides gradual automated optimization. Think programming in Minecraft with Redstone but with multiple dimensions and a regular polygon substrate. The key ideas I am exploring in both are:
1) Can we design a substrate that enforces some order that solves the tangle problem?
2) Within a substrate, can an algorithm be "crystalized" or "folded" into something recognisable by its shape?
I am starting next week. I have six months off work. It should be fun.
Tons of things like this were built in Smalltalk. (Including a UI->Domain model connection layer in the IBM VisualAge Smalltalk IDE.) They all had scaling problems, especially, "they don't seem to scale cognitively."
It's not as if the problem doesn't exist in most codebases. It's more that the problem is invisible without such tools. Tools making the tangle visible make themselves seem unusable.
The fundamental problem, is that we don't have ways of introspecting these horrendous relationship graphs for specific contexts. If IDEs and other programming tools generally could create custom browsers/IDE windows for things based in queries like:
"All of the methods that contain references to ClassA.Member1 and ClassB.Member2 which also call function Y."
...where this query can be modified or further specified at runtime. Then there could be specific built in queries that cover everything touched by canned refactorings. Then these further could be intersected or unioned.
EDIT: Forgot to complete my thought. If the graphical diagram could show contextually relevant slices of the system, it would greatly cut down the confusing web aspect of the diagrams.