Graphical Programming: I Really Hope This Is the Future
pcmonk.wordpress.com
pcmonk.wordpress.com
- The moment you force a user to pick up the mouse, you have lost.
- It seems very compelling to augment the display with more information, but a lot of it is simply distracting, or reduce the density of relevant information that will fit on the page. There's a reason that even in most IDE's very little additional information beyond syntax highlighting have "stuck".
- Some weirdos (like me) won't touch tools that won't let me work over a dumb ssh connection and terminal when I need to, which is one of many reasons why...
- ... everything needs to have a sane textual format. Another reason is that it is essential to communicating about the code.
If you want to think about this, at least thoroughly review the long history of visual languages, as there are plenty of mistakes to repeat.
We are working on it; e.g. http://research.microsoft.com/en-us/people/smcdirm/liveprogr...
Seriously, it's the future and it has been for fifty years.
At any rate, I understand your criticism. Regarding the mouse, I think you're almost right. In particular, you don't ever need to pick up the mouse to use my program -- there are no menus and no buttons. However, I do, on occasion, use the mouse to move around inside the tree structure. It's not necessary, but sometimes it can be the most natural way to interact. It's never a part of normal coding, but when I'm searching for a bug or surveying the structure of my code, it can be useful.
Regarding ssh, yeah, I know what you mean. I just hope that the benefits outweigh that unavoidable disadvantage.
If you just want to let out your thoughts, then, no problem!
I have been "writing" IVR applications for a call center. The interface is far from intuitive, and it is jsut too easy to miss what is actually going on. The loops and if statements are all there, but you have to click through on the item to actually see what is going on.
Forget trying to find an easy way to locate where something is. at least in my case (VXML) I was forced to use grep to at least give me an idea of where to look, then spend 10x the amount of time it would take in plain ol code to find where to make the change.
ugh.
give me ASCII code any day
Lisp programs can be represented as trees because they are trees. They can also be represented as lists, and this is because they are also lists.
The important difference between these representations is that trees the primary representation by which computers unravel the intent of a Lisp program and lists are the primary representation by which programmers express intent in their programs.
Sure some people sometimes picture their lisp program as a tree, but usually when a programmer pictures something as a tree, it is when viewing it as a data structure. Picturing a Lisp program as a tree is easier than picturing the tree represented by code in most other languages because of Lisps simple parsing process, but the way in which a programming language is parsed is an arbitrary feature of the language [though one worth design consideration].
Although it is easy to draw a tree. Often in Lisp and other languages, the verbal diagram "a list of lists of ..." is adequate to represent a tree along with a description of its interesting properties. Again, while the interesting properties can be represented graphically, what makes them interesting are the maths underpinning their structure not the aesthetics of their spatial representation.
"The purpose of this project is to assist the coder in developing more complex code faster and easier"
This is orthogonal to Rich Hickey's goal of making it easier and faster to produce simple code.
http://www.infoq.com/presentations/Simple-Made-Easy
We already have a great tool which allows graphic methods to be used easily to create complex code. It is called Excel.
You're right that this is orthogonal to Rich Hickey's goal. That's because I think his goal is great for writing simple programs. His goal is to make more programs simple, which is great. My goal is to make it easier to write complex code. As Fred Brooks talks about in No Silver Bullet, there are some problems that are accidental and some that are essential. Hickey is trying to solve the accidental problemms, and I'm trying to make it easier to solve the essential problems. Some logic is just inherently complex -- I want to create tools to make it easier to reason about.
And Excel is not nearly programmable enough to be better than a textual interface to solve the same problems. It's benefit is that it can be used (relatively) easily by non-programmers.
Excel is entirely programmable using the standard .NET stack and languages [from PowerShell to F#].
If the idea is to target the tool as a new IDE for experienced programmers, how does improve productivity over EMACS or Vim etc.? Or without it being an extension of one of those existing ecosystems, what is gained in exchange for all that is lost?
Which suggests to me that incorporating the functionality as an extension to one or more of those ecosystems might be more simple than competing with them for experienced coders.
One of the things I wish programming tools offered, was a way to "zoom in" details wise on a solution. More than just offering an outline, I want there to be some sort of representation of how things went from conception to realization. Consider, the story boards for movies/games. Those story boards are lost in the final product. Worse, when you are looking at a piece of code, you don't really see the "why" of what it was made for.
Sure, you get some of this with descriptive names, but that really doesn't help with what I'm wanting to say here. An example, that I really want to explore some more is graphviz. It can go from text to graphics. This process is fairly static, though. If it doesn't turn out how you want it, you have to edit the text and fire it again. I want something that can possibly go from text, to initial graphics where I manipulate it some more, to final representation all in a repeatable way. (I think this is possible, but I am not familiar with the toolchain.)
More, there is no reason I shouldn't be able to start from graphics, go to a textual details portion, at varying levels of detail, make edits, and view what effect they have in the viewer.
Imagine, something similar to developer tools in chrome/firefox, where in addition to being able to look over at the boxmodel for details, you can physically move elements around.
Of course, I'm a bit of a heretic. I would kind of like to be able to export absolute positioned style sheets for forms designed this way. :) Still not sure on all of the reasons that would be terrible.
The thing you are looking for is all over the place, in various IDEs, in QT MOC, in literally DOZENS of VPL (Visual Programming Languages) and even to a lesser degree in UML (Unified Modeling Language). Since we have QT MOC in the mix, we could even through in ALL the meta compilation tools, which adds in hundreds of others.
What you want isn't so much unique, as already done and discarded. You end up with tightly bound IDEs and code, you end up with hard to manage binary nonsense, you end up with ridiculously hard peer review and change tracking.
As for tracking the "why" -- use any method you want -- my team uses -- story boards! They work perfect for software.
So, is there a well done version of something like this out there? I should stress that I do not spend most of my time looking for this. I'm too busy getting things done in my current flow to reinvent a new one.
http://msdn.microsoft.com/en-us/library/vstudio/jj739835.asp...
http://msdn.microsoft.com/en-us/library/vstudio/dd409365.asp...
PS: pricing is the sad bit :(, but there is no competition in this area. I hope JetBrains will work harder.
I cannot afford Ultimate, just Professional, so I admit I have no hands on experience with the tool.
What JetBrains product is comparable?
I'd argue that you need help if you're not using some auto-generated visualization to view relationships in code, because the alternative is to scan through files manually.
The choice of diagrams, lists, or some other visualization is irrelevant, it's the preference of the programmer.
A graphical language would be best used to display structure. Bonus points if it allowed changing. The rest, modules if you will, can be better described by text.
EDIT: Or even http://www.youtube.com/watch?v=L6iUm_Cqx2s
http://visualstudiogallery.msdn.microsoft.com/eedc48e7-5169-...
http://blogs.msdn.com/b/vcblog/archive/2012/07/12/10329460.a...
http://msdn.microsoft.com/en-us/library/zayyhzts.aspx
http://visualstudiogallery.msdn.microsoft.com/c7e02633-86d9-...
It's so painless for me to open up a webpage and solve daily chess puzzles... on the other hand it seems more painful to open up an IDE and start solving code "puzzles." I wish I could visualize all the pieces of my software similar to chess.
Regardless of the interface, programming is "work", linking up different interfaces, checking edge cases, conform to protocols...
It would feel more like glorified data entry than solving chess puzzles.
Sorry about the snark, but while I'd love someone to succeed in this type of quest, I believe this one is based more on ideology than rigor. Stuff like "WYSIWYG editors are basically evil" just doesn't give me confidence.
Graphical programs are similar to circuits without memory, and thus are less powerful then Turing machines. As a result, graphical programs quickly grow in size, and growth happens in 2 dimensions, which makes it very hard to read them.
One of my main gripes is lack of version control integration. I want to use something like git, and I want to be able to easily and succinctly see what's been changed by who.
You have to look at the "code" only using their own GUI tool. Large functions involve lots of scrolling, and at least with Labview, I was not aware of any means by which to jump around to specific parts using hotkeys or such. You'd also have pages of logic stacked on top of each other, where you can only view one page at a time.
If you're implementing something that is going to closely resemble a circuit of some kind, I suppose it is OK, but when things start to get complicated, I found the system cumbersome to navigate. This impedes comprehension, and invites mistakes.
I've also used this other GUI-driven code generation system, and that had serious issues too. It has this hilarious graphical view of all the components, showing how they are connected to each other. However, due to the limited size of the window, it will just stack all the components almost on top of each other. If you started the laborious process to move them around to see what is going on, your layout would not be saved.
So, anyway, a modest proposal: Figure out how to display an existing programming language (maybe a simple one like Lua) with a graphical view. Allow me to easily navigate through the code, and let me see all the details easily.
All of which means that they excel at connecting the big chunks of the system that build on top of some model of service provision and protocol definition, but poor at engaging in the "direct dialogue" of imperative or applicative computation.
The part that makes people say "it never works" is that we're almost always thinking from an inverted model, where we know how things scale up and down with text, and apply that learned experience to graphical systems. Subsequently, our engineering instinct leads us to put a similar degree of granular agency into graphical coding and allow the standard constructs (looping, branching, subroutines) to appear in it, which massively increases the complexity of the system and brings us away from problem domain thinking.
My recommendation now is - figure out a data structure that could be interesting to visually edit. Make a good editor for that. Allow imperative code a runtime model for accessing it. Allow imperative code to be called from it. Then it stands at least some chance of not being a bad wheel reinvention.
Then in the early-to-mid '90s, I came across a product called Prograph that ran on both Windows (I did a lot of programming for WFW with it) and Mac (OS 8 I believe). I loved that system, and realized it solved some of the syntax issues I had using flow-charts, but it still never really took off. The concept lives on with the Marten IDE though I'm not sure how many people are actively using it.
Such as graph-transformation based tools for software verification, in which your programs are graphs. http://wwwhome.ewi.utwente.nl/~rensink/papers/spin2006.pdf
Which is useful for software verification, but writing your actual program in it is cumbersome.
Software is a lot about abstractions, and there is no reason that graphical programs are better at representing abstraction that text (or maybe im wrong here?).
In theory, that what you can represent in graphical-form you can also represent in textual form.
However the information density with an 2D graphical form is much higher than textual form. And the more information you put into the same space, the more difficult it is to reason about it. Thats why textual programming is still very much popular.
In fact, I really only find myself using the command line for, you know, running commands. If I find myself there a lot, I'll check myself and start to think, "can I start putting all these things I'm typing into a Rake task or shell script? After all, the more I'm there, the more chance for user error.
I think the only major task I still use a terminal for is looking at log files. I intend to eliminate that soon enough when I can 12-factorify the app I'm responsible for and find a decent graphical log viewer.
Works in some cases, but not in all.
I used graphics to represent databases, and their relationships, because it's more easily understood than several hundred lines of code. It fails to tell the whole story though, and thus only serves as a thousand foot view of what is going on.
Delphi (for Windows, 1995-on) had a very nice graphical IDE which was good for developing graphical user interfaces in an object-oriented programming style. The rest of the IDE was fine for editing and debugging. But it was great for GUI development.
You've identified a critical problem with graphical programming today: it fails to tell the whole story. This is exactly what I referred to in the post, and that's not inherent in the medium; rather, it's just that people have been trying to solve this problem in the wrong way.
: I can think code (both concepts and actual implementation) way faster than I can output it in any way.
I doubt you can. You can have the psychological feeling of thinking you've developed the concepts much quicker, but in my experience it's only when I start doing the actual implementation that the full level of precision I need becomes clear, and its that level of precision that slows me down, not the need to physically press keys.
I meant the interface the other way around. From your brain to the computer, without any mechanical inert pieces in between. As for the prediction part, note that it exists already in a very early stage and it's extremely likely to only grow. Can't find the exact artical atm, but it was used to move a mouse on screen by someone who couldn't move anything below their head anymore.
I doubt you can
Maybe not on all levels, 100% sure I can for some. Simple example: C++, I need a basic iteration over a sequence. I just think 'ok gimme a for_each on container Foo, calling function Bar'. No matter how advanced the intellisense or whatnot is, it will take me more time to properly type the needed line.
This article is a good example of thinking that's not even near the walls of the box, much less outside. And what's that crazy digression about wysiwyg editors? And then the author drops this one: "Thus, this isn’t really about graphical programming." Derrrrrr.
We are barely at a point where we admit that evaluating a language syntax in a vacuum is silly, so people are still surprised that "verbose" Java is popular, despite the advantages static types and an intermediate language confer on the editor, compiler, static analyzer, debugger, etc. A less than holistic approach to graphical languages is probably doomed.