Why isn't there a general purpose visual programming language?
blogs.msdn.com
blogs.msdn.com
The author doesn't mention LabVIEW, perhaps because he is not a scientist. LabVIEW is a visual programming language -- you construct software by connecting little icons together with wires.
LabVIEW has been around for decades and is a big success. Lots of science labs use LabVIEW, because (a) it's a National Instruments product and interfaces perfectly with National Instruments interface cards -- which have been the industry leaders for years; (b) it has drivers for every instrument ever; (c) the visual paradigm does work great for GUI design and layout. (Which shouldn't surprise anyone who has used XCode or Visual Studio.) Scientists love the ability to throw together a chart recorder application in ten minutes, and then wire it up to everything else in the lab, and LabVIEW works great for that particular use case.
Unfortunately, as you go beyond the most basic of computations or out of the environment's sweet spot -- in other words, as you try to use it as a general-purpose programming language -- LabVIEW just gets more and more painful. It has its own special vocabulary, semantics, and design patterns that are unlike everything else you've seen. Every time you want to define a subroutine you need to create a little icon for it, and define its arguments in terms of little panes on the icon. That's slow and painful and limiting; it makes writing Java in Notepad feel like luxury. But you have to stay disciplined and keep defining those subroutines, or your code will literally turn into spaghetti. Oh, the horrors I have seen. It's particularly awful if the code sprawls over more than one screen.
You can't effectively print out the code. It's hard to blog and hard to quote snippets from. To refactor you have to manually rearrange icons; there's a lot of time wasted laying things out. There's no way to use version control or create a patch. There's no search-and-replace.
Think of emacs. Now think of Notepad. Now think of something that is less useful than Notepad, to the same degree that Notepad is less useful than emacs. That's a visual programming language.
Diagram cleanup tool sounds interesting. I'm old enough to remember the earliest version of LabVIEW, which as I recall forced you to rewire every connection to something whenever you moved it. Now that was torture. When I went back a few years later and found that wires would automatically follow you around it felt like Christmas. Perhaps the cleanup tool is an equally big win.
Version control and diffs sure would have been handy when trying to clean up some of the terrifying things I inherited back in the day.
None of those problems are intrinsic to visual programming, only to the IDE for one. None of those problems seems particularly hard to solve as far as I can see.
If you've still managed to dodge enlightenment, repeat one layer down on all functions your function calls. If you happen to ascribe to the "one method = one line" school of OO design, then this is mandatory, and you have to complete the transitive closure of your call graph. Complexity can not be removed, only moved around. If it took you less than five minutes, you are now assigned to take the largest function in the source code.
You will attain enlightenment.
If you still don't believe me, grab a literal pen and a literal piece of paper and literally, in real life, conduct this exercise until you do believe me. The human mind is quite skilled in handwaving to itself; the paper will not permit that.
To me that seems misguided. When it comes to parsing a stream of text into concepts, humans have hardware acceleration. You're doing it right now, effortlessly.
Visual formatting cues can help, but only at a pretty crude level, compared to our sophisticated understanding of language and grammar.
Furthermore programming requires that you extend the notation every time you use it. This implies that programming can only be represented well with combinations of symbols, of which the example par excellence is text.
One such place I can think of would be a video/image query language, e.g. for querying Flickr, that allows users to create complicated queries from image primitives.
Asking if it matches the efficiency of C is a difficult question as it ultimately depends on what type of problem you are trying to solve. For instance, if you're looking at performance-critical low-level bit-banging code, I'd choose C over LabVIEW. But if it involves data acquisition, analysis, and display, I'd choose LabVIEW over C. Each language has its own domain that it excels at where its efficiency (and expressiveness) peaks.
That is, dataflow orientation is distinct from being visual.
I implemented a dataflow-like language for UI binding in a web framework once upon a time, and it worked very well. Changes to domain objects in business rules were reflected on the web front end without explicit effort on the programmer's behalf, other than binding expressions associated with the front end's control layout description. The update responses to front end requests (e.g. button click events) were communicated via minimal AJAX, because the binding knew only to send an update when a calculated value actually changed.
But having had all this experience, I would still not recommend using a graphical language for it except for UI control positioning.
I think many seasoned programmers forget that for the non-programmer, syntax is a sizeable impediment to getting a working program and so I'd imagine removing syntax as a source of errors would open up programming to more people.
Sure, you can come up with a more general purpose visual esolang (http://en.wikipedia.org/wiki/Esoteric_programming_language) but how would this match the efficiency of programming in, say, C?
I don't think this comparison makes sense — how can you compare the efficiency of a programming environment to that of a programming language?
The analogy I'd draw is that programming in most editors is like that terminal app, you can do anything even if it's totally illogical and breaks horribly. When I read the question posed at the end of the article, the image that came to mind wasn't a pointy-clicky diagram monstrosity but more of an Intellisense with a tight input guard and strong visual delineation of blocks; a Python with even tighter structural rules rather than a UML on steroids.
I didn't understand your point about a "programming environment"
Either way, they the essence of what they need to learn is the same: translate their ideas into a weird language. I'm not convinced that fitting shapes together is more helpful in that regard than a parser with good error messages and an IDE that does syntax coloring and code completion.
Yes — the idea being to replace syntax and/or logic errors with just logic errors.
Either way, they the essence of what they need to learn is the same: translate their ideas into a weird language. I'm not convinced that fitting shapes together is more helpful in that regard than a parser with good error messages and an IDE that does syntax coloring and code completion.
I seem to be the only one for whom the words "visual programming" don't conjure an image of weird shapes and diagrams — but I've already said that http://news.ycombinator.com/item?id=1496529
There's strong evidence that evolution of human language and ability to think with abstract concepts are related. Programming is all about abstractions. It might be even harmful to move to mainly visual programming paradigm.
Visualization certainly help in certain subdomains, for example state machines, but, as said, there might be even biological bias in favor for text-based programming languages.
http://www.smalltalk.org/ also http://www.squeak.org/ http://selflanguage.org/
Now dataflow programming languages, which are often visual, are naturally parallelizable in the same way functional languages are, but this is not related to their visual implementation.
The small is type systemic. Machine proofs show that you have written your typable logic correctly.
This is still not at the level of concurrency or machine assistance to which I am referring.
You are getting closer with dataflow programming languages. Pipeline and compute farm visualization, spatial/resource quota policies and control, and process calculi equivalences proven across visual/spatial refactorings is what is needed.
Of course you can do all of this with a linear byte array. Of course you can get more dimensions with names and references.
Unfortunately, these methods are very specific and very technical and, despite their accuracy, are relatively devoid of meaning at-a-glance. In the future, a domain expert will work with a programmer to build an application which the domain expert will then operate and monitor. This is not possible without heavy use of graphical interfaces and visual representations. This is not possible without an advanced type system and an easily constructible syntax for DSLs and DSL graphical front-ends.
Perhaps you wouldn't classify this as a "visual programming language" as most of the programming itself is not done via virtual objects and connections. However, visual system tools will become increasingly important as programming moves from implementation to specification and control.
This has been in the future for at least 30 years, by my knowledge of the literature. In fact, it's been in the future for so long by now that it seems to be in the past, by my reckoning.
i have dabbled in creating a visual programming language for c#. i have a lot of code written. contact me. http://www.thedirtydeveloper.com
Now, imagine 1 million line of code.