Hello, my loyal fans. Good news from my world - tomorrow I'm starting not just a new job, but a new (to me) kind of job: I'm going to be a tutor! In this case, specifically, I'm going to be a Coding Tutor. And, even more specifically, I'm going to tutor Elementary School kids.
But (and this is the twist): I'm not going to be tutoring them in Javascript, HTML, CSS or the other languages I learned at the FlatIron School. I'm going to teach them a language specifically meant as an introduction to the possibilities of code; a language that works on a much more visual/click-and-drag basis, as a way of getting kids excited about the possibilities that coding can unlock. I'm talking about Scratch.
On first introduction, the language surprised me, or even made me skeptical, as something worth learning. Allegorically speaking, I have an abundance of fond memories playing on the software KidPix when I was a child, but in no way did I feel like it helped me better understand Adobe Photoshop down the line, nor did it entice me toward the wonders inherent in the fields of Graphic Design or Visual Art as a young adult.
But of course, the thing I never received during my time on KidPix is exactly what I'll be providing to the students I'll be teaching: structure.
The mission statement of Scratch is directed squarely at people like me: this is a language capable of expressing serious, complicated coding concepts, no matter how much more accessible the visual assembly, web interface, and under the hood power make it. Much like, I've heard it said, the way the English language can be used for both poems and scientific literature.
But that didn't necessarily resonate with me by looking at it. There is a very mild learning curve to, say, take a character and move it across the screen, whether by an animation or in response to a pressed key (any key). And then the instructions asked me to do something new: they asked me to design a game that kept track of the user's "level" - and for the difficulty to increase as the levels did.
For a second this kind of blew my mind. Scratch can do that? How? As a spoiler, check out the final result. Then I'll go into the details.
If you're still reading this, did you try playing the game? Did you notice that the apples started falling faster the higher the level got?
To Scratch's credit, in addition to the prebuilt options, there is also a way to define variables. And, much like Javascript, the value of those variables can be interpolated, operated on, used in a calculation, and expressed in any of numbers.
To me, as an untrained eye, Scratch felt like it snuck up on me. Once I realized that I had that problem to solve, suddenly I was seeing new things about the code; things I hadn't paid attention to. Take, for instance, the code that solved the problem - in particular, look at the way the different components of the code are color coordinated (which, now that I say that, is not unlike VSCode).
Each color change represents a new area of the code that can be manipulated - all with clicking & dragging different blocks. Seriously, the depth of possibility actually kind of astounds me. In particular, the code that I saved the day is about halfway down:
-Start in the orange "repeat until" loop;
-Find the blue "change y by" Motion block;
-Read the amber "Level" Variable circle, inside the green "* -1" Operator block;
And now think about that: it was extremely easy to set up this block of code. There's no syntax to type or be mindful of, there's no separate Development environment to navigate. But there is a block of code that's four layers deep to create a specific effect: each time the level increases by one, the apple's falling speed also increases by one.
As you can probably tell, I'm very happy with this accomplishment, and more impressed by Scratch than I thought I'd be. I'm really curious, and excited, to see what assignments come up next. I'm sure I'll write about them! Want to see the code for this one? Or try your hand at editing it? Gladly! Go have fun!
PS: As a step up between Scratch and Vanilla-Javascript, the company I'll be teaching for (The Coding Space) invented their own program to match some of the under-the-hood assistance with getting a feel for typing out syntax and parsing errors. It's called WoofJS.
Comments
Post a Comment