Comment by giraffe_lady
16 hours ago
I've taught programming to beginners, both children and adults, and lua is the worst of the languages I've done it with. It's an amazing technical accomplishment, and CS students should study its implementation. But for actual beginners its "focus on fundamental concepts" and flexibility are liabilities.
The main struggle people have learning to code is getting over the initial frustration hurdle where they can't actually accomplish anything yet. What they have to get them through this is excitement about their actual goals. With lua you burn too much goodwill and beginner spark on debugging string manipulation functions that don't seem important to the actual interest or goal that brought them to programming. Or figuring out how to use luarocks so you can make http requests, or regex, or whatever.
> 1-based indexing could cause beginners to get confused when they move to another language.
This is so far from the problems that beginners actually have. You should teach some programming, it's a really fascinating experience that will mess with your intuitions about how people learn this skill, and what's hard about it.
Interesting viewpoint. It is my belief that Lua would be nice as a first language, but maybe this opinion is tainted by all my years of experience in programming. Lua definitely wasn't my first language, I started out with C/C++ and Java, long ago. Nothing beats having first-hand experience as a teacher and thus I'll accept your opinion as something more substantiated than my gut feeling.
I'm quite interested in this topic, since I would like to write a good book to introduce absolute beginners into the world of programming. I have a good and encompassing knowledge about many different languages, nevertheless I lack teaching experience.
In your opinion, which languages are good candidates as a first choice and what do you think about using a Lua game framework, like for instance Love2D to teach programming (instead of raw standalone Lua)? The idea being that instead of clunky low level awkwardness, like string manipulation, students would instead see geometrical shapes moving on a screen with just a bunch of simple and imperative statements. Would that provide a better motivation?
I think if you were going to design a rigorous approach to programming from the ground up as part of a like new quadrivium or something, lua could have a place in it.
But when people decide to learn programming now, they usually have a goal in mind so the best language is the one that lets them keep that objective in focus as they learn. Not necessarily do it most easily: love is good because while making a game with it is a huge undertaking for a novice, they can see the whole time that game-making is what they're building up to.
But for example I've seen rank beginners get really fascinated with data visualization, or interacting with their local government's API, or text generation, or audio stuff. All things that are going to be out of reach for a novice in lua. And a lot of people will show up saying they want to make games, but it's because video games are the one programming artifact they have positive experiences with. Once they start to see the broader possibilities other interests develop.
Anyway I have had a lot of success introducing programming with roblox scripting. It adds a lot of the "missing" lua library features and the script editor is a decent basic IDE that simplifies tooling, another huge pain point for novices.
For non-game focused beginners I've had the best results in ruby. Python works as well once you get going but the whitespace is a frustrating time sink in a classroom environment. In these the strength is being able to grab a library for any API they'd want to work with, and build something that feels like an actual useful tool to them.
> Anyway I have had a lot of success introducing programming with roblox scripting. It adds a lot of the "missing" lua library features and the script editor is a decent basic IDE that simplifies tooling, another huge pain point for novices.
I've had some success introducing programming in Lua to kids (ages 7-12) by way of the OpenComputers Minecraft mod. They were all already into playing modded Minecraft, and getting in-world feedback from running various commands (turning on/off redstone signals, moving around blocks, attacking monsters, etc.) meant that the "boring" time between "hey, let me show you how to program" and something exciting happening was <5 minutes. Beyond Minecraft-specific libraries, the computers in the mod also come with a HTTP client library, an editor and a shell that directly runs Lua scripts.
1 reply →
I remember telling my friend to start his brother on ApplesoftBasic because its batteries included, has no files or libraries, you just do some math and print and draw colored dots and lines and I trained two people like that on an Apple][ emulator with good results.
My friend was like "no way. im gonna start him with something simple like html."
Within seconds he realized he had to explain what paths were, and his brother struggled so much with them. My friend took for granted what he had already spent time learning. He was unable to guess what would be difficult to understand without priors.
Walled gardens like Processing seem to be better for education.
I would absolutely never, EVER encourage the use of a package manager when getting someone accustomed to programming. Why on earth would you do that? The problems that package managers solve are completely orthogonal to the environment of someone who hasn't even built up the intuition for basic things like flipflops, lexical scope, iteration, etc.
Downloading archives with a web browser and extracting them and just doing manual file management is vastly preferable in such an environment. That is a vastly simpler process which is impossible to break, and odds are the student will already be familiar with most of the process.
See my other comment I guess. My experience has been that a lot of the things that motivate beginners are out of reach without using a package. In ruby or python I can say hey just install this thing here's how. Even in JS, it's a bigger hurdle but I can show them npm. Lua has nothing as accessible as this.
Managing archives is not easier in my experience, for the format I teach. Students are not necessarily using the same packages, not all on the same OS, and familiarity with manually managing files cannot be assumed. Probably the majority of middle schoolers I teach do not have that skill coming into my class, high school maybe 50/50.