Taking off the training wheels – block and text coding

Most teachers agree that it’s better to start with block-based programming, and I heartily agree. I don’t introduce text-based coding till 8th grade and that’s only after my students have had a thorough exposure to a few different styles of BBP. There are so many possibilities that it’s just a matter of choosing what works for you and your students. Here’s what I’m using currently:

I think Microsoft really hit it out of the park with the MakeCode environment for several reasons:

it’s free.

it’s web-based, so accessible from a variety of devices.

it works on several different hardware and software platforms and more will be rolled out as we go. As of this writing, it supports Microbits, Circuit Playground Express, the Chibi Chip, Wonder Workshop’s Cue robot, and the queen of them all, Minecraft(only Education Edition, however)! That’s important to me because I use the Microbits in 5th grade, the CPX and Minecraft in 6th, so students can become familiar with the environment and make an easier transition from one to another.

also, did I mention that it’s free?

And of course, there is Scratch, just getting ready to release version 3.0 as of this writing. With their web-based environment as well as old-school standalone Scratch, it’s the perfect introduction to block-based coding. I use it for game creation in 7th grade. It’s a wonderful vehicle for learning some advanced CS principles in a relatively painless way: loops, conditionals, events, and variables. I say RELATIVELY painless because students still have to wrap their heads around the concepts. But they don’t also have to deal with syntax errors, and the results of their own misspellings and mispunctuations.

There are lots of other platforms that can work for you and your students. My advice is to pick one or two and stick with them. The important thing is for students to start to understand the CS concepts, so that when you introduce text-based coding, they understand what they’re doing.

A matter of debate is what should the first text-based coding language be, and when should it be introduced? I prefer Python. It’s more accessible, I think, than other languages, because it’s more like natural language than say, Javascript. So it has a pretty easy on-ramp, and lots of ceiling. It’s a language that students can grow with, with its thousands of libraries for everything from Raspberry Pi input/output to gaming to scientific algorithms. There are jobs out there that require Python. And the Computing At School curriculum in Great Britain uses it as the first text-based language. That’s a pretty powerful endorsement.

Downsides of Python? There are a couple. Perhaps the biggest is its sensitivity to incorrect tabbing. If you use IDLE, the built-in editor, it will automatically tab lines correctly in if statements and for loops, but I’ve seen students reach maximum frustration when the code just wouldn’t work, and it turned out to be a misplaced tab. Ouch.

Other languages? I’d suggest 2 other possibilities: Small Basic and Javascript, in that order. Small Basic is Microsoft’s technology for entry into text-based coding. It has auto-complete (usually useful), and introduces dot notation, an important feature that they’ll run into in many languages. It’s also very natural language-like, more so than Python. I’ve found that students find that it just makes sense. Plus it’s got a great built-in turtle graphics system, which is a fabulous way for students to SEE the results of their code.

Problems with it? No jobs out there that use it. And where do you go next? I suppose you could argue for Visual Basic, but that’s not a path that most schools go down in high school. So it’s a bit of a dead end.

Javascript was chosen by Microsoft to be the language that MakeCode translates to. I have to say that I really wish they had chosen Python for this. However, it is used widely everywhere, on the web and elsewhere. And it’s certainly more accessible to most students than C#, C++, or (God help us) Java.

Whatever language you choose, that initial experience of what I call “taking off the training wheels” can be challenging to most students. I try to liberally comment my Python sample code with references to what they know in Scratch. For instance, I will do this

while True: #same as “forever” in Scratch

But there is inevitably going to be that time of discomfort as students try to make that leap to Python syntax. This might be an argument for using Javascript in the MakeCode environment, since you can switch from blocks to text with the click of a button. I haven’t tried this, so I can’t recommend it. Truthfully, I think I’d rather not have those training wheels so convenient, since students might be tempted to not take them off, and thus never truly learn how to ride that bicycle (to strangle the metaphor).

Be Sociable, Share!

One thought on “Taking off the training wheels – block and text coding

  1. Big picture: I would expand the BBP topic (more examples, more in-depth of ‘why’ it works for kids) and then make the text programming a separate chapter.

    To make this more approachable, can you explain some of the end products? Not just the best-of-the-best, but the types of products most students will engage with. For example: students start BBP with making ‘hello world’ (or whatever.)

Leave a Reply

Your email address will not be published. Required fields are marked *