Thoughts on using the Scratch language as an intro to programming

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
5 replies · 3K views
Messages
9,546
Reaction score
4,788
I recently encountered the Scratch programming language. I wonder what people think of it considering some notable (IMHO) shortfalls. I do not like the way it handles comments, the lack of returned values from "functions", and some other aspects that I think should be basic. But it does seem to be a quick way to get a child interested in programming.
 
Physics news on Phys.org
I found Scratch excellent for a first introduction to programming (with an OO bias) for my kids when they were in primary education, more than 5 years ago. This was the original Scratch, and then I think Scratch 2 for the youngest - I have no experience of Scratch 3.

The lack of return values I assume to be a design choice to encourage encapsulation but I agree this doesn't really work because you end up using global variables as a (highly undesireable) work-around. I gather Scratch 3 has 'reporters' which should improve this situation.

Similarly I assume that comments are somewhat 'tacked on' to encourage self-documenting code (descriptive names for variables and blocks).
 
  • Like
Likes   Reactions: FactChecker
pbuk said:
The lack of return values I assume to be a design choice to encourage encapsulation but I agree this doesn't really work because you end up using global variables as a (highly undesireable) work-around. I gather Scratch 3 has 'reporters' which should improve this situation.
I will have to investigate reporters. I was not aware of them.
EDIT: I was aware of their built-in ones, but not by name. They are everywhere. But I don't see a report block that I can modify for my own variables in my download Scratch Desktop Setup 3.3.0. It appears that a usable "report" is a feature of Snap!, which is an alternative to Scratch. It seems to have some advantages for teaching programming principles.
Similarly I assume that comments are somewhat 'tacked on' to encourage self-documenting code (descriptive names for variables and blocks).
If that was their intent, I completely disagree with their decision. They definitely need to at least include a comment block for documenting sections of code. Attaching comments only to lines of code is a problem if that line's block moves.
I am genuinely surprised that the MIT developers of Scratch have not paid more attention to these fundamental things.

That being said, I tend to agree that it does get children interested in programming and does introduce the basic concept of OO relatively painlessly.
 
Last edited:
There seem to be some great aspects of Scratch and some serious omissions. If I decide that the basic 3.0 Scratch language is not good enough for a child's continued learning, are there extensions or alternatives to switch to? For instance, is there a programming environment that uses Python / Basic / etc. and retains the simulation aspect of Scratch?

EDIT: Snap! looks like a Scratch-like language with some advantages for teaching programming fundamentals.
 
Last edited:
FactChecker said:
I will have to investigate reporters. I was not aware of them.
EDIT: I was aware of their built-in ones, but not by name. They are everywhere. But I don't see a report block that I can modify for my own variables in my download Scratch Desktop Setup 3.3.0.
Yes sorry, I had misinterpreted something I read.

FactChecker said:
There seem to be some great aspects of Scratch and some serious omissions. If I decide that the basic 3.0 Scratch language is not good enough for a child's continued learning, are there extensions or alternatives to switch to?
I'd suggest moving to a 'proper' language.

FactChecker said:
For instance, is there a programming environment that uses Python
Try PyGame with a user-friendly IDE - PyCharm or possibly Visual Studio Code (not so user friendly, but if you can get over the learning curve well worth it).

FactChecker said:
Basic
Please no.

FactChecker said:
etc.
Java? Or how about a bit of everything on Codecademy?

FactChecker said:
EDIT: Snap! looks like a Scratch-like language with some advantages for teaching programming fundamentals.
I have no experience with Snap, but I'm not sure I see the advantage over a 'real' language like Python.
 
  • Like
Likes   Reactions: FactChecker