Coffeehouse Thread

27 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Visual programming language vs text based programming language

Back to Forum: Coffeehouse
  • User profile image
    Jason818

    Is using a visual programming language any thing comparable to writing code using any other text base language, i.e. C#, Python, F# Is a text base language more powerful? Easier to use?

    I once used a program that used a visual language to get the computer to do things. Some amazing programmer wrote it using Visio as the interface to connect triggers and set up parameters. I didn't even know I was programming when using it. When I look at HTML or other forms of code I see gibberish. I don't know if that has to do with my dyslexia or because I have never learned a language.

  • User profile image
    Proton2

    Many years ago during an open house at B.C.I.T., I visited a class that was using a visual programming tool to create apps. I actually felt sorry for them. The skill required for one thing is reliant on the tool you use and is not very transferable, especially to computer programming using a language. I don't remember what they were using.

    I used Object Vision by Borland for a short while. I could not get a second page to come up no matter how hard I tried. I switched to Windows programming using the C/C++ language right after that, buying an extremely heavy large box of soft covered books and floppy disks from Borland.

    I had no idea what language to use at the time and was lucky to choose what turned out to be correct one for the future.

    I have used visual tools in Microsoft Access to create the SQL queries. But after a while, after peaking at the SQL statements created, and getting familiar with the syntax, it became easier to just type it out instead of using the visual tools. In some regards this is what will happen to you once you start programming. At first the code looks complex, like gibberish:

    When I first got interested in programming for windows, I bought a book called Peter Nortons Windows 3.0 Power Programming techniques. I was very surprised at what went on to create a running instance of a Windows app. My prior experience was you write some code then you ran what was written. No compilation, no resource compilation, merging and linking, pre-compiled headers... I had never come across any of that before even though I took computer science classes at university.

    And the code. Lots and lots of meaningless gibberish code, to me at the time.

    That D word. What's that DWord text I see sprinkled all over the place in the code. Whatever could it mean. No explanations anywhere, no mention of it in the literature or the documentation. That elusive DWORD explanation haunted me for a month before I discovered its meaning.

    Todays software, not to mention the Internet, would have shown me the answer within seconds of its first encounter. The world has changed remarkably since I first started coding. I'm glad I just missed coding with punch cards. Smiley 

  • User profile image
    cheong

    I'm still more used to writing HTML by typing instead of drag-and-drop. So you can tell.

    IMO, test based UI design gives you more precision the layout. And (more on web in this statement) by the way there are visual layout problem that can only be fixed by adjusting CSS styles. If you use a visual designer to drag out the layout you will have a hard time to find out where to start.

    Also, there are some "gitches" about these visual designer that makes you think that they're "not designed to be helpful". Anyone tried to use "box and line" to draw grid in Crystal Report and with "snap to grid" feature enabled will tell you that. In that case I prefer to create all the grids using lines instead of "lines + boxes" mix.

    And for Winforms, I found it's convenient to just perform global replace on the .Designer.cs file to siliently shift from one datasource to another when moving the form to a new project and BOOM, the code and designer runs well.

    So I can say while it's nice to have "Visual", I may like it or not, and please always give me text-based as fallback. Don't hide UI layouts in cryptic metadata.

    Recent Achievement unlocked: Code Avenger Tier 4/6: You see dead program. A lot!
    Last modified
  • User profile image
    Dr Herbie

    , Proton2 wrote

    *snip*

    I have used visual tools in Microsoft Access to create the SQL queries. But after a while, after peaking at the SQL statements created, and getting familiar with the syntax, it became easier to just type it out instead of using the visual tools.

    *snip*

    I still find this to be the case.  When creating a XAML UI, I generally find myself typing most of it out rather than using drag-and-drop.  I only resort to visual tools for things like animations where I'm too slow and stupid to make all the calculations required.

    Visual tools can be useful for non-programmers to set up some logic, but for me it always comes down to written code.  With visual tools you are all too often limited by what the original developers thought were the types of things you would want to use them for (just the same as using some framework libraries).

    Herbie

  • User profile image
    Richard.Hein

    @Jason818: Text based languages are visual ... but I digress into philosophical ideas.  Text is more concise, usually, than visual languages because they are symbolic of some mental concept and if you have to draw a rectangle or something to define boundaries,that ends up being extra noise with no syntactical or semantic meaning, and instead, some label on that shape is what is actually important. Because of this, and other reasons, visual languages end up saying very little in a lot of space.  If you imagine a visual language and take away all the things that have no semantic meaning, you'll likely be reduced to text, and some variety of lines or arrows connecting text in various ways.  Then eventually you'll reduce that set of text and lines to what amounts to something like mathematics or Haskell.  Visual programming tools can be used to manipulate text in some ways, or help understand some meaning of a specific subset of code, but it's a real challenge to eliminate noise and end up with something succinct, without ending up with just 1 or 2 dimensional text. There are exceptions.  Obviously, with something like a web page in HTML, viewing the rendered HTML is much more succinct and direct than trying to parse the HTML to understand what it will look like in the end.

  • User profile image
    Bas

    , Dr Herbie wrote

    *snip*

    I still find this to be the case.  When creating a XAML UI, I generally find myself typing most of it out rather than using drag-and-drop.  I only resort to visual tools for things like animations where I'm too slow and stupid to make all the calculations required.

    This is basically the only thing I use Blend for. Animations and view states. That's both because those things require very verbose XAML which I can't be bothered to type, and because just moving some stuff around and setting some values while it's recording is easier than figuring out the values myself and then typing them.

    For everything else: when you need fine-grained control, it's almost always easier to type it by hand, and you very often need fine-grained control. Also there's "invisible" UI elements like panels, and that just becomes annoying to drag and drop.

  • User profile image
    Richard.Hein

    For a real world example of a visual language vs. text, consider http://code.google.com/p/visual-lambda/.  Although this tool allows "intuitive manipulation" of lambda calculus, it's a poor substitute for reading plain text. 

    Consider the operation 3 X 2 in lambda calculus text notation:

    λ(xyz:x(yz)) 3 2

    vs.
    Generic Forum Image

     

    Pretty interesting, and maybe it could be used to manipulate expressions to understand reduction and so on, but useless for reading code and writing it on a large scale. 
    I give this example for lambda calculus because it's probably the simplest possible.  The entire language is very simply expressed and (I think - I might be wrong here) all of the possible operations are included in this example.

    EDIT:  To be fair, the visual lambda example is showing more than the text ... the text doesn't show all the reductions happening ... it's static, while the visual example is dynamic and reduces the expression.  Nevertheless, if you list out the reductions for the text, you'd still have an easier time in the end.

  • User profile image
    Richard.Hein

    Also worth mentioning is To Dissect a Mockingbird, which I think is simpler to understand than
    Visual Lambda, but it is still very complex in all but the simplest cases.  Still worth reading the paper, however.

  • User profile image
    kettch

    I work with a system that runs on top of Windows Workflow Foundation to provide a visual designer for mapping out processes.

    It's definitely not a general purpose language, but it does provide full access to the capabilities of the system. There's all the standard flow control, loops, and system-specific custom workflow activities.

    Herbie makes a good point:

    *snip*

    Visual tools can be useful for non-programmers to set up some logic, but for me it always comes down to written code.  With visual tools you are all too often limited by what the original developers thought were the types of things you would want to use them for (just the same as using some framework libraries).

    This is a problem that we have with the system we use. I always make sure that I apply a developers eye to something that the non-developer wrote using the tool. The visual nature makes it easy to gloss over the fact that something is far too convoluted or inefficient. Visual tools make it easy for a novice to get started building something, but it takes a developer's understanding to know how things should flow and how to best work around limitations.

    I don't think text based programming is going away any time soon.

  • User profile image
    Jason818

    Thanks all, for your insights. I know that when I started coding, even with a visual programing language I started to see things differently. It taught me a different way of thinking. I began to see how things where connected, how triggering one event would trigger others. It was a real wake up to me. It structured things differently in my real life. Instead of the world being full of random events, it now had structure. Nothing happened any more because of some mystic magic. I saw the world as a system. To all of you, you probably always looked at things that way. I think an artist sees things differently than the analytically minded person. Maybe I'll try learning a language. Who knows what Ill learn then.

  • User profile image
    Richard.Hein

    @Jason818:  All programming and mathematics is a meaningless set of symbols with a set of formal rules for how to manipulate them; any structure and meaning is emergent.  As a coder, you need to appreciate that any symbol is actually arbitrary, and in the end this will free your mind to be able to code.  For more in this vein, this should satisfy your artistic and analytical mind:  http://www.amazon.ca/Godel-Escher-Bach-Eternal-Golden/dp/0465026567

     

  • User profile image
    eddwo

    You don't have to be programming long before the actual syntax just disappears, then you spend far more time thinking about what's happening with the call stack, or the state of local variables, 

    or the data structures you are manipulating, or the speed/complexity/memory allocation balancing decisions you are making than you do wondering if you should use a '(' or a '{' or a '[' character in any particular situation. That sort of thing just becomes muscle memory.  It's like a composer really troubling over the direction of the tails on the notes when writing a new symphony, in the end it has no bearing on what the music is actually going to sound like, (though it may make it easier/harder for the individual musician to sight-read, but who still uses hand-written manuscripts for actual performances anyway)

    If you've been programming for any length of time, and you are still really worried about syntax choices, chances are you aren't really going to 'get it' ever. Devil 

    Thinking about the differences between system design strategies in Haskell vs Clojure vs C# vs Prolog, now that's a bit more interesting.

    Now if there were ever a graphical language that dealt with things at that kind of higher level where things get interesting, (composing actors etc.) but didn't prevent you from dealing with the low level without creating an explosion in the complexity of the diagrams that they become too unwieldy, it might be worth it.

     

    But no one seems to really start at that level, they start using flow charts for for loops, which might work for a beginner, but aren't going to scale to any sort of complexity. 

    So most of the system that you work on, is not what you can see on the screen, but what you can conceptualise in your head. Call graphs, object hierarchies, pointers linking pieces of data.  (And visual thinkers are probably much better at it than verbal ones Sad

  • User profile image
    exoteric

    @Richard.Hein:

    , Richard.Hein wrote

    @Jason818: Text based languages are visual ... but I digress into philosophical ideas. 

    Agreed (except they don't need to be).

    @Richard.Hein:

    , Richard.Hein wrote

    @Jason818: Text is more concise, usually, than visual languages because they are symbolic of some mental concept and if you have to draw a rectangle or something to define boundaries,that ends up being extra noise with no syntactical or semantic meaning, and instead, some label on that shape is what is actually important.

    Intentional Software has an DSL editor where one can switch between textual and visual presentations and forms of interaction. Some notations are also more suited for some domains and are semi-visual.

    Mathematica also comes to mind.

    If you have to care much about "drawing" or "defining boundaries" then the implementation is not smart enough. You should only have to care about three things: instantiation (via e.g. drag and drop), connecting (via e.g. drag and drop) and perhaps commenting (via e.g. typing or talking). Graph layout perhaps guided by a logic engine with some domain understanding could help with automatically arranging objects in a pleasing and sensible way. [Easier written than implemented, of course.]

    However visual programming is perhaps best used at a coarse-grained level in the form of workflows. Workflows are programs and they are presented in diagram form. They have sequences, branches, repetitions, events, etc.

    So many programmers already use "visual programming".

  • User profile image
    magicalclick

    I haven't tried visual language other than tools that generates HTML. So, I cannot be a judge of that. But, of I do use it, I will compare to following key features of C#. C# provides high level of flexibility and expressiveness, which is easier to understand and debug. And the platform of good selections of standard libraries are generally reliable and trustworthy. And of course, it is fast to type simple code in the method or copy sample code and modify it. As long as these holds on visual language, visual language would be great.

    Leaving WM on 5/2018 if no apps, no dedicated billboards where I drive, no Store name.
    Last modified
  • User profile image
    Dr Herbie

    I'd say I was happy with visual tools to do the tedious stuff (like WF diagrams to show the flow of the logic) and text to do the detail (again like WF where you call methods from points in the workflow). See my avatar for the next sentence.

    Herbie

     

  • User profile image
    Jason818

    However visual programming is perhaps best used at a coarse-grained level in the form of workflows. Workflows are programs and they are presented in diagram form. They have sequences, branches, repetitions, events, etc.

    Workflows type programing is the kind of programing I've used. I was able to make some rather complex systems using sequences, branches, repetitions, events. It was for a game I was working on. It was used to trigger events and audio with in a simulation.

     I have used HTML programs like dreamweaver but that doesn't feel like programming. That feels more like photoshop. 

    I remember hearing about a guy at Microsoft who was blind and he did programming. I wonder what that is like. It was several years ago, I wonder what he is doing now.

  • User profile image
    Jason818

     See my avatar for the next sentence.

    Herbie

    Horses for courses? what does that mean?

  • User profile image
    Dr Herbie

    @Jason818: It means use the appropriate tool (horse) for the job (course).

    Maybe it's a British colloquialism.

    Herbie

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.