by WhitneyLand · 9y ago · 0 comments
It would have to use standard pro level libraries and tools underneath, with the easy UI being essentially and abstraction over of subset of the functionality. This would allow it to retain great usability, but still with no limitations for advanced users.
Of course this hasn’t really happened yet, but I think it’s because the right balance, architecture, and respect for both user experiences has not been applied. It would also involve leading and tightening some standards to allow things to work together more consistently. Remember how things were before package managers? Why couldn’t there be a better way to standardize scaffolding operations and configuration for example?
I realize a lot of this seems to be pulling in two different directions, but so many of the pieces already exist, and so much of pro effort is wasted on grunt work tasks like getting things glued together that should be easier.
But if by "easy UI" you mean the visual programming language, or the graphical DDL, then I'm skeptical it has any value to programmers. No programmer I know would want to use a visual programming language at all, even with an option to fall into a full text-based programming language.
This is something that a lot of game and graphics programmers are doing already. UE4 uses Blueprints[0] now, with the ability for programmers to drop into C++ for more control.
I also think that having multiple ways to interact with programming languages is awesome from an accessibility perspective too.
[0] https://docs.unrealengine.com/latest/INT/Engine/Blueprints/
Yep, and they produce things which look like this:
https://forums.unrealengine.com/filedata/fetch?id=1137264&d=...
That's an A* pathfinding algorithm, it looks like this in code:
https://rosettacode.org/wiki/A*_search_algorithm#Python
On top of that, blueprints are stored in a binary format which can't be diffed, which means it can't be version controlled properly. I'm not sure blueprints would be my go-to example of not-terrible visual programming.
A few years back, I used Max/MSP and Max4Live for a little while and I found it a liberating experience. Max has some, IMHO, rather deep problems which prevent it from being a realistic replacement for a "real" programming language[1], but it also had a bunch of things that made it great. First of all, I realised that the reason that most of the code you see online is a spaghetti-code mess is that most of it was written by people who did not have any software engineering training -- artists and musicians -- and therefore they did not learn the principles that we use (and are just as important even in textual languages) like encapsulation, abstraction, good naming, good factoring, single responsibility and so on. Without these things, code is a horrible unreadable mess regardless of if it is text or pictures. The target audience of Max (and the non-programmer designers that often use Blueprints) are not professional programmers with these principles ingrained, so their code doesn't look great, but it would look like that in text too[2]. However, these people, despite their messy code, manage to do great things! I've seen some write-only mess of Max code that generated awesome music and visuals and I've seen some write-only mess of Blueprints code that a game designer made to test out some gameplay ideas. In that respect, I think they've both been very successful.
Another thing I really liked about Max is experimentally developing a piece of code: throwing down a rough outline of what I wanted and then experimentally working towards a solution. One thing that Max allowed me to do that made this super streamlined is to not name things until I knew what they actually were. In text, you often end up with placeholder names. In visual languages, you have some unlabelled boxes or lines. Similarly, the debugging experience of being able to watch values flow through lines was pretty fantastic, as was the interactive development experience that Max provides. Finally, some algorithms are super clear in Max that are not so clear in text, but highly mathematical code does typically look and read a lot better in text.
For the record, I have not used Blueprints, but I have used a number of other visual languages: mainly Max and Flowstone/synthmaker, but also some mini-languages embedded in other tools (visual material/shader creation tools are popular in both game engines and 3d modelling tools).
[1] Max has quite limited datatypes. At least at the time, you could not have lists of lists and there wasn't really any other container data structures. That really limited what you could do (or at least, made the code a lot messier than it needed to be). I suppose the target audience doesn't need a hash map of lists of sets, but as a programmer, I really missed these things. I have a list of stuff somewhere that, if Max had these, it would be my ideal programming environment.
[2] That's if they would write it in text at all. I feel, at least for the musicians I know, they would simply look for other tools if they had to learn textual programming. I think one part of the appeal of visual for some of these people is that it tricks them into learning to program without them necessarily realising it, but if they were asked to learn a textual language they would make excuses about not being programmers. I've seen this happen.
PlayMaker for Unity has the same problems.
Friends don't let friends use tools like that.
I started with C and then turned to VVVV [0] for a while (now using Python). VVVV enabled me to do a lot of media-related things, that I would have had a hard time doing otherwise. It still has a special place in my heart :)
[0] http://vvvv.org
It's only web developers who scoff at tools that improve productivity...
Back when we worked in the area, we could do 3-6 clients per day each, solving every task in a less than couple of hours, including conversation, problem analysis, coding, testing (manual, ofc) and receiving cash.
You'd be surprised. The biggest programming language in actual use is Excel -- which is a case of a visual programming language (turing complete at that), even if it has cells in a grid as opposed to some flow diagram.
And lots of people are programming with visual languages inside tools like compositing pipelines, musical environments like Max/MSP, CAD and 3D packages, business logic definition apps and so on -- with the most popular case perhaps being visual game engines.
Which has cost companies and investors billions and is the most accident prone. http://www.zdnet.com/article/excel-errors-microsofts-spreads...
No Version control no way to audit your code. These also come with visual programs.
Since it handles untold trillions (almost every company processes their financial data through Excel at multiple points) the "billions" it might have cost is a drop in the bucket.
There's a reason why it's used nonetheless.
>No Version control no way to audit your code. These also come with visual programs.
There's nothing about visual programs that say "no version control" (and of course auditing the code is even easier with visual programs). You either add visual-nodes aware version control, or with a text serialization and back, you use git or whatever.
Existing visual languages might not have good version control, but you certainly can provide it. See http://austinhenley.com/pubs/Henley2016VLHCC_Yestercode.pdf
My favorite analogy: Visual programming languages are like a foreigner going to a Korean McDonald's. He can grunt at pictures and get what he points at, but he can only do a limited set of things that were envisioned by the menu planner. You can't get the burger without tomatoes by grunting.
Also a wrong analogy.
You can have 100% power/syntax parity between a visual language and any text language.
Here! But perhaps not as in typical visual programming tools. When I programmed ABAP which is traditionally heavy on methods/functions with lots of in and out parameters I always wished for the possibility to just drag some lines between parameters I want to map without having to declare and use intermedia variables.
From regular developer point of view, I would like to operate blocks that merge/sort/filter datasets (dataflows), visually presented almost the same way they are in conceptual electronic blueprints, where output pin arrays are connected to input pin arrays, both having different names, but wires themselves unnamed. Current flow is not much different from datasets flow.
But the basic idea: data-flowing through visible pipes is valuable. For one thing, functional programming shows that movement-of-data is a viable programming model. Secondly it's a great way to trace causality, helping with those debugging sessions you ask "how did this thing come to hold the value that it holds".
I'm developing my own dataflow language. Before I began, I had already programmed in many different languages and even designed some of my own languages and dialects.
I came to several conclusions about how visual dataflow should be done, which are different from the approach taken in LabVIEW and other visual dataflow languages such as Prograph, Max, and vvvv.
(1) You should only be able to connect vertices (i.e. functions) when their argument/value types are compatible. This allows you to drag an edge in the right general direction and it will find what to connect to, and also means you can develop a powerful type system with type inference built into the editor. This makes the language safe, but why stop at Hindley-Milner? You can add units (metres, flight levels, dollars, etc.) to real number types. You can give the language dependent types to make it even safer. This would eliminate many errors inherent in developing in other languages. And with a good enough type system, you don't need object orientation.
(2) You can keep the language design simple. You don't need special constructs for things like iteration and conditionals. All you need are vertices (where processing is done), edges (along which values flow), constant values, and enclosures/lambdas.
(3) Iteration can often be abstracted away, by having filters operating on streams of data instead of single data items. It might be worth adding an even higher level, with bidirectional flow between processes or agents.
(4) You can define new types by connecting existing types, just like new functions can be defined by connecting existing functions.
(5) Version control and project management can also be done graphically.
I encountered, and solved, some little-known problems associated with dataflow.
My language isn't yet ready for release. (There's only one of me, not a large team.) I've begun work on dependent types. I need to develop a non-trivial application, for which I have a few ideas. The language also needs a compiler. I'll add version control and project management when there's any commercial interest.
Documentation (which I need to update) is at
http://web.onetel.com/~hibou/fmj/FMJ.html
The papers on the site describe obsolete versions of the language but are still worth reading. The tutorials are more up to date.(3) this is very true and simplifies things a lot! Functional languages largely do this anyway, so there is precedent for this already in textual languages. Iteration was always a stumbling block for me in my visual-language-design escapades because, while feedback-loops are a natural way of looping in dataflow languages, they added too much complexity (for example, Max's left-to-right execution order -- I really don't like the horizontal positioning of blocks to affect the execution!), but if the language doesn't have loops at all outside of looping "functions" like map, reduce, range etc, that problem largely goes away to be hidden inside the implementation of these constructs. Nice.
EDIT: Just re-read the tutorial and I see that you do support recursion. I suppose this is the building block for the higher order constructs? Just like many textual functional languages :)
> I've begun work on dependent types.
I've looked at your language before (because dataflow languages interest me), but I didn't realise how much was going into the type system. I will be very interested to see a working version when you are ready to release something. Dependent types sound pretty awesome in any language, so I'm especially eager to see how that plays out in a visual language with a real type system!
There are lots of expressions/functions that need more than "Is the input the right 'type'?" What if the input is the right type, but doesn't have the right count for the expression? How do you deal with that? There are ways of course, but it's not so simple to figure out an elegant, scalable solution.
<< And with a good enough type system, you don't need object orientation.
This might be true, but object orientation is a great way to have a good enough type system.
<< Version control and project management can also be done graphically.
Yes, but it doesn't make it better. For example, in many applications you use a stream of commands and operations in the GUI to get a job done. Operations in the GUI might include things like selections, etc. In visual programming, you might convert that stream of application commands to a set of nodes. It's simple enough at first, but it turns out that things like selections -even selecting a row or two of data- are very, very tedious to do with a visual programming tool (when compared to just doing it in a GUI). What often happens is that you end up duplicating work you'd do in a more standard application by adding dialogs that allow the user to select the data using a standard GUI process and then capture their selection in the node that stores the operation. It's a bit redundant, and it doesn't get around the fact that you're still using a standard GUI to deliver a nice user experience.
There's also another issue with visual programming using vertices and edges.
When you write code, you might declare a variable. Then later on in the code, you refer to that variable. In a vertex-edge model, there needs to be a connection between the variable declaration and anywhere the variable is used.
A vertex-edge model can get ugly and become 'hard to follow' quite rapidly. You have all these inconvenient locations for things, and it can be difficult to try and comprehend a vertex-edge model for some types of code / processes / problems.
Some things are definitely better in a vertex-edge model of computation, but a vertex-edge model is not always more user friendly or more productive for many types of work.
Source: have worked on very popular visual programming tools. I love visual programming for some problems, but I am aware of the many, many, many pitfalls in this approach.
If I could stay on the whiteboard with my pen and compile parts of my program from there, that would be awesome.
Btw: I tried some "Smart" Whiteboards, but they are all just bad quality. Real whiteboards are still superior for whatever you do with whiteboarsd.
I guess a lot of times formal errors and the like will happen on whiteboard. So no, the drawings probably aren't precise enough.
The process needs to be a dialog. Similar to the interaction you have with your compiler: You provide stuff. "Computer says no" (or tells you what is missing/etc) You alter your stuff and give it back to your tool. That loop repeats.
Something similar will be necessary for "whiteboard programming".
I guess it is not as trivial to convert drawings to code as I stated. But it still a tedious task that should be automated as much as possible.
A better name for Delphi kind of tools would be "Rapid Application Development Environment". And it's more convincing name than "visual programming" - I have never seen a successful visual programming environment.