# Material for teaching basic programming concepts

**URL:** <https://forum.makecode.com/t/material-for-teaching-basic-programming-concepts/22487>\
**Category:** Educators' Lounge\
**Tags:** demo, educator\
**Created:** [September 15, 2023, 7:10pm UTC](https://forum.makecode.com/t/material-for-teaching-basic-programming-concepts/22487 "2023-09-15T19:10:22Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [September 15, 2023, 7:10pm UTC](https://forum.makecode.com/t/material-for-teaching-basic-programming-concepts/22487/1 "2023-09-15T19:10:22Z")

</div>

Hi,

I am currently testing out and refining a concept I have been working on for teaching in elementary school using MakeCode Arcade some basics of programming, like sequence, iteration, selection, variables and functions.

The idea is to have a blank canvas and _on start_ program entry in MakeCode, where pupils can solve different tasks for moving the duck to the water, by use of sequences of custom move blocks in the top blocks menu entry and progress together by various loops, IFs, variables and functions etc.

The underlying program is hidden in the _custom.ts_ file, not cluttering the canvas and drawing away attention, and the obstacles(cars) are fairly easily moved around in the tilemap to make different game levels. Both the programs and the keyboard(if programmed) can be used to move the duck, and sometimes the game is developed further to something more fun and better looking.

Skillmaps and tutorials are great, and I use them in classes, too. Mostly ones that are already made. But they take a lot of time(at least for me) to make yourself, and are often a bit linear and focused more on game making than just the basics.

Anyways, I am sharing these examples here for 3 reasons:

1. To maybe get some feedback or examples in this thread for improving this concept, or maybe you could post back similar or other different/new teaching concepts/ideas in MakeCode that you have made and tested with success in classrooms?
2. Maybe somebody could help me on how to export/make available and use as a regular red sprite variable block the now grey _mySprite_ inside the _forever_ loop which is defined inside _custom.ts_?
3. To give back a little to a great forum which has helped and inspired me a lot. Copy and use if and as you please.

> **[Basics Demo with examples](https://arcade.makecode.com/87676-85843-51059-67210)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

[Basic Demo blank](https://makecode.com/_aHt13XfdT3sU)  
[Basic Demo #2 with examples](https://makecode.com/_c5170KFmTHgF)  
[Basic Demo #2 blank](https://makecode.com/_LY6AsE1yqasY)

Thanks a lot!

Br,  
Vegard

---

<div class="post-metadata">

**Author:** ![KIKIvsIT](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kikivsit/32/10492_2.png) [@KIKIvsIT](https://forum.makecode.com/u/KIKIvsIT)\
**Post date:** [September 18, 2023, 5:51pm UTC](https://forum.makecode.com/t/material-for-teaching-basic-programming-concepts/22487/2 "2023-09-18T17:51:38Z")

</div>

I think I get what you’re trying to do here. I’ve also been exploring some simplified options for early elementary. I’ve also faced the same issue that you’re facing with the grey variable.

Unfortunately, there are a few things that I can’t get to show up in the toolbox, no matter how hard I try. Those include:

- Pre-declared variables
- Pre-filled If statements
- Pre-filled conditionals

What we can do is make it so that young’uns don’t need to access the sprite directly because all of the blocks make available to them already point to the predeclared sprite in question. Here’s an example of a tutorial that does that:

> **[Microsoft MakeCode Arcade](https://arcade.makecode.com/#tutorial:/test/tutorials/makecode-jr-goal)**
>
> Develop your programming skills by quickly creating and modding retro arcade games with Blocks and JavaScript in the MakeCode editor

---

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [September 18, 2023, 9:03pm UTC](https://forum.makecode.com/t/material-for-teaching-basic-programming-concepts/22487/3 "2023-09-18T21:03:40Z")

</div>

Thanks for your elaborate answer, @KIKIvsIT! It both expands the perspective on the problem and provides a nice solution and teaching concept which is relevant for this thread.

I, at about the same time as you published, found out a similar workaround, where I make custom function blocks which returns the values from or do other operations with or on the variable.

I will post that later as a share of an alternative attempt at teaching material for selection logic which I am working on now.

But this is quite restrictive for practical use, and a little confusing with different blocks for the plain standard blocks when teaching.

Maybe there is a way to forward the predefined variables as true variable blocks in custom.ts and I just don´t know about it. But that seems unnecessary, when variables are already fully supported natively, and should turn up in the variable menu when defined in the global scope.In any case, not as a grey block.

I also attempted “export default” for the variable, since it is defined in another file, but then I am told that this is not necessary, since it is already globally available. So there is something strange/incoherent with the ways blocks are picked up from text-based code only in the main.ts file. You can also define new real block variables with the same name without conflict in main.ts, even though they supposedly are in the same scope already, if I remember correctly.

I’ll cross post our common issues here on @jacqueline.russell’s [Common errors?](https://forum.makecode.com/t/common-errors/22543), since these apparantly are _common_ for us at the moment, and see if this gets picked up… 😉

---

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [September 20, 2023, 4:50pm UTC](https://forum.makecode.com/t/material-for-teaching-basic-programming-concepts/22487/4 "2023-09-20T16:50:08Z")

</div>

Here’s an example of some teaching material for exploring selection by use of either

1. compound conditions in a single IF-statement, or
2. compound and nested IF-statements with single conditions,

using one(A or B) or two(A and B) conditions:

> **[Logikk](https://arcade.makecode.com/81495-22495-12174-39832)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

Use the LEFT button to set condition A to TRUE and the RIGHT button to set conditon B to TRUE.  
With the SPACE bare, toggle between the modes:

1. Using LEFT and RIGHT button to explore results
2. Truth table with FALSE/TRUE
3. Truth table with 0/1

Here, with some common solutions for:  
[Compound conditions](https://makecode.com/_LFJD4uYLTJdU)  
[Compound and nested IFs](https://makecode.com/_cbhh4ydx6Dxj)

Anyone else who has some of their own teaching material or concepts to share here?

---

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [September 20, 2023, 9:21pm UTC](https://forum.makecode.com/t/material-for-teaching-basic-programming-concepts/22487/5 "2023-09-20T21:21:11Z")

</div>

Since it’s so good, I’ll add @rymc88’s great _Unofficial Makecode Educator Resource Website_ here myself:

> [@Unofficial Makecode Educator Resource Website](https://forum.makecode.com/t/unofficial-makecode-educator-resource-website/16767):
>
> Hello Educators, I recently created a Google Site that I will be posting the Makecode resources I create and use in the classroom. So far, there are only Makecode Arcade slides but I will be posting Microbit, CPX, Minecraft and eventually Scratch. The link to the website is below. Please give me any feedback and hopefully this will save people time. Most of the instructional slides are taken from other tutorials, but just scaffolded/modified and some are originals. [Unofficial Makecode Resource…](https://sites.google.com/view/mc2studios/arcade)

Anyone else have some nice teaching material or concepts to share here?

---

<div class="post-metadata">

**Author:** ![rymc88](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/rymc88/32/13577_2.png) [@rymc88](https://forum.makecode.com/u/rymc88)\
**Post date:** [September 22, 2023, 4:38pm UTC](https://forum.makecode.com/t/material-for-teaching-basic-programming-concepts/22487/6 "2023-09-22T16:38:17Z")

</div>

@Vegz78 Thank you for bringing this back to life. I have recently updated some of my resources, so I will need to update the site. I would love to collaborate to create some great educational content for all learners.

---

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [September 22, 2023, 4:53pm UTC](https://forum.makecode.com/t/material-for-teaching-basic-programming-concepts/22487/7 "2023-09-22T16:53:24Z")

</div>

Some really nice Python skillmaps from @MrDGuy!:

> [@Sharing Python Skillmaps](https://forum.makecode.com/t/sharing-python-skillmaps/22666):
>
> Hello Educators! I worked this summer to create some python content since it was hard to find things that didn’t start with large blocks of python code. I also make an extension called “Robot” which is very similar to the robot questions on the AP Computer Science Principles Exam. I am not the most seasoned coder and I know that improvements can be made and that is why I want you guys to help me improve these. Robot Extension: The robot has a begin screen function that requires a Tilemap an…

---

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [September 22, 2023, 11:48pm UTC](https://forum.makecode.com/t/material-for-teaching-basic-programming-concepts/22487/8 "2023-09-22T23:48:06Z")

</div>

Some nice micro:bit-guides, updated link:

> **[micro:bit](https://learn.browndoggadgets.com/Item/micro_bit)**
>
> The micro:bit the pocket-sized computer transforming digital skills learning. It can be programmed to interact with the world around you using a computer.

Originally posted by @raster [here](https://forum.makecode.com/t/micro-bit-projects-and-guides/6499)

---

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [September 22, 2023, 11:48pm UTC](https://forum.makecode.com/t/material-for-teaching-basic-programming-concepts/22487/9 "2023-09-22T23:48:07Z")

</div>

And how could I forget @KIKIvsIT’s corner?!?:

> **[Kiki’s Corner](https://medium.com/kikis-corner)**
>
> Whether you’re a student or a teacher, a beginner or expert, drop by weekly to find new tips, suggestions, and challenges!

Originally posted [here](https://forum.makecode.com/t/detailed-how-to-blog-entries-at-kikis-corner/14837)

---

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [September 22, 2023, 11:53pm UTC](https://forum.makecode.com/t/material-for-teaching-basic-programming-concepts/22487/10 "2023-09-22T23:53:25Z")

</div>

@AlexK posted earlier some interesting links about teaching:  
[Big Book of Computing Pedagogy](https://forum.makecode.com/t/hello-worlds-big-book-of-computing-pedagogy/10567)  
[Computer Science Education Research](https://forum.makecode.com/t/cs-education-research-summary-by-raspberry-pi-foundation/12806)

And a lot of interesting material for teaching with Minecraft Education Edition here:

> [@Minecraft EDU HELP!](https://forum.makecode.com/t/minecraft-edu-help/12725/2):
>
> There’s the curriculum written by the MakeCode team, too:

---

<div class="post-metadata">

**Author:** ![KIKIvsIT](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kikivsit/32/10492_2.png) [@KIKIvsIT](https://forum.makecode.com/u/KIKIvsIT)\
**Post date:** [September 25, 2023, 6:16pm UTC](https://forum.makecode.com/t/material-for-teaching-basic-programming-concepts/22487/11 "2023-09-25T18:16:05Z")

</div>

This is also really good:

[Everything You Need to Ace Computer Science and Coding in One Big Fat Notebook](https://a.co/d/431yWk2)

---

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [October 2, 2023, 4:57pm UTC](https://forum.makecode.com/t/material-for-teaching-basic-programming-concepts/22487/12 "2023-10-02T16:57:57Z")

</div>

I’d like to share a relevant and good Norwegian teacher’s site here(translated to English):  
[Espens klasserom - MakeCode](https://espensklasserom-com.translate.goog/?s=makecode&_x_tr_sl=no&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=wapp)  
[Espens klasserom - Minecraft](https://espensklasserom-com.translate.goog/category/minecraft/?_x_tr_sl=no&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=wapp)

Original language and front page:

> **[Espens klasserom](https://espensklasserom.com/)**
>
> Teknologi i skolen

---

<div class="post-metadata">

**Author:** ![rymc88](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/rymc88/32/13577_2.png) [@rymc88](https://forum.makecode.com/u/rymc88)\
**Post date:** [October 2, 2023, 7:22pm UTC](https://forum.makecode.com/t/material-for-teaching-basic-programming-concepts/22487/13 "2023-10-02T19:22:08Z")

</div>

I second this…I use it to write lessons for my CS classes.

---

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [October 16, 2023, 6:27pm UTC](https://forum.makecode.com/t/material-for-teaching-basic-programming-concepts/22487/14 "2023-10-16T18:27:41Z")

</div>

Here is a small correction to the logic teaching material further up, which previously did not work with arbitrary commands, only with the logic, and now has a command block to clear the screen, so that one can show, for instance, conditional logic with sprites as ad hoc examples in class, which turned out to help the students understand.

> **[Logikk](https://arcade.makecode.com/11148-00063-07363-58200)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

Here, also updated with some common solutions from [the truth table of sentence logic](https://no.wikipedia.org/wiki/Setningslogikk) for:  
[Compound conditions](https://makecode.com/_cKacrgc2cb4x)  
[Compound and nested IFs](https://makecode.com/_hpvYMfaFMWdP)

---

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [November 8, 2023, 5:52pm UTC](https://forum.makecode.com/t/material-for-teaching-basic-programming-concepts/22487/15 "2023-11-08T17:52:42Z")

</div>

I am experiencing(as expected) some cheating when using various MakeCode teaching material in a classroom setting. For instance, as described here:

> [@Suggestion: Persistent save data (with persistent game links)](https://forum.makecode.com/t/suggestion-persistent-save-data-with-persistent-game-links/21989/10):
>
> I believe there is also a need for something like this for educational use. My experience with using MakeCode in a classroom setting, is the unfortunate, but expected and indeed creative, occurrence of 2 particular forms of “cheating”, either: To go into JavaScript in the teacher’s solution file and just copy the text code and then paste the text code into your own assignment and share and hand in, or To get a copy the solution from one of the classes’ brightest or most industrious students an…

Does any of the other educators here in the Educator’s Lounge have some successful anti-cheat measures to share?  
(Preferably code-based/technological anti-cheats, but organizational could also help…)

---

<div class="post-metadata">

**Author:** ![rymc88](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/rymc88/32/13577_2.png) [@rymc88](https://forum.makecode.com/u/rymc88)\
**Post date:** [February 9, 2024, 6:14pm UTC](https://forum.makecode.com/t/material-for-teaching-basic-programming-concepts/22487/16 "2024-02-09T18:14:33Z")

</div>

What teaching material are you using?

---

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [February 10, 2024, 2:05am UTC](https://forum.makecode.com/t/material-for-teaching-basic-programming-concepts/22487/17 "2024-02-10T02:05:32Z")

</div>

I mostly make my own tailored Google Classroom courses, with combinations of theory and coding challenges/tasks, either as an application or a part of another subject(typically STEM) or for basic programming skills at elementary/jr.high levels.

My core idea is to use MakeCode for coding across different editors(Arcade, micro:bit, EV3, Minecraft etc.), since the user interface and basic language is similar for all, to avoid the threshold og switching to slightly new languages and systems all the time. And I also find it useful to be able to switch seamlessly between text and block based coding, though does not work as well with Python as JavaScript.

My goal is to work with teachers and schools to help implement, build and support teaching material, competence, local teacher groups/environments and regional networks and cooperation to strengthen programming in schools in general. But in a way where the school become self driven, more robust with its own ownership of this, and not having to rely on people like me or other expensive consultants, licenses or equipment.

Currently, I am battle testing my concepts directly on students, together with other teachers.

The programming parts are partly developed from my own ideas and inspired by the MakeCode or other communities, like this thread topic is about, but also ported partly or in whole to MakeCode from the school’s own teaching books/material or wherever I find good stuff(good tutorials on front pages here or shared in the forums). For instance, many teaching books have good coding examples, but they are solved on many different and proprietary languages and systems, which teachers and pupils then instead can solve in MakeCode which they already know, instead og wasting time on these switching thresholds.

---

<div class="post-metadata">

**Author:** ![rymc88](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/rymc88/32/13577_2.png) [@rymc88](https://forum.makecode.com/u/rymc88)\
**Post date:** [February 12, 2024, 4:37pm UTC](https://forum.makecode.com/t/material-for-teaching-basic-programming-concepts/22487/18 "2024-02-12T16:37:06Z")

</div>

I used Makecode for all of my CS classes because of the ecosystem. It gives you different ways to approaching programming but keeping the interface the same, which gives you more time on programming instruction.

I love your goal as I am interested in creating my more Makecode resources and instructional materials.

The student copying issues is something every class faces. From my teaching experience the way I counteracted this by creating open-ended problem or project based assessment that would incorporate all skills taught in a certain unit.

---

<div class="post-metadata">

**Author:** ![Vegz78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/vegz78/32/1201_2.png) [@Vegz78](https://forum.makecode.com/u/Vegz78)\
**Post date:** [February 15, 2024, 12:54am UTC](https://forum.makecode.com/t/material-for-teaching-basic-programming-concepts/22487/19 "2024-02-15T00:54:44Z")

</div>

For the first case of cheating - just copying the solution on tasks where I find it beneficial to publish the solution as hints/inspiration - I have found that inserting visual similar characters/homoglyphs in the code or comments, either just to reveal copy cheating, or with a control function that renders and error in the copied code, to be effective…  
[https://security.stackexchange.com/a/128465](https://security.stackexchange.com/a/128465)

Regarding just copying other students, your experience with open-ended problems or project based assessments seems to be the way to go. Thanks for the tip!
