8 ms·
I like Scratch - my kid uses it and I worked briefly with the guy who made Blockly, the underlying visual programming toolkit - but the programming environment
by spankalee 4y ago
I like Scratch - my kid uses it and I worked briefly with the guy who made Blockly, the underlying visual programming toolkit - but the programming environment makes many things far too complicated with its singular focus on sprites.
It's very, very difficult to do things as simple as display a number on screen. My 7yo was making a number guessing game, and to display a two-digit number we had to make two sprites that had 10 "costumes" (0-9) then do modular math to select the costume for each digit. Sprites also have their own code, and if you duplicate one and edit the code the edits don't apply to the duplicate - so there's no user library or abstraction power at all.
This made dealing with Scratch far more complex and time-consuming than the logic of the game my kid was making, which is the exact opposite of what you want in a learning environment. I don't really want to focus on the idiosyncrasies of Scratch when teaching programming.
Some simple text and drawing commands, user-defined functions, and a library would go a huge way towards making Scratch simpler. There are some other Blockly-based environments that may have this... but they're not as popular.
- hammerheadtech 4y agoI agree, my 7 year old is into maths at the moment and he found it easier to just use PHP to do basic maths. I sat down with him for about an hour and I printed a "cheat sheet" for the various arithmetic operators (just the basic ones) and he's now quite able to just whack a simple script together and execute it on the command line. Having said that, he wasn't entering the situation completely blind. He's been using a PC with Linux (Ubuntu) since he was 3 years old. He's been playing Minecraft for 4 years (which is excellent for younger kids to learn mouse skills). I also started him out on GCompris on a laptop. Then we both built a PC for him when he was 5. I got a load of cheap second parts during the early part of the pandemic and I let him do it himself (while observing and guiding). I started him early because I started early too and I started him off on PHP because I remember it being relatively easy to learn when I was a kid because it isn't a particularly strict language which means a young mind doesn't have to perform a huge amount of translation in their own head, they can almost type exactly what they're thinking and run it. The command line I introduced almost immediately. It was a way easier method of teaching him to launch apps without my help...I just set the terminal to load on startup and printed him another "cheatsheet" of basic stuff that he needed (no rm -rf * just yet). If he's in an exploratory mood he will use the menus and UI but if he just wants to get straight into Minecraft or write a script he can just get stuck in! I can see scratch becoming more interesting to him further down the line but for now, certain things are easy enough. Typing is an interesting one though...I spent a fair bit of time working on his typing because his handwriting at school wasn't up to par (he's fine now, but his crap handwriting was holding his spelling back a bit). As soon as he became somewhat proficient at typing his spelling improved no end. Unfortunately though, his teacher won't let him do spelling tests on a laptop. Which I think in 2022 is the dumbest thing ever. They've only just started teaching typing and basic computer skills in his class (as of about 6 mo this ago). I had his teacher take me aside and ask me exactly what the hell I did to get him so far ahead. They measured his typing speed at 60wpm! This all said though, I am an IT guy...so parents with little to no tech skills might not have the smooth ride I had, which is probably where tools like scratch come in...I think it's a tool for non-technical parents as well as kids. Before scratch though, I'd highly recommend GCompris...but be warned, you need to do it short sessions (20 minutes or so) because kids get bored of it fast. My youngest is 3 and he's getting second knowledge from my oldest right now as well as the same stuff I did with my oldest...so maybe he'll learn even quicker?? We'll have to wait and see.
- ajdegol 4y agoI think there is great value in being able to write symbols with your own hand. It’s more powerful to us subconsciously to use extra muscles and see something which is distinctly recognisable as our own making. We are losing a lot of enactive cognition by being on screens in chairs; to societal detriment I would wager.
- WillAdams 4y agoYep. https://www.nytimes.com/2019/05/30/well/live/surgeons-hobbies-dexterity.html https://www.nytimes.com/2019/05/30/well/live/surgeons-hobbie...
- falcor84 4y ago> It's very, very difficult to do things as simple as display a number on screen. I suppose I might be missing something, but if you just care about displaying the number, rather than any particular styling, you can just show the variable, right?
- yCombLinks 4y agoShow the variable how? There's not a console, there's not a way to simply display a string or character. Scratch revolves around programming sprites to do things
- djsrv 4y agoTick the checkbox next to the variable in the block palette. That creates a variable watcher on the stage. You can also right-click the watcher to change it to a large readout, displaying the variable contents within a minimal frame.
- easrng 4y agoAlso if you get Scratch Addons (https://scratchaddons.com/ https://scratchaddons.com/) and enable the Debugger addon it adds a console and blocks to log to it.
- AzzieElbab 4y agoSomething as simple as this should not require add-ons. This isnt js and `leftPad` you know
- mynameisvlad 4y agoWhy would kids need a full debugger with console? That's far from "simple".
- Snild 4y agoEvery variable has a checkbox they makes it show on screen: https://en.scratch-wiki.info/wiki/File:Checkbox_to_show_or_hide_variable.png https://en.scratch-wiki.info/wiki/File:Checkbox_to_show_or_h... There is also a command block to show or hide it dynamically.
- Wowfunhappy 4y agoDid you try using the "Say" blocks? I know they don't look quite as nice, but this is what I use when I'm building something "text based".
- spankalee 4y agoWe ended up redesigning the app to be better for "say" and "prompts", but our original design just had a couple of big number displays on the screen and a button - something he literally drew out first on paper. We had to basically fail at that before making it more text based.
- mynameisvlad 4y agoWhy wouldn't you lead with this? Even the limitations you called out seemed to be fairly easily worked around.
- easrng 4y agoFor the editing and duplicating stuff, keep in mind you can drag blocks into other sprites.
- kazinator 4y ago> My 7yo was making a number guessing game, and to display a two-digit number we had to make two sprites that had 10 "costumes" (0-9) then do modular math to select the costume for each digit So if your kid is cool with this kind of clever workaround for the limitations of some piece of crap, you have a future software engineer.
- _benj 4y agoThis made me laugh! and then made me sad :’)
- mabbo 4y agoYeah seriously, is this kid looking for work?
- ace2358 4y agoI thought it telegraphed that maybe the kid is ready for the next level up?
- SoftTalker 4y agoOr it's a good lesson on knowing when you're using the wrong tool for the job.
- deleted 4y ago[deleted]
- glenngillen 4y agoExactly! I think the value of these programming environments is in helping you find new ways to think about problems. Having constraints/limitations can be one way to force that creative rethinking to happen sooner rather than later. Obviously you need to find a good balance though as causing frustration and helplessness would have the opposite effect. I’ve an anecdote of my own that I still think about semi-regularly: I was volunteering at a school for a year or so helping them teach 9-11 year olds Scratch. Most of the kids spent the term trying to move sprites across a canvas and making basic platformer style games. It was a heap of fun while also challenging at times. One day one of the students grabbed my attention and asked for some help making something work. She’d decided to build a trivia game, and was having an issue working out how to make the text for the previous question disappear. When I looked at what she’d built I was blown away. She’d basically built a fully recursive function in Scratch that would iterate through a collection of questions & answers. It was built almost exactly like I’d expect a professional developer to build something. A simple reusable function. I didn’t teach that. She’d never used Scratch before. She’d not done any programming before. It was just the most intuitive way for her to do it.
- nicoburns 4y agoIf you’re willing to pay then give gamemaker studio a go. It has a similar logic block based model (you can also progress into a full ECMAscript based language once you get more advanced), but is a lot more flexible about what you can display. Not 100% sure it’s still beginner friendly as I used it over a decade ago, but I’m pretty sure there’s a free trial, so you could find out.
- pronlover723 4y ago> a full ECMAscript based language Wat? Really. I thought it just has GML which is one of the shittiest languages I've ever used. It's really and seriously crap. On par with trying to write real programs in sh.
- nicoburns 4y agoGML is an ECMAscript dialect. It’s not the best, buts it’s a lot more powerful than dragging boxes around, and IMO a step above bash too.
- Sirened 4y ago>7yo was making a number guessing game, and to display a two-digit number we had to make two sprites that had 10 "costumes" (0-9) then do modular math to select the costume for each digit This, imo, is what makes Scratch a great education platform. It has a couple of very easy to use primitives (such as displaying and moving sprites) and leaves you to build whatever else you need by abstracting things on top of it. This teaches you one of the most foundational programming skills: how to do something complicated with only weird, rudimentary tools.
- Wowfunhappy 4y agoThis is also a good point. Scratch isn't designed to make coding easy so much as conceptually understandable.
- pishpash 4y agoThat's not it, otherwise you'd make the little ones play with a Turing machine.
- space_fountain 4y agoTuring machines are about being mathematically tractable right not about understanding right?
- tmaly 4y agoI just think there are so many other forms of distraction today. Young kids are carrying around cell phones, texting their friends. It’s that or they are doing something on Tiktok. They don’t have time to hack like that anymore.
- BenHerbst 4y agoYes true for most people ( I am 13, Started programming in Java with 10 ) but some also do this other stuff. Like I installed ubports on my second phone today ( Writing this on it )
- avgcorrection 4y agoDisplaying a number sounds like some hello world popup exercise that you would do in Rust or Go. I don’t see why one not just jump right to the game-making, which Scratch is good at. > This made dealing with Scratch far more complex and time-consuming than the logic of the game my kid was making, which is the exact opposite of what you want in a learning environment. I don't really want to focus on the idiosyncrasies of Scratch when teaching programming. Printing “Hello World” and displaying a number is easy in languages like Java. Making a top-down shooter is not. So why does one usually do the print stuff rather than the top-down shooter stuff? Ain’t that also because of the idiosyncracies of your run of the mill general purpose programming languages?
- enragedcacti 4y agoProbably because his kid wanted to make a number guessing game? I feel like the last thing you would want from a children's programming language is "why would you want to do that? Go learn Java if that's the type of thing you want to make"
- hooande 4y agoIt seems like Scratch is made specifically for game development, since everything revolves around the concept of manipulating sprites. "Guess the number" is a game, but not the kind of game that this tool was made to create.
- seldomI 4y agoShameless plug: we're running a Scratch-like site, but for terminal programs (among other runtimes). A number guessing game is one of our example programs. It's about 20 statement blocks: https://app.code-it-studio.de/project/303 https://app.code-it-studio.de/project/303
- xcambar 4y agoVert Nice!
- ianbicking 4y agoThere were a couple ways you could have made it easier, but Scratch's constraints and abilities can be hard to navigate or understand. Like you can use Say, or a visible variable, and I think the drawing extension would work too. I tried to do a different guessing game, not much more complicated, but it does get hard... I wrote up some thoughts in a thread: https://twitter.com/ianbicking/status/1546207554665172992 https://twitter.com/ianbicking/status/1546207554665172992 It's good that Scratch doesn't change that much, there's lots of books and traded wisdom that retains its value as a result, but there's also some big missing pieces that make some things very hard to write in Scratch, and they could be improved upon but they aren't
- dtagames 4y agoIf I recall correctly, Scratch existed before Blockly, which was developed by Google. The excellent Microsoft MakeCode environment also uses Blockly and looks like Scratch with the important distinction that you can switch back and forth between blocks and Typescript anytime. Even with that feature, there is no "UI" capability. Getting stuff on the screen still consists of putting up sprites with words over their heads! I ran into this while developing two games on the platform, like this one: Mathtown Alley[0]. It's a crippling limitation even for me, and I write TS professionally. [0] https://arcade.makecode.com/59845-44370-91548-60605 https://arcade.makecode.com/59845-44370-91548-60605
- mmoskal 4y agoAt least in TypeScript there are hooks in the game loop that let you write pixels on the screen.
- mbrodersen 4y agoLook I was teaching myself Z80 machine code on a ZX-Spectrum when I was 11. No internet to help me out and nobody I knew could help me. Just one book. And yet I learned how to hand compile Z80 assembler to machine code and make fun little games. So don’t underestimate the capabilities of kids to solve hard problems :)
- sfjailbird 4y agoThat's different. You were learning from first principles, using the lowest level primitives, and how putting them together made it possible to do an almost infinite number of things. That is powerful and intoxicating. With Scratch you are given a limited set of blocks that are designed for a limited set of solutions. It is at the same time not particularly powerful nor does it feel like you can grow your solutions to anything you have in mind. I have three kids and have taught (or attempted to teach) each of them programming. I started with Scratch every time, but it never piqued their interest, although they understood it. I have since started them on Javascript from the very basics (Khan academy) and they are very curious about each new lesson and the weird powers it brings. YMMV but people should not assume Scratch or Mindstorms and so on are necessarily better learning environments, just because they are 'friendly' - it can be quite the contrary.
- mbrodersen 4y agoYep I agree. I don’t think learning Scratch is a good way to learn programming. The intentions are good but IMHO misguided. Scratch is too “abstracted away” from what is really going on. Learning about the lowest possible abstraction (machine code) made it easy for me to understand everything else in programming. And the humble BASIC programming language taught a whole generation of kids how to program. So I think it is fair to state that BASIC is a proven way to teach kids the “real” stuff. Perhaps Python might be a better choice today?
- fennecfoxy 4y agoScratch is great for learning programming for kids/people who it doesn't come naturally to. Natural developers like myself and plenty of others spent our childhoods hunched over a zx81/spectrum/commodore/whatever because we thought it was _cool_.
- lolinder 4y agoI've always thought that number-guessing games were a first choice for introductory coding primarily because they're well suited to the standard library of most programming languages. Once you have standard I/O, you can write a number-guessing game. Scratch has different constraints than most languages, but I don't view that as a bad thing. Scratch takes what is normally a huge undertaking--sprites--and makes them as much a first-class primitive as stdin/stdout are in most languages. Yeah, this makes the number-guessing and text-adventure games we usually use as teaching projects harder, but it makes it a lot quicker to build visual games. I don't think Scratch needs to change, I think we need to recognize that kids in this generation won't be building the same starter projects that we did growing up.
- swayvil 4y agoBack on my good ol C64 Basic I started with art. With the poke function you could put characters on the screen, change colors, etc. Put that in a goto loop and you've got a cool modern art machine. The sound generator was quite rad too. 3-voice chords. Sines, triangle, etc waveforms. My 12 year old self liked it a lot.
- vnorilo 4y agoSince it is from the constructionist tradition, I believe it is intended as a "microworld" [1] so being powerful and general purpose is an anti-goal. It is optimized for trial-and-error exploration, which works best when the functionality is reduced and there are not too many tools in the shed. Producing text and formatting strings is likely deemed out of scope for that reason. People figuring out clever workarounds is a bonus! 1: https://edutechwiki.unige.ch/en/Microworld https://edutechwiki.unige.ch/en/Microworld edit: better link
- szundi 4y agoMissing these abstract features mean lower barrier to entry, so good for kids
- lowwave 4y agoHave not used Scratch, but on first loook it seems very similar to scheme-bricks: https://github.com/nebogeo/scheme-bricks https://github.com/nebogeo/scheme-bricks
- bob1029 4y agoConstraints are the entire point. Being forced to do things a crappy way is where many lessons are learned.