My sister asked whether her middle-school son shou...
# thinking-together
w
My sister asked whether her middle-school son should pick the choice of a block programming language (like Scratch), JavaScript, or C# for a class he's in. I claimed that he'll learn the same fundamentals with blocks minus the frustration, tedium, tea ceremony, and incantations associated with the others. To prove that the block program has the real creativity and that moving to the others is practically automatable, I took may favorite Scratch program https://scratch.mit.edu/projects/605658/ and had Chat translate it into JavaScript and C# https://chat.openai.com/share/02215935-c0b8-4fc9-9bf9-94f0b3fab613. The results seemed promising. Chat even made helpful observations:
Translating the same Scratch program to C# requires a different approach because C# is often used in desktop applications, and there's no direct equivalent of the Canvas API like in web technologies. However, you can use Windows Forms or WPF (Windows Presentation Foundation) for graphical applications in C#. Here, I'll provide an example using Windows Forms to create a simple drawing application that mimics the Scratch program's behavior.
If you check my conversation, you'll see I start asking what a "partial class" is having never heard the term. Chat parroted:
Using partial classes in this way provides flexibility. You can start with all your code in one file for simplicity. Then, if the class grows or you decide to use the designer, you can easily refactor the designer-generated code into its own file without changing the class's functionality. This approach keeps your custom code separate from the auto-generated code, making it easier to read and maintain.
I explained that every language, every tool has many such conventions. You learn the ones reverent to whatever you're doing right now, but learning them all is impossible. Instead the real skill is knowing that you don't know and being able to find out quickly. We're lucky that a these things are obscure, come up often, and are discussed on the Web. Thus LLMs are especially good at helping with dumb programming problems. So why use the established languages besides Chat knowing them well? I thought of three reasons: • Expressivity — Blocks will get a beginner pretty far, but you'll find the others have constructs that helpful for saying things that would be very hard with blocks. You won't appreciate scratch until you feel the itch. • Causal Powers — The block system will let you do things in class you'll learn core ideas, but the blocks themselves won't work everywhere. JavaScript, on the other hand, works all over on the web, and C# has its own ecosystem. Often there's bridging, but also one or other language will be the most natural one for certain kinds of work. • Scale — With big and medium sized programs being done with text, editors for wrangling it, and version control for keeping track of it exist. They can we weirdly powerful and janky. But you're liable to start having a hard time keeping track of blocks when it takes a dozen or more screens to fit them all.
💗 1
🍰 1
1
c
I think there is a project that explores that translation https://x.com/moenig/status/1601890041499996161?s=20
👍 1
a
https://www.hedycode.com/ is cool because it's meant for learning, starts you off with less expressivity but more guardrails and handholds you all the way into coding in an established language, like python
d
+1 mention for Hedy (after blocks or at age 10+). Gradual approach into textual programming to mitigate that up-front frustration. The format seems good so that it can be effective self-guided which must be empowering. Multi-lingual language is an awesome attention to detail! Recommend Feliennes GOTO 2022 talk on Hedy, its wonderful
🤔 1