Learn Scratch Programming (For Kids And Adults)

Spread the love

Scratch Programming Playground: Learn to Program by Making Cool Games is a brand new offering from No Starch Press.

Never mind all the other programming books for kids, this is the best so far.

It helps that the Scratch Programming environment is so easy to use and allows such creative development, and it also helps that Scratch is likely to be a programming environment for basic robotics in the future. But the book itself is excellent, and works at several levels. A young kid working with an adult, a medium level kid working on their own, or an adult playing on the computer after the kids have gone to bed.

Scratch is in the Logo family of object oriented programming. Indeed, Scratch itself, as a language, is a very short distance from the original object oriented programming, much closer to the source than many professional object oriented language.

It works like this. See the graphic to the right. This is code that controls a “sprite” which in this case is a picture of a ball.

The light brown C-shaped things are control constructs. An outer one called “forever” contains code that will be run from the time the program is started until it is stopped externally. Inside that is an “if” loop that checks to see if the object “paddle” (specified in the blue object) touches the sprite (ball). If that event happens, then the code inside the “if” thingie is executed. In this case, the variable “score” goes up by one, a funny little blerp sound is made, and the ball turns in the opposite direction.

Meanwhile, the paddle has a wadge of code that goes with it as well, which responds to key presses or mouse movements, so that the paddle can be used as part of the bouncing the ball game. And so on.

In the code block on the left, contact between a pirate (a sprite) and a leaf causes the leaf to disappear and the pirate to get a score for making the leaf disappear.

You can imagine the possibilities.

So, imagine the following game. A complex maze is on the screen. The player uses arrow keys, etc., to move a tiny cat around in the maze, working the cat from the beginning to the end. At the end, there is a hole that the cat goes through, and now the cat is in another maze. And so on for several mazes.

Are there objects in the maze the cat must avoid? Or obtain? Will you time how long it takes to get through each level? Will you keep a high score? Will you have two cats, with two people controlling them, each moving in opposite directions through the maze?

The code examples I give above are not from Scratch Programming Playground, but the maze example is. It is one of several projects that the book works you though, as you learn all the various programming concepts in Scratch 2.0. The programs you learn to code produce complicated results and are really spiffy, but the programming itself is easy and the code is not extensive, because Scratch 2.0 is so powerful yet easy to use.

Each example, such as the maze, is fully developed, and then, new versions (like having the second player ability, etc.) added, and by the time you are done with that example, if not sooner, you are already adding things of your own design, from your own imagination.

Scratch 2.0 can be run as a stand along program in windows and on a Mac, but works better on the web, in a browser, on all platforms. Working in that environment, on the browser, has the important advantage of immediate access to a large amount of work done by others, that you can freely borrow from. And, of course, you can show off your own work.

Scratch Programming Playground tells you how to obtain or set up an account on Scratch at MIT, holding your hand effectively but respectfuly through the entire process. The book is also associated with, as per usual for a No Starch book, a web site with the code and other items used in the book. However, I recommend actually hand building most of this code on your own, so you actually learn what you are doing.

It is possible to figure out how to make a hand held game controller work with Scratch programs, but that will depend on the controller you have and the platform. A USB controller and a bit of software from the web that lets you set up the buttons should work.

I would not be surprised if future Internet of Things programming, robotic programming, and other coding you might want to get involved in either uses Scratch or follows this model. The mBot robots can be controlled with a version of Scratch, which produces Arduino code for that robot, and there is now a compiler that allows the general use of scratch for Arduino. Arduino is a basic prototyping machine that can run things, as in “Internet of Things” and that is similar to controllers in general, like the ones in your computer, VCR, thermostat, DVD, car, Mars Rover, etc. (Wait, did I just say “VCR” … whatever.)

A bit of the book giving instruction on a code block to control a tennis ball sprite.[/caption]Anyway, Scratch 2.0 on the web, as per Scratch Programming Playground, gives you, er, your kids, great training in all the programming concepts, and with it you basically controls sprites (objects) on a screen. But the same language is already adapted to control a common form of robot (mBot) and has been adapted to program a widely used controller. So, with Scratch Programming Playground, a little practice and nine dollars worth of hardware, you can take over the world! Or, at least, a good portion of the Tri State Area.

When I do my “Science oriented holiday gift guide” (SOHGG) in a few weeks, this book is going to be on it. Al Sweigart, author, has really nailed a kids oriented programming book better than I’ve seen done before, and I’ve seen them all.

Have you read the breakthrough novel of the year? When you are done with that, try:

In Search of Sungudogo by Greg Laden, now in Kindle or Paperback
*Please note:
Links to books and other items on this page and elsewhere on Greg Ladens' blog may send you to Amazon, where I am a registered affiliate. As an Amazon Associate I earn from qualifying purchases, which helps to fund this site.

Spread the love

4 thoughts on “Learn Scratch Programming (For Kids And Adults)

  1. Hi there!

    My name is Jasmine Gordon and I’m from the Juni Learning team. We are an award-winning online computer science and mathematics academy that offers private online courses to students from ages 8–18. You can give this feature on PC Mag a read to know more about us.

    Our program helps bright young minds develop their interest and passion for analytical and technical subjects outside of school, and we want to inspire kids and their parents to check out how much fun learning could be. I thought we could team up with your site and share our content with you and your audience. This would help us reach out to more parents with similar interests , and at the same time, if you need additional content for your blog, we could help you out, too. In case you’re interested, here’s a sample of an article that you can publish on your site:

    Coding For Kids: Getting Started Learning Programming
    https://docs.google.com/document/d/1cETgPP6Z78NeBgORkmRq-DPo1uCln-ljQT2McwzKFPU/edit?usp=sharing

    Alternatively, you may also simply use our links as external sources in your own articles.
    Should you agree to a partnership with us, we have a dedicated social media team that would be more than happy to share with and promote your own content to our followers. This way, we could help boost each other’s reach.
    Please let me know what you think, or if you have any questions – I would be delighted to discuss this in further detail.
    Thank you for your time and have a great day!

    Best, Jasmine

    P.S.
    Become a Python coding whiz in just 5 days! Juni Learning’s Online Coding Camp for Kids is open for registration at https://start.junilearning.com/2020codingcamp

Leave a Reply

Your email address will not be published.