Would it be difficult to add Blockly to Anvil?

I took a look at Edublocks. It certainly seems like it could be integrated. The main benefits, and the basis of the appeal for that sort of system are that:

  • There’s an integrated IDE that users can start in their browser, without any installation, and one click runs the generated Python code.
  • There’s a list of code snippets that users can select by dragging and dropping, so users don’t have to learn and remember all the available pieces of code.
  • The drag and drop editor eliminates potential for syntax errors.
  • It’s physically easier to use for young people who can’t type well yet (I assume dragging and dropping requires less coordination and practice than learning to navigate a keyboard)
  • It’s colorful, friendly and playful looking, so provides an approachable environment that is potentially more likely to appeal to children, in the sense that it appears more like a toy, visually, so that they may become interested in the value and purpose of learning to write code.

The creator of Edublocks basically describes it as an aid to transitioning to writing code, in which ‘the code is on blocks’. As you can see in the screenshot, there’s a 1-1 correlation between a block and a line of code, so the whole idea of the EduBlocks as a transitional tool for education, is that there just really isn’t that much (or really any) difference between the blocks and the code structure. The point is to make the idea of writing code palatable, because it can be seen that the lines of code and the blocks are exactly the same.

I actually created a visual builder tool for Rebol years ago which had the exact same goal, because I could see the clear value in presenting such a psychological advantage: Without Writing Code , so I’m not at all against the idea, and I think that any tool that helps promote the use of Anvil could potentially be useful in building community, getting Anvil used in education, etc.

For use in production, in a professional environment, with adult users who can type, however, I don’t know that the blocks necessarily add any genuine value, and might simply be an unnecessary crutch. Considering that:

  • Anvil has an integrated IDE that users can start in their browser, without any installation, and one click runs the code.
  • Anvil offers a list of code snippets that users can select by copying and pasting, and I think autocomplete provides even more useful contextual guidance, so users don’t have to learn and remember all the available pieces of code.
  • Autocomplete and syntax checking both help to eliminate syntax errors, to much the same end as visually fitted blocks do.
  • Most adults who may consider doing any sort of software development work are likely able to use a keyboard
  • Most adults are likely able to get past not having a child-like playful interface design, an may likely be able to understand the value of writing code

In the end, it would be really neat to see a block interface as a learning tool for Python in Anvil! …but I don’t know that it would necessarily improve Anvil’s ease of use, learning curve, or productive value - at least for adult users who already understand the value of using it, or have a reason to put it to use.