Skip to content

Instantly share code, notes, and snippets.

@MoserMichael
Last active December 17, 2025 06:23
Show Gist options
  • Select an option

  • Save MoserMichael/b13eda907e556939b282deb0ef931573 to your computer and use it in GitHub Desktop.

Select an option

Save MoserMichael/b13eda907e556939b282deb0ef931573 to your computer and use it in GitHub Desktop.
scratch

course on visual programming with Scratch

The aim here is to come up with a methodology/course of teaching the stuff, so the intended audience are teachers/parents who want to teach this stuff.

Scratch

A general intro to Scratch

  • at the bottom of the page there is a dropdown for choosing your language (very important to some people)

The stage

  • size of a scratch screen - that's the 4:3 aspect ratio, which is famous from TV/video games (before widescreen displays became all the rage)
  • you have an icon with the square - this one shows the stage full screen (took me a while to notice that!)
  • coordinates of screen:
                    180
                     |  
                     |  
                     |            
-240 ------------- (0,0) ------------- 240 
                     |  
                     |  
                     |            
                   -180

The development environment

  • when you have something, always do 'File/Save now' - otherwise it's gone. (should have been automatic, if you ask me)

The scratch screen is divided into three parts

  • left: the stage
    • upper part: the stage as it looks like, with all characters
    • lower part: show all characters, you click on one to pick it out as the 'current character'
  • middle: the script for the current character. (These are the instructions to 'make the character come to life' - you can introduce it like that!)
  • right: tool box: the tools to drag to the middle/script pane

The course

Trying to present it in small pieces as follows

Download this course, including local backup of example lessons as:

git clone https://gist.github.com/b13eda907e556939b282deb0ef931573.git

Lesson1:

see lesson online

  • each sprite can have multiple costumes, (when adding a character, in the gallery: keep the mouse over the character - it changes it shapes if it has multiple costumes)
  • introduce the concept of loops and sequence of steps.
  • make them add multiple characters and animate them by adding a loop - the infinite loop changes to 'the next costume' and then waits for a second,
  • can tell them about sounds (adding a sound is a neat effect!)

(always remind them to do 'file'/'save' - if they want to see that again :-)

Additions:

  • have them move the character to a random position
  • at first you can avoid talking about coordinates by 'move to a random position'

Encourage them to do stuff on their own now, and give them a break. Make them search for other characters and what you can do with them.

A lesson on interactive storytelling with stages?

see lesson online

  • I don't recommend to do this in practice: Telling hypertext stories in Scratch is a lot of work and no fun. It involves a lot of repetitions:
  • you need to define a whole lot of sprites, at least one per stage / scene
    • the Start handler needs to hide each sprite
    • add another event handler that shows the sprite, once his stage appears.
    • add another event handler for 'clicking on the sprite'
      • play a sound, once 'clicking on it'
      • hide that sprite, once 'clicking on it'.
      • switch 'to another backdrop'

Lesson 2

see lesson online

First interactive game

  • have a character in a loop, 'move to a random position (no need to talk of coordinates, yet)
  • define event, when you click on the character
    • action: play a sound and hide the character
    • important: in the loop that moves the character: show the character at the start of the loop

Big change:

define variable for points.

Lesson 3

see lesson online

have a balloon move down horizontally and catch it. Here coordinates are introduced (see top of this page)

  • need to introduce the concept of 2d coordinates and variables! Big change!
  • the whole thing of a=a+1 (assignment of old value with change to the same variable to set the new value) is probably a bit confusing at first, so they have 'change variable by'

Lesson 4

see lesson online

A chicken has to run away from the moving errors (arrow up/down). Game over, if arrow collides with chicken.

  • introduces 'copies/concurrency' and more stuff on 'control'.

Is it a good tool?

Probably is quite intuitive, but I find this whole visual programming thing a bit depressing (am I the only one here?) in a way I am glad that we didn't have this, when I was a kid.

What I found depressing:

  • need to constantly search for the right block. Thats a repetitive task, got me tired.
  • very limited forms of expression, you need to 'stay in a box'
  • maybe all forms of programming are like this, until one gets fluent? Don't know...
  • Why don't they have GOTO in scratch? (is it still 'considered harmful' ?) Or procedures/functions?
  • I like primitive basic more, you didn't have stuff like 'event handler' mess and variables with global scope vs character scope.
  • on second though: maybe this whole Scratch thing can convey the wrong idea about programming to kids? Don't know...:-(

Scratch, this is important - and I don't have any answers...

  • the site has chat feature and moderation team. Some people are not happy with the modertion team / potential for abuse in chat Parent review link
  • some people are upset that the site asks for gender identification on account creation, as this is all directed at younger kids discussion
  • at least the site requires parental consent for sharing games, says the initial subscription email (I didn't check if parential consent is required for chats). Best to stay out of the social networking features - that's my guess.. Amazing how everything with any social aspect can turn into politics (reminds me of reddit). Also anything social for young kids has to be viewed carefully (so my guess is not to take part in the community features)

In some way it is a paradox: you want to make your kid confident, encourage experimentation - and then you become paranoid, upon second thought. It is the contradiction of the online world, universal concern to everything online Minecraft, Roblox, fortnite...

At least we are not native speakers of English, so maybe this has also a kind of advantage, sometimes...

Does it still make sense to teach programming in a world of 'vibe coding'?

Trying to make sense out of what is going on, seriously...

Is it worth it? Will people still be ready to invest the time and effort into programming, if everyone keeps telling them that the machine is good enough for the job?

  • I think the ai technology has serious limitations:
    • large language models can't cope with shitty input. An example: if you tell it to produce a database query, and the definitions of the question asked are not good, then the result will be shit. If the AI system does not have enough data: it is often trying to fill out the details on its own, without asking back.
    • A serious AI system consist of many components. Each of these components make errors, the result is often not very good - each AI component needs to be monitored, but the monitoring itself is automated and is far from perfect.
    • where AI systems shine: as a search engine. I think we can use it as a search engine, it is better to talk to an AI based search engine. Compare that with talking to a toxic crowd on any social network: AI is less likely to hurt you and is more cooperative than people on any social network

I think that programmers will still be required, as the machine will mess up, occasionally - and someone will be needed to sort things out. Also someone will still need to read the code and make changes, based on his understanding.

Also: I think programming teaches us Humans to 'think step by step', so it is a good thing. ('think step by step' is a phrase that prompts a large language model to use chain-of-thought reasoning, thats in their training)

In a way: a lot of the AI fear is coming from the following factors

  • AI companies want to appear as very important, so they creae a lot of hype.
  • Maybe we are now seeing some exaggeration of the traditional dislike for programmers/hackers on the part of the AI scientists (contempt for 'coders'). Don't know.
  • people do not understan the limitatins of the new AI technology, so they push fear further.

Some of these factors are not news. Each new technology is not quite undestood at first, so people will first fear it, then we get used to it and understand where it can be used best. I think it is of benefit to try and use this stuff, with limits - not just fear it. Maybe some programming practice will be helpful in this process...

This file has been truncated, but you can view the full file.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment