Building a block-based visual code editor

458 views
Skip to first unread message

Patrick Miles

unread,
Jul 11, 2023, 3:56:13 PM7/11/23
to Blockly
Dear Blockly Team,

I am an aspiring software engineer looking to create tools that both can teach a younger generation than myself about programming but also provide use for myself and others of my approximate or better skill level.

Recently, I have been working on a project for a visual code editor that takes a more granular approach to what exists with Blockly, providing a more 1:1 representation of the code generated from the blocks (i.e. creating a 1:1 representation of a language such as Python in Blockly). My goal with this project is/was to provide a way of visualizing one's code similar to a UML diagram, while still being able to edit the source directly, but without leaving the visual domain.

The reason I mention that my goal is potentially in the past tense is that I have been going through the Blockly Developer Summit 2023 playlist on YouTube, and after hearing the section from Dr. Maggie Johnson, I'm not so sure that I should continue development for this project because the control is too granular and it seems the future is moreso focused on the design of applications and computational thinking rather than syntax and language constructs.

I could really use some perspective here, as I think that my tool would have promise, but I'm also now worried that I my time developing might be better used elsewhere.

Thank you for your time and I hope your day is going well today.

Neil Fraser

unread,
Jul 12, 2023, 7:30:38 AM7/12/23
to blo...@googlegroups.com
I met with Dr Johnson to get some more insights into this question.  Computer programming has always trended towards higher level concepts over time.  This is the result of ever more sophisticated libraries and smarter languages and tools.  For example, linked lists used to be a fundamental programming technique.  Linked lists still exist, but mostly they are out of sight and implemented by a JIT as required (when you create an Array in JavaScript, it might be an array, or a linked list, or a tree -- depending on how the compiler feels about your code).  The introduction of generative AI is simply another step in the direction of progressing to higher levels of programming.

That being said, no matter how high the programming concepts, there are some fundamentals that never seem to go away.  Conditionals, loops, variables, functions, and arithmetic have existed since the 1950s, and continue to exist in the 2020s virtually unchanged.  The sole exception I can think of is "GOTO" which was once a core concept, but has since fallen out of favour.

Here's some code from the 1970s that reads a memory address:

if (peek(0x4eff) == 256) {
  s++;
}

Here's some code from the 2020s that does image classification:

if (classification(image) == group.CAT) {
  cats++;
}

It's the same structure, even if one is doing a single clock cycle operation, and the other is using AI.  APIs change, but no matter how high-level programming becomes, the fundamental programming elements are here to stay.  Any educational application which teaches those fundamentals will continue to be relevant for decades to come.

TL;DR: Conditionals, loops, variables, etc, are eternal.

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/d2b0fcbc-f320-45a9-8535-b3cc827d4165n%40googlegroups.com.


--
Neil Fraser, Switzerland
https://neil.fraser.name

Patrick Miles

unread,
Jul 12, 2023, 2:59:00 PM7/12/23
to Blockly
Thank you for your response, as well as for reaching out to Dr. Johnson for further insight. I appreciate the understanding and guidance you've given me here.

After receiving this message, I have decided that I should persevere in this project. I continued watching more of the 2023 Summit and found that others are doing something similar to myself - that is, trying to bring block-based code development into the more advanced spaces, and bringing more advanced coding access to a beginner-friendly space - which is also encouraging, as it means that I'm doing something right. I feel as though I was having a momentary lapse in judgement in thinking that there would be no use for granular-level code editors, but I now realize that this project is going to be of the same level of abstraction as Blockly but in a different way, and thus still providing value beyond just a regular code editor.

Your reassurance about the enduring significance of some of the fundamental programming elements definitely gave me the perspective I needed about their role in the educational aspects of programming, as well as the relevance of granular code editors in the future.

Once again, I greatly appreciate your response, and I look forward to sharing this project with you all once I have made my first minimum viable product.

Mark Friedman

unread,
Jul 13, 2023, 1:45:06 PM7/13/23
to blo...@googlegroups.com
I hope I'm not making too much trouble here, but I beg to differ with Neil.  I think that generative A.I. techniques will likely create changes in CS education that are significantly different (and probably more drastic) than the changes caused by the development of higher-level programming languages.  Most notably, I believe that for most users and purposes it will make programming a natural language understanding problem, rather than a programming language problem.  In the short-term, developers will likely still need/want to check the code generated by the A.I. models, but in the longer-term we will learn to have more trust in these models and probably just use testing techniques to verify the correctness.  At some point, for some uses we might even develop enough trust to even bypass that and just directly execute the generated code, or even have the A.I. execute it for us automatically.

All of this has profound implications for C.S. education over the next few years.  In the short to medium term, I think that developers of Blockly-based programming tools for C.S. education should be thinking about where such tools will fit in the new paradigm.  One area of research might be how can we make generative A.I. models generate Blockly-based visual programs.  Given that, another related area is how can we interact with these models to edit our Blockly-based programs.  Also, how can we make our Blockly-based tools more amenable to reading.  While blocks-based programming tends to make it easier to write programs than with text-based programming, I contend that it tends to make reading programs, especially large ones, more difficult.  In a world where the writing of the programs is largely done by A.I. models, the focus should be on how (or if) blocks-based representations can make it easier to understand and check those generated programs.

I'll also just put in a plug here for the work being done by the App Inventor team, via their Aptly project, in investigating many of these issues.  You can view Evan Patton's presentation about this work, at the recent Blockly summit, here.

-Mark


Reply all
Reply to author
Forward
0 new messages