AnswerBun.com

How to embed TIC-80 into Computer science 101 course

Computer Science Educators Asked on August 21, 2021

I’m planning to design an introductory course to CS and programming for kids of 8-12 grade and see that we have Scratch for catching an eye in the beginning and getting instant result on place.

But I need something about procedural programming as a replacement for Pascal, where kids could do something step by step without any abstractions. What I see is that I can potentially use either PICO-8 or TIC-80 fantasy consoles, but I don’t see any materials or attempts to use Lua language for this goal. So the question is – why?

What are the drawbacks of teaching this way? (If we had non-dead Pascal with advanced graphical library like in DrRacket and good contemporary API – I’d rather have used this instead).

UPD: The question is inspired by the post of my colleague on Medium: https://medium.com/@astynax/%D0%BD%D0%B5-%D0%B2%D1%81%D1%91-%D1%82%D0%B0%D0%BA-%D0%BF%D0%BB%D0%BE%D1%85%D0%BE-%D0%B5%D1%81%D1%82%D1%8C-%D1%87%D0%B5%D0%BC%D1%83-%D1%83%D1%87%D0%B8%D1%82%D1%8C-30e4f50213a1 (Google translatable to english from Russian)

One Answer

Being on this site since the beginning, I have many times now encountered this notion that for introductory courses, higher level languages mean that students will deal with more abstraction and lower-level languages mean that they will deal with less abstraction, but I believe that this is fundamentally incorrect.

I'm going to actually recommend a frame-shift that I hope you will find helpful, and along the way, I hope to also persuade you to a different way of thinking about introductory programming courses.

I myself learned on BASIC and Pascal, so I have no specific objections to these languages. There is plenty of learning to be had in such languages! But there was also plenty of abstraction. It's not as if the "Read fetch execute" cycle, memory management, operating system architecture, or secure program memory segmentation are somehow magically apparent to a Pascal beginner, nor is that an appropriate goal for a beginning programming course. All of these languages (even C) are truly "high-level languages" full of metaphors and abstract ideas, and none of them will give a student any sense of what is going on under the good.

Don't believe me? Consider how much is "explained" to a student in this Pascal code:

type
   color = ( red, black, blue, silver, beige);
   car_color = array of [color] of boolean;
var
   car_body: car_color;

Contrast that with this Java code for Greenfoot, which is a system made to teach beginners in Java, and spawns a Zombie at location (50, 50):

world.addObject(new Zombie(), 50, 50);

How much of what is going on "under the hood" will be understood in either example by a beginner? How clear is the expected behavior from what we type?

The purpose of high-level languages is:

  1. To abstract away what is happening inside of the computer. People didn't want to learn new assembly languages, architectures, and capabilities for every new processor. Abstracting away what computer do is #1 on this list because it is the most important, and it is what drove us away from assemblies and into high-level languages in the first place.

  2. To make some kinds of tasks easier to accomplish. The above code example is great. The compiler makes and manages an array for you! No multiplication to find the offset from the initial memory location on the stack needed! And the fact that I can now, in that same Pascal program, write:

if car_color[blue] then 
   writeln('blue paint has been applied' );

...is fantastic. It's useful! It makes the programmer's intentions clear! But it tells me nothing about blue not existing in the run-time execution at all, since it was remapped by the compiler to a 4-byte integer, or how writeln sends information to the console. The compiler allows me to work at the level of a metaphor, and handles the details all the way down.

I guess here's what I'm getting at: when you study any programming language, you are studying at the level of that programming language. Importantly, all of the stuff below that level is 100% opaque, and this is by design. It is in no way true that studying a non-OO imperative language will leave students feeling like everything makes sense, but studying an OO language will leave students feeling like everything is a mystery.

Both approaches uncover a tiny bit about one particular layer, and still leave basically everything as a mystery. It will take your students many more years of study before they feel like they have a handle on what computers actually do.

This is not to advocate for OO specifically, but rather to suggest that you reframe your question like so: since no particular programming language choice is going to explain things at a higher or lower level than the particular metaphors employed by that specific language, which language choice will get my students a lot of mileage as they go forward, both in terms of what they are capable of in my course, and in terms of what explorations it opens up for them afterwards?

My recommendation for that question is probably Java, Python, or JS. Since you're starting from the language Scratch, you might naturally go a game-building route to start, using PyGame in Python, Greenfoot in Java, or GDevelop in JS (Note: I have no experience with GDevelop, I just found it with a Google search).

Good luck with your course! Hopefully it will be a very satisfying and enriching experience, both for you and for your students.

Answered by Ben I. on August 21, 2021

Add your own answers!

Related Questions

Creating a pre-recorded lecture

4  Asked on January 22, 2021 by ella-sharakanski

 

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir