Disclaimer and Social

This page may contain affiliate links. As an Amazon Associate I earn from qualifying purchases.

Sunday, May 13, 2018

PauseWaitDelay - Coding in Visual SpaChinglish

I just confused a group of new programmers. I tried to introduce them to Microsoft's MakeCode. It's a cool new online visual programming environment that is both simple to use and powerful. The program's creators went to a lot of trouble to make it fun and easy to learn.

I, however, managed to make it seem complicated and confusing - "My work here is done."

To be fair, it was an impromptu session so I had not prepared or practiced in any way. I just pointed them to the site, not intending to teach anything, much less hold an hour long spontaneous lesson. But they all seemed really interested, so I jumped right in. Who needs to plan or prepare - just start talking, right?

At left is the MakeCode IDE using "Pause." The center shows the Arduino IDE using "Delay." And at right is the Scratch environment using "Wait." The commands all accomplish basically the same thing, they just use different wording. I'm not at all confused, are you confused?

It wasn't that bad really, I don't think I scared them away. But I noticed the occasional blank look and realized I was using the wrong term sometimes. And I did get surprised by the odd (to me) ways that Microsoft tweaks the Arduino programming environment.

Or maybe the  new kids were simply overwhelmed and didn't actually notice my gaffs - but I did.

See, I use all kinds of programming environments, so switching between them feels natural. Sure, I forget which environment I'm in sometimes. But to me it's like using a new TV remote control or driving an unfamiliar car. It takes me a while to make the change mentally and I'll reach for the shifter in the wrong location, or hit power button instead of source.

Or maybe it's like when I try to use my high school Spanish and I get stuck so I blurt out an English word because I can't conjugate well. Or when my friend's grandmother has to use English because her grandson doesn't understand her in Chinese. Living in a multilingual culture is awesome, if somewhat frustrating at times.

So it's no big deal, but I feel bad for any confusion I caused. The new coders probably expected a precise and concise lesson. That's what programming is about, right - precision? Instead, I gave them a scrambled introduction to multiple variants of IDEs. In fact, I kept calling it MakeBlock instead of MakeCode - I can't even keep the vendor names straight.

Another example: The Arduino IDE uses "Delay" to specify how long the program should wait before executing the next command. But MakeCode uses the word "Pause" while Scratch uses "Wait." They all do the same basic thing. But me using the words interchangeably probably didn't make things easier for new programmers. A month from now they will think it's funny. But it was bad for a first experience.

(At least I didn't talk about whether time is measured in seconds or milliseconds, or the difference between wait, timer, rest and beat...)

Like every IDE that attempts to simplify a complex task, the MakeCode environment has some quirks. It creates variables of a certain type without labeling their type, then allows the variables to get plugged into slots where they don't belong. My example is the RGB values being considered "strings" in certain commands, but "integers" in other places (or maybe the other command casts the strings to integers).

No big deal to me, I'm used to dealing with var types so the error code at least made sense to me. I figured out a way around it. I'm comfortable troubleshooting conflicts, that's part of coding. But me fumbling around surely made the process look more difficult than it really is. That's my fault because I made assumptions that weren't true. Every environment is different and I was poorly prepared.






Oh who am I kidding, I can't keep all the quirks straight for one environment, much less five. I fumble around until I remember how this IDE works, or I just find a way around the so called issue. And that's part of the appeal of a drag-n-drop system like MakeCode or Scratch. You can wander around and explore options quickly without all the tedious overhead of setup. So maybe it was a good lesson and showed the new kids how to just keep playing until you have figured it out.

We'll see if any of those fledgling coders come back. They seemed excited and entertained, and they promised to practice at home (MakeCode is web based, so they can carry the code anywhere). One even said they were going to buy a Circuit Playground from Adafruit to practice on. So maybe I didn't make it seem too boring or complicated after all.

They might never ask me for help again, but I sure hope we have some new programmers beginning their journey. And MakeCode is a pretty good way to start.


Also find me on:
FACEBOOK -or- INSTRUCTABLES -or- YOUTUBE

No comments:

Post a Comment