Students who I have taught using Racket and SICP have a much deeper understanding of the fundamentals of computer science and they pick up these fundamentals in a much more organic way.
Because you can't make syntax errors (as the blocks don't fit) or spelling mistakes (because you drag-and-drop the blocks). Racket is great but Snap can be accessible even to primary schoolers who're just getting into Scratch. Snap's emphasis on drawing on the canvas has a very Logo / Turtle Graphics feel to it, which DrRacket doesn't quite have.
What makes it easier for the teacher is that Snap is in JS so you don't have to go through the app store to run it on school iPads (because that's just what's there in many classrooms, sadly). If the page is blocked on school wifi, you can even set up a local hotspot for it.
I imagine it could be potentially be more difficult to get Racket running on school iOS? Don't Apple have a ban on apps that can run code in many instances?
You make a good point about syntax errors and the ergonomics of connecting blocks. My initial point was that Snap might not be the best option for high-school aged students. I can totally see it being really nice for younger students.
The whole point of Snap is to encourage you to "Build Your Own Blocks" which can call themselves recoursively. They've made it really seamless, whereas in Scratch you just got all these looping constructs and limited options for abstraction. There is nothing inherent in visual programming which emphasizes imperative code. You should really try it; just implementing a quick fibonacci or something.
For example, I would have no mutation or ;+like things at all in my teaching language. All edges would represent dataflow.
This is hardly a compelling reason to switch to a visual layout.
One could just change the syntax rules to eliminate the semicolon and require new line or end of file instead.
Then the code looks remarkably like the visual layout with the advantage that simple tools can search it and edit it.
(my own efforts in this space (a structured editor in racket), which i was able to get going as a novice programmer: https://www.youtube.com/watch?v=CnbVCNIh1NA)
likely various tree-like structures exist implicitly or explicitly during compilation, which may or may not be ideally suited for editing interactions. for example, if they are heavily nested with intermediary productions or discard surface style choices.
sexps offer a simple (debatably too simple) shortcut here.
So new users can be oblivious to types for a little while - just tell them they can't put a square peg into a round hole.
I think it falls apart pretty quickly as they add more features in Snap. For instance, are lists always lists of strings? And list themselves are rounded rectangles? Sprites and procedures are rounded rectangles? I guess they ran out of easily distinguished shapes, but maybe that's ok by the time new programmers start needing these features.
All variables are round. The only thing that's square is a text input box. (The background colour, white, is the thing denoting that you can put any variable in the box.)
It starts at the bottom of page 92.
That's supposed to be a cloud icon. :-p
In my mind the logical way to view this is that semantically some languages use ";" as a statement terminator:
The other way is using ";" as a statement compositor:
Of course, practically speaking most languages kind of just conflate the two. For example the first way could have syntactic sugar allowing the final statement terminator to be elided. Similarly, the second way could have a trailing ";" and it could just mean compose on a NoOp. And when it comes to actually executing the code both will probably run very similar processes. But I personally find the latter conceptual framework more aesthetically pleasing.
It looks like the Snap developers share my view that semantics is way more interesting than syntax.
I learned how to code when I was an adolescent (10-12). I wasn’t personally interested in the act of programming itself, but I was fascinated by the possibilities of what I could create with code. My first coding venture was in LEGO mindstorms block-based code, and this was great to introduce fundamental concepts like loops and boolean logic. But I didn’t care about any of that until much later, I just wanted to build a LEGO gun so I could shoot pegs at my brother (hah!).
Soon enough my interests wandered (as would any kid’s), and I wanted to make a mod for Minecraft. At the time this involved decompiling the java source code, modifying the java code with the changes, and recompiling it back to bytecode. That’s right, I installed eclipse at the age of 12. I shudder at the memory.
But you know what? I didn’t care, because I was passionate about what I wanted to create. There were tutorials and tools online to help me with the mundane bits. The OP article opens by claiming that their language is better for learning because it doesn’t have gotcha’s like semicolons… but that was absurdly easy to figure out (just pattern match with the other code you see!). All it took was a drive to figure it all out. And in the end my mod (which is still available online! see ) shipped to tens of thousands of players. Until recently it was the most successful project I was ever involved with.
Now, I don’t mean to suggest that every kid should have to deal with arcane build systems and linker hell (that would be sadistic). But my point is that kids are willing to put up with a whole lot of BS in order to create.
I’ve taught summer coding and 3D art classes to adolescents myself, and I’ve verified this personally:
- I’ve seen a 10 year old fiddle with obscure configuration options in the Unity game engine that would confuse a trained artist, just so they could see their stuffed animal in VR.
- I’ve seen a 12 year old download Autodesk Inventor fusion on his home PC so that he can make a 3D model of a lightsaber.
- I’ve had a kid stay hours after class so they can fiddle with a C# script that I provided to them for a game dev assignment — just so they can execute on their vision.
I haven’t seen this kind of success with block based programming. Because the whole language is on rails, you tend to get half-assed results that follow whatever tutorial I supply by the letter. Results are bounded by the bespoke language features that are provided (eg sprites) so kids may not feel that they can achieve exactly what they want. It completely kills the creative freedom that a kid craves.
Block based programming absolutely has its place, but it does not scale beyond the absolute basics. Kids don’t want to be patronized with a training wheel language and we should give them the opportunity to push through the tricky parts of a “big boy/girl” language if they are inclined.
> if they are inclined
I agree with those, but I want to emphasize how important it is to ensure that the "absolute basics" remain accessible to the least inclined until they discover if they want to scale up to the next level or not.
In regular shared classroom education, one of the toughest elements of accessibility is to ensure nobody ends up left out because of unfavorably comparing themselves to the stars of the subject. I myself was a star in computers, but a total and abject "I don't want to be here" failure in physical education - I remember how it feels on both ends.
The best learning language that I’ve come across is Python. Nothing is harder than it needs to be at the beginner/intermediate level. And it scales all the way up to real work in the industry. Plus, the author of the OP would be happy to know that semicolons are not an issue :)
Giving examples of tenacious kids battling their tooling is evidence that we should increase the slope of the difficulty curve. This isn’t how pros train, this is how you self select for kids you don’t have to teach.
Even if we "take the gloves off as soon as possible", there is a point at which Snap is brilliant. Are you going to teach Python to primary schoolers?
doing precisely this is the subject of the paper though. i don't think they've fully succeeded either but it's worth engaging with. in principle there's nothing stopping a development environment which offers a smooth progression between drag and drop blocks and a fully featured language offering a typical text editor interaction experience.
I tried it with my daughter(10) and she did not respond to it, of course it was likely my fault. After that I changed the approach to be more tangible, making apps, websites, roblox games, python games etc, and she is getting better and better.
However the games 'human resource machine' and '7 billion humans' as visual programming were incredibly helpful. (tomorrowcorporation.com)
I document the process here: https://github.com/jackdoe/programming-for-kids
A colleague of mine did last year's Advent of Code in Scratch. It's not a patronising language.
One of the barriers to adoption that Scheme faced at a crucial point in time seemed to be that many people had seen Scheme in an intro CS class, and thought it was just an academic toy language.
I don't think a Fisher Price makeover helps fix the "toy" optics. :)
All of that was made without libraries (except for the C++ graphics stuff), so the usual "ecosystem problem" that plague small languages compared to the big ones wasn't even a problem here. But I still finished college with a clear divide between "language you use for work" and "language you use for research probably?". That was before knowing about package managment, frameworks and ecosystems. It's hard to not be biased after that.
A quick search will show you a number of places Scheme is used in real software such as in gdb, gimp, etc. See also the work Cisco has supported in Chez Scheme.
One sign of the failure became that, for years and years, advocates kept trotting out the same handful of adoption examples. Those examples started to get stale, and at some point sounded out of touch or desperate, like bragging about how we got on the junior varsity team in high school, still mentioning that well after high school. I worked on one of the relatively big success stories, and even I've given up on mentioning that example in most circumstances.
BTW, Chez is great, and it's now being used for the Racket backend.