Hacker News new | ask | show | jobs
by nikofeyn 3308 days ago
then why does everyone sketch a picture when trying to convey an idea? text is obviously useful but so is visual information. the complete dismissal of visual programming by text-based programmers is often infuriating. visual programming can provide an immediate indication of structure and dataflow, something that text-based languages struggle with.

in my mind, the best case scenario is some sort of hybrid, where visual and text representations take over on what they're best at, yielding to the other when it makes sense. the way people work on mathematics is a great example of this. drawings, diagrams, graphs, shapes, etc. are used to convey structural information where text and symbols are used to convey more detailed, descriptive information.

12 comments

> then why does everyone sketch a picture when trying to convey an idea?

Does everyone do that? I think I very rarely do. When I need to convey an idea on a whiteboard, it's still almost completely text, with a few extra symbols like directional arrows that I think are still effectively just symbolic written language.

Literally the only time I can remember sketching a picture to convey an idea is while playing Pictionary. The entire premise of that game is that it is much more difficult to get someone to say a specific word by drawing a picture than by simply writing down the word.

Sometimes they do. In my view the most prominent example is documentation for installing computer hardware and software on Windows computers. The instructions will be a series of pictures, with circles and arrows, and a paragraph on the back of each one (sic). This goes on for page after page. And when the OS is updated and the dialogs all change a bit, the documentation becomes confusing or even obsolete.

In contrast, the instructions for the Linux version of the same thing will be something like:

    sudo apt-get install this
    sudo bing bam boom
    ...
I also hate that, but I always felt it was more a failure of the documentation writer than the GUI. "Click File -> Settings -> Whatever, open the Something tab, and click the "Do It" button under the Stuff subheading" can easily replace half a dozen unnecessary images.
GUI is documentation. If you have to document how to use your GUI you are doing it wrong.
It's not practical in a modern operating system to put every possible function at your fingertips and intuitively discoverable. There are better and worse ways to organize things, but there's just too much stuff to put all off it front and center.

GUIs are still much better than a command line in this respect, since with a GUI it's actually possible to find what you're looking for by randomly exploring, even if it's not always quick or practical.

One issue with GUI's is that you're sometimes stuck telling someone how to use a GUI that you didn't develop, for instance having a user manipulate settings in the device manager, which was created by Microsoft.

One thing that's rapidly improving on the command line side is Search. On my modern Windows computers (8 and 10), I don't search for things by hand in the dialogs any more. I press the Start button and start typing text.

For instance, Start plus "device manager" brings up the device manager, whereas I have no idea how to find it in the menus.

I quite often use UI mockups to show an example of the end result (or ask others to do the same). It doesn't even matter if it's correct, but it's a useful way to start a discussion. I've tried to do this in words but often different people have different interpretations and it simply doesn't work without a picture.

I've also found it very useful when people are asking for things that don't entirely make sense, such as a chart/report that would require 3+ dimensions. By asking them to draw an example, they realize the challenge and we can make progress.

"Picture is worth thousand words", but if you just need ten words, maybe it's not worth the effort to make a picture?

It depends on context. If you want to show how and UI looks, then it's probably faster and better to just draw it, but if you want to show how function transforms a string, then it's unnecessary to draw bunch of stuff.

I consider UI mockups the perfect usage for visual programming environments. Obviously a visual product compliments a visual development interface. However, it's a very narrow realm compared to the rest of the programming universe.

It's the same as saying that drawing a picture is easier for most people than programming a picture, and it doesn't really have to do with the topic of visual programming, but rather visual design.

> I consider UI mockups the perfect usage for visual programming environments.

It can be, though the type of mockup I find more useful for discussion is much lower fidelity than that.

The feedback and discussion around a mockup is related to the fidelity.

Low fidelity, such as whiteboard or large sharpie drawings, will garner feedback that discusses whether this UI even makes sense at all, if there's a different approach, or how feasible it is to present everything this way.

Mid-fidelity, such as digital mockups, will often focus more on the actual layout, text labels and contents.

High-fidelity, such as a working prototype or something done in the actual environment (visual programming environment, or even as working HTML+Javascript+CSS), will often get into a discussion about font sizes and icon choice.

If you build a high-fidelity mockup when you really want to have the low-fidelity discussion you're doing everyone a disservice. Even if your team can see past it and still has the appropriate discussion, it's a waste of time.

For that reason, even when my mockup is basically a small modification to something that exists already, I'll often screenshot it, and then freehand draw (MS Paint style) overtop of it with my modifications, using ugly 2-4px wide lines. I've tried both, but consistently found the feedback is better that way -- even when the target audience is a bunch of developers that should be able to see past it.

Ah, I see what you're saying.

Seems like you've done quite a bit of this type of work, I've the exact opposite. I guess it makes sense that the fewer data points the clients are given, the more they focus on the broader picture.

Would you often start with a napkin drawing-esque mockup, and add detail to it while cooperating with the client, or would you sometimes start with a finished HTML+JS+CSS prototype and change things up as they request?

I'm not a graphic designer, so I generally try not to do things that focus on the design -- which means I tend to start on the whiteboard/sharpie/napkin side of things.

That said, some people just can't picture how things look unless you show them how it looks, and in the past I've worked with clients that would think it's literally a joke (and probably fire me when they found out it wasn't) if I come to them with a sharpie drawing.

I think the only times I've gone to a more high-fidelity version up front is when the client/stakeholders had no idea what they really wanted. A "finalized" mockup can start the discussion (even if it turns out to be entirely wrong) and then be used to get into the low-fidelity whiteboard/sharpie mockups. The important thing is to keep the discussion focused on the right thing, and don't stray into fonts/images/icons if you want to talk about the overall structure and what pages even should exist.

Pictures are a mission critical for my thinking and my communication in software engineering.

I would be hard pressed to discus the operation of any sort of datastructure beyond a linked list without sketching. For example a binary tree and it's traversal routines are (at least to me) much easier to understand with a picture along side the exact state.

It depends on what kind of idea you're conveying. For many things, yes, text-heavy diagrams are the best way to go. If you're trying to, say, explain what a claw hammer is shaped like, that is much easier to do with a simple picture.
I find it's useful for sketching out high level designs, particularly showing how different components interact, or the flow of data through a system. Visual information in this context trades off specifics for a birds-eye view.
Godel, Escher, Bach covers this in great detail. Symbols are a weird idea in the human brain, and there are multiple pseudo languages throughout the book that when you really sit down and think about it, aren't any less ridiculous than the notation we use for mathematics outside of that book.

My idea-book (is that a crazy person thing?) is probably a lot like what you're talking about. I use words for my main data, different arrows going in between each sub-idea, and then sometimes more words attached to each arrow ("pub/subs", "queries", "happens once/happens always", etc)

I think that people who think visual programming could be a thing ought to sit down with APL for a few weekends, until they have the epiphany of "oh, the code is the same as the notation for what I'm actually doing" and suddenly they realize that notation and code are interlinked, and each are basically useless without the other, in the same sort of way that x--p--p---- is exactly as valid as 2 + 2 = 4, without context.

I get the allure of NOT having to write code, but it shouldn't be so difficult for people to realize that it's a ridiculous fantasy.

Write fibonacci(N) in ANY visual language, and tell me you couldn't have done it easier, faster, and more coherently in python or whatever. It's obvious.

> Write fibonacci(N) in ANY visual language, and tell me you couldn't have done it easier, faster, and more coherently in python or whatever. It's obvious.

  [0]   [1]    [x]
   |_____|(+)___↑ ...
> Then why does everyone sketch a picture when trying to convey an idea?

Because pictures are helpful, but neither necessary, nor, in most cases, sufficient. Just look at the use of pictures in science and technology generally (e.g. circuit schematics, Feynman diagrams), and try to imagine understanding what is being presented without reading the words.

I have seen examples where pictures can help a lot (I am thinking of a pictorial demonstration of the Pythagorean theorem, for example), but I am not aware of a constrained pictorial formalism that is both general and expressive enough to do the job of a programming language (directed graphs may be general enough, but are not expressive enough; when extended to fix this, they lose the generality.)

>The complete dismissal of visual programming by text-based programmers is often infuriating.

I, for one, would be thrilled to see an example that actually works. Arguments that it should work don't count for much, otherwise.

There are some hybrids that are pretty useful in their areas of applicability, such as state transition networks, dataflow models and Petri nets (note that these three examples are all annotated directed graphs.)

Check out this video. He has a nice explanation. https://www.youtube.com/watch?v=4_SvuUYQ5Fo

Basically, painting/diagram is good for more abstract overview, and text/code is for more specific instructions.

> Check out this video. He has a nice explanation. https://www.youtube.com/watch?v=4_SvuUYQ5Fo

>Basically, painting/diagram is good for more abstract overview, and text/code is for more specific instructions.

very well Said ..

Sketching a picture can help for certain classes of problems, but I think that is far from universal: it often tends to be of less use for logical concepts than structural ones, for example.

Beyond that, though, even when a sketch is a useful tool, I find I seldom use the computer to create it. A whiteboard, notebook, or back of an envelope all seem easier than working with typical graphical input mechanisms that are commonly available. Good touchscreens are a step in the right direction, but still far from perfect and far from universally available, especially on desktops. Aside from any innate problems with graphical programming in general, I think this input problem makes the approach generally unappealing at the moment. It's not an insurmountable issue, but until there are good input mechanisms that are as common as keyboards, I think you will just find that it is hard to reach the critical mass a new representation needs.

I know that input speed is not really a limiting factor in most programming, and maybe shouldn't be the deciding factor, but given how attached to their text editors programmers already are, and how disruptive and frustrating it can be to have to switch, I think it's clear that it is an issue.

A picture is better than 1000 words. But, which words? or for programming, which code?

Most visual programming efforts focus on representing algorithm logic with diagrams. But I think the difficulty to understand most complex programs (from my own experience) lies in the complexity of data structures, not the code logic. Reasoning about the algorithm is like reading a story, it is kinda intuitive; but for a large data structure (say a big struct with more than 20 fields), it's very hard to keep all those in your memory, you always have to go to its definition to refresh your memory, very frustrating. One of my tricks for reading a large open source project is to first find all the key data structures, draw them and the relationships on paper, then reading the code becomes easier and more pleasant. So maybe if a visual programming UI displays data structures with a visual format always on screen, it can help boost coding productivity.

Because that way you can abstract away lot of fine complexity and communicate higher order ideas faster

That still means you need writing to express all the intricacies of programming the details.

Alas hybrid languages where you can link developed blocks visually exists and works (bpel, webratio), but no pure visual language could let you describe the intricacies of taxation in a sane way

The problem with having 2 representations of the same piece of information is maintaining them in sync.

If we use text for specific and visual for abstraction, we still need to maintain both and there are no effective tools to do that without creating additional work.

There are solutions to this. A) Let one representation be derived from the other. Easiest by making the derived representation read/view-only. B) Encapsulate the specific/low-level details into a generic black-box, which can then be composed.
Because each method has its pros and cons. It's a difference of generality and specificity.

Consider this list as a ranking: 0 and 1 >> alphabet >> Chinese >> picture.

All 4 methods can be useful in some cases. Chinese has tens of thousands of characters, some people consider the language close to pictures, but real pictures have more than that (infinite variants).

Chinese is harder to parse than alphabet, and picture is harder than Chinese. (Imagine a compiler than can understand arbitrary picture!)

They do that when the idea is visual/geometrical or when they use an imaginative visual model to process it, which is one of the things we actually do with text. Text evolved specifically to assist with ideas images(glyphs) could not.
If you're referring to icons, good and clear icons take a lot of time to design.
They are adding words in the form of thoughts or speech to describe the drawing.
that's not always true. the visual representation of an idea that can also be conveyed in text can oftentimes provide additional information not easily gleaned from the text-based representation. the easiest example of this is the visual representation of the graph of a function. a more advanced one is feynman diagrams. also think of symbology that is so ubiquitous in mathematics. it's much easier to write x_n->x absolutely rather than detail out the text-based definition of absolute convergence. obviously this latter idea is close to writing a function or procedure in code that consolidates an idea to a smaller textual representation, but symbology in mathematics far outpaces that of symbology in text-based programming languages.
There are hybrid languages, like Python... Visual whitespace denotes blocks while visual symbols like "if", "for", and "def" denote the meaning of those blocks.

(and sane programmers use visual layout to convey structure in every language)

I don't think that meaningful whitespace counts as "visual programming." That just means that a whitespace character has meaning, just like a word character or a punctuation character. It's still purely text-based. I think that "visual programming" means that the editing environment to some extent visually represents the intended outcome of the program. WYSIWYG web editing is the obvious extreme example of this. Whitespace in a Python program has no visual correlation to the output of the program.
Ah, I see. But other than WYSIWYG editing I'm having trouble imagining how a language could be general purpose and could still be visually representative of the output of the program rather than the behavior of the program (much like the visual layout and syntax coloration of modern text languages conveys).

Are there other examples of those cases?

Edit: maybe I was presumptive to assume that they had to be "general purpose". Are we talking about more narrow domain-specific languages here?

Now that I Google it a bit, it seems you're right that my definition of "visual programming" is too strict, although I do still think that most people wouldn't consider Python's whitespace to qualify. It looks like most so-called visual programming environments are effectively visual diagrams of standard control flow mechanisms like loops and conditionals.
The point I was trying to make is that the text in a programming language like Python is like a visual diagram of standard control flow mechanisms. I can see the for loop, what it iterates, and what the body of the iterator is. The language has visual clues. And with syntax highlighting it's even more visual.

But, I get that there is a class of visual languages, often dealing more with interconnected nodes like a directed graph, for which graphics might be better at communicating. But they seem more domain-specific rather than general purpose programming (like most text languages).

I think the "visually representative of the output" isn't a suitable way to describe it.

The visual language I always think of is LabVIEW. It is very different than a textual language.

No it's not. A for loop is a block with inputs, a space for sub-blocks, and outputs. To add an iteration limit, a box with a literal number can be attached. This is visually represented of the program's flow graph. Which does make sense when actual signals are concerned, to extend the wire metaphor of analogue equipment. Reason did that too, where instruments had a back pane to connect them to effect panels via actually visualized wire plug-in. Buzz or unreal blueed apply the same idea, as does model-sim. Block diagrams are just a very popular abstraction in signal theoretic topics. So Algol syntax, the languages like C being close to the hardware, uses the same visual metaphor.

Erlang (Prolog) for example doesn't so much. Sure you have parameters, but matching blocks aren't strictly evaluated in sequence.

> This is visually represented of the program's flow graph

LabView is more of a data flow graph than a control flow graph, aside from the boxes that represent deviations from the usual rules (For loops, conditionals, sequences, etc.)

This isn't as much pedantry as it might seem... this is one of the big differences between LV and 'traditional' programming... LabView evaluates its data flow graphs in data-dependency order, which can also mean evaluations are done in parallel. (IIRC, for linear execution speed, wires in LV all have a fixed type and blocks can be compiled to machine code with an LLVM back end.)