12

I'm interested in creating a visual programming language which can aid non-programmers(like children) to write simple programs, much like Labview or Simulink allows engineers to connect functional blocks together without the knowledge of how they are internally built. Is this called programming by demonstration? What are example applications? What would be an ideal platform which can allow me to do this(it can be a desktop or a web app)

5
  • 1
    Already been done - see Scratch at scratch.mit.edu. and what do you mean by "platform"?
    – anon
    Feb 20, 2010 at 13:02
  • 3
    There are dozens of visual programming languages. en.wikipedia.org/wiki/Visual_programming_language. Please don't invent another. Just learn one that already exists. p4games.org
    – S.Lott
    Feb 20, 2010 at 13:05
  • 1
    Please, read the paper "No Silver Bullet — Essence and Accidents of Software Engineering" before starting.
    – Don Reba
    Feb 20, 2010 at 13:42
  • by platform, i want to know the authoring environment, on which I can build the visual blocks and the models
    – iceman
    Feb 20, 2010 at 14:41
  • Thanks Don for the suggestion...thats why i asked for suggestions from experienced developers
    – iceman
    Feb 20, 2010 at 14:42

10 Answers 10

9

Check out Google Blockly. Blockly allows a developer to create their own blocks, translations (generators) to virtually any programming language (or even JSON/XML) and includes a graphical interface to allow end users to create their own programs.

Brief summary:

  • Blockly was influenced by App Inventor, which itself was based off Scratch
  • App Inventor now uses Blockly (?!)
  • So does the BBC microbit
  • Blockly itself runs in a browser (typically) using javascript
  • Focused on (visual) language developers
  • language independent blocks and generators
  • includes a Block Factory - which allows visual programming to create new Blocks (?!) - I didn't find this useful myself...except for understanding
  • includes generators to map blocks to javascript/python

e.g. These blocks: enter image description here

Generated this code: enter image description here

See https://developers.google.com/blockly/about/showcase for more details

Best wishes - Andy

1
  • came here with a slightly different quest than the original poster. your answer is what I wanted. thanks!
    – ibiwan
    Mar 14, 2019 at 0:55
5

The adventure on which you are about to embark is the design and implementation of a visual programming language. I don't know of any good textbooks in this area, but there are an IEEE conference and refereed journal devoted to this field. Margaret Burnett of Oregon State University, who is a highly regarded authority, has assembled a bibliography on visual programming languages; I suggest you start there.

You might consider writing to Professor Burnett for advice. If you do, I hope you will report the results back here.

1
  • Thanks for pointing it out..i'm trying to build it for a robotics application where people do not have to dive deep into Robotics APIs..Microsoft has one,but then...
    – iceman
    Feb 22, 2010 at 10:27
3

There is Scratch written by MIT which is much like what you are looking for.

http://scratch.mit.edu/

3

A restricted form of programming is dataflow (aka. flow-based) programming, where the application is built from components by connecting their ports. Depending on the platform and purpose, the components are simple (like a path selector) or complex (like an image transformator). There are several dataflow systems (just I've made two), some of them has no visual editor, some of them are just a part of a bigger system, and there're some which don't even mention the approach. (Did you think, that make, MS-Excel and Unix Shell pipes are some kind of this?)

All modern digital synths based on dataflow approach, there's an amazing visual example: http://www.youtube.com/watch?v=0h-RhyopUmc

AFAIK, there's no dataflow system for definitly educational purposes. For more information, you should check this site: http://flowbased.org/start

3

There is a new open source library out there: TUM.CMS.VPLControl. Get it here. This library may serve as a basis for your purposes.

enter image description here

2

There is Snap written by UC Berkeley. It is another option to understand VPL.

1

Pay attention on CoSpaces Edu. It is an online platform that enables the creation of virtual worlds and learning experiences whilst providing a more flexible approach to the learning curriculum.

There is visual coding named "CoBlocks".

enter image description here

Learners can animate and code their creations with "CoBlocks" before exploring and sharing them in mobile VR. Also It is possible to use JavaScript or TypeScript.

0

If you want to go ahead with this, the platform that I suggest is the one used to implement Scratch (which already does what you want, IMHO), which is Squeak Smalltalk. The Squeak environment was designed with visual programming explicitly in mind. It's free, and Smalltalk syntax can learned in half an hour. Learning the gigantic class library may take just a little longer.

6
  • "Just?" Already in 1980 3/4 of the blue book was devoted to class libraries and 1/4 to the language. And how much bigger is the Squeak library? 10x? 100x? Feb 20, 2010 at 22:16
  • @Norman Ever heard of gentle sarcasm? The Squeak library is huge (or as I said in my answer, which you appear to have read in a hurry, "gigantic") and will take along time to get up to speed with, particularly when compares with the very simple ST syntax.
    – anon
    Feb 20, 2010 at 22:21
  • @Neil: Indeed. I was intending to leave a comment saying only "Just?", but sadly this was under the character limit... brevity is, after all, the soul of wit :( Feb 20, 2010 at 22:50
  • 2
    Again, i'm not very interested what are the various VPLs out there and there pros/cons..but how you write one !! for example,I like Labview, but would love to know how they handle the async data-flow..
    – iceman
    Feb 22, 2010 at 10:44
  • @iceman They use messages and threads. Some platforms, like Squeak, make this easier than others. Which programming languages are you familiar with?
    – anon
    Feb 22, 2010 at 10:56
0

The blocks editor which was most support and development for microbit is microsoft makecode

-1

Scratch is a horrible language to teach programming (i'm biased, but check out Pipes Visual Programming Language)

What you seem to want to do sounds a lot like Functional Block programming (as in functional block programming language IEC 61499 and other VPLs for mechatronics development). There is already a lot of research into VPLs so you might want to make sure that A) what your are trying to do has an audience and B) what you are trying to do can be done easily.

It sounds a bit negative in tone, but a good place to start to test the plausibility of your idea is by reading Davor Babic's short blog post at http://blog.davor.se/blog/2012/09/09/Visual-programming/

As far as what platform to use - you could use pretty much anything, just make sure it has good graphic libraries (You could use Java with Swing - if you like pain - or Python with TKinter) just depends what you are familiar with. Just keep in mind who you want to eventually launch the language to (if its iOS, then look at using Objective-C, etc.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.