top | item 42436177

(no title)

scott_s | 1 year ago

I find the core position of the author unconvincing - that is, the author advocates for non-professional languages for beginners, instead using languages designed specifically for teaching. The main argument put forward in favor of professional languages is crossover: if a student learns a language in class, they may be able to use that language professionally. The author then argues against that main point.

I think students should be taught in "professional" languages, but crossover is not my main reason. Rather, it's that professional languages have an enormous corpus of examples that students can look up. If a student is learning on a teaching language without much adoption, there's just not much else a student can do but use the materials that part of the course. Teaching languages don't let students expand their universe of examples.

I agree with the author's point about real insight coming on learning the second (and third, etc.) language and systems. But I don't find it as a compelling point in favor of teaching languages - quite the opposite. To me it means there's no need to obsess over first languages.

Designing programming languages is fun. Designing a programming language which meets some platonic ideal of teachability is moreso because it feels possible to "solve" the design and craft the perfect jewel of a language. But I'm unconvinced it's useful research.

For the record, my first language was C++, and I'd default to teaching beginners in Python.

discuss

order

jll29|1 year ago

I also find it more useful to teach something real, not a toy.

Even PASCAL was never a toy, though it was designed motivated by teaching purpose, it became professional because it was capable of that.

When I told some friends I was going to teach 11-year-olds to program, and that I was considering some BASIC versus Python, they suggested Scratch. But 11-year-olds aren't babies. They can understand a lot, and they should be enabled to talk about their code (which textual representations enable, but not Scratch-style visual programs).

So I picked Python (with pyturtle for easy turtle graphics), and it worked well.

scott_s|1 year ago

I actually think Scratch is fine for 10ish year olds, mainly because all of my above holds true: scratch.mit.edu is an online community where kids can copy, tweak and in general be inspired by and learn from what other kids have done. Your universe can expand with your curiosity. When my nephew was 10, he started with Scratch. My brother guided him towards using Python on a Raspberry Pi soon after.

For kids around 10, I think it's all about what the kid thinks is more fun.

taeric|1 year ago

I would be surprised if your first program was C++? Specifically, getting a decent C++ toolchain that can produce a meaningful program is not a small thing?

I'm not sure where I feel about languages made for teaching and whatnot, yet; but I would be remiss if I didn't encourage my kids to use https://scratch.mit.edu/ for their early programming. I remember early computers would boot into a BASIC prompt and I could transcribe some programs to make screensavers and games. LOGO was not uncommon to explore fractals and general path finding ideas.

Even beyond games and screensavers, MS Access (or any similar offering, FoxPro, as an example) was easily more valuable for learning to program interfaces to data than I'm used to seeing from many lower level offerings. Our industries shunning of interface builders has done more to make it difficult to get kids programming than I think we admit.

Edit to add: Honestly, I think my kids learned more about game programming from Mario Builder at early ages than makes sense.

Jtsummers|1 year ago

> I would be surprised if your first program was C++? Specifically, getting a decent C++ toolchain that can produce a meaningful program is not a small thing?

Visual C++ (some version) was in a book I received as a gift in high school, it was my second language after BASIC (some version on a Tandy running MS-DOS). It was not hard to set up. You ran the installer, you had the language set up. If someone had ended up in the same situation as me but without the BASIC experience, I could see it being an easy to set up (not easy to learn) first language.

WillAdams|1 year ago

>Our industries shunning of interface builders has done more to make it difficult to get kids programming than I think we admit.

I'd be very glad of an agreed-upon IDE which:

- made it easy to draw up a UI

- was cross-platform

- opensource

- easy to install/compile/distribute compiled programs

Bonus points if it is also uses standard widgets and is accessible to screen readers and the like.

Livecode (Hypercard clone previously known as Runtime Revolution) was sort of that until the community edition was pulled.

pjc50|1 year ago

You've now learned that the internet will provide counterexamples whenever you make a categorical statement :)

My first language wasn't C++, it was BASIC, but by the time I got hold of Microsoft QuickC and Borland Turbo C++ they were available as self-contained IDEs that Just Worked.

scott_s|1 year ago

My first program was indeed C++. In 1998, my high school had a computer lab setup with Turbo C++, and I took a non-AP computer science class. In college, starting in 1999, after entering as a computer science major, we were guided to use Visual C++ on Windows. We got Visual C++ from our department - I can't remember if we paid or if it was just provided to us.

fny|1 year ago

This happened to my sister at Florida State University, and she lost her mind.

pasc1878|1 year ago

The problem I have with this is "professional languages have an enormous corpus of examples that students can look up."

The problem is that especially for common languages like Javascript, complex ones like C++ and changing ones like Java the published code follows Sturgeon's Law "ninety percent of everything is crap" Made worse by the languages and libraries have changed over time so even good code 20 years ago is not good code now. (This is also the problem with AI generated code - it learns from rubbish) Experienced programmers can look at code and see what is crap so the way we look is different to beginners.

For teaching you want curated examples.

cardanome|1 year ago

> If a student is learning on a teaching language without much adoption, there's just not much else a student can do but use the materials that part of the course.

I think that is the biggest advantage of using a teaching language. You can give them curated, high-quality examples and make sure they not led astray by crap code they find on the internet.

And in the ChatGPT era it forces them to actually learn how to code instead of relying on AI.

The main problem is that student motivation is what drives learning success. Just because something is good for them and theoretically the best way to learn does not mean they will like this. It is difficult to sell young people long term benefits that you can only see after many years of experience.

It seems to me that the majority of students prefers "real world" languages to more elegant teaching languages. I guess it is a combination of suspected career benefits and also not wanting to be patronized with a teaching language. I wish people were more open to learning language for the fun of it but it is what it is. Teach them the languages they want to learn.

PinkishNomad|1 year ago

Agree on this. That's a big problem I have with using Python. There are so many ways of doing things (this is also mentioned in the paper) it is almost impossible for the students to do it properly.

I think the problem with teaching languages is also of neurological nature, basically "student motivation is what drives learning success". Our brain constantly filters out non relevant information. A teaching language, having no use outside of the course, scores very low on relevance in our brain making it very hard to learn and find motivation.

scott_s|1 year ago

I think you overestimate the ability of a tiny community of curators to generate examples to meet the curiosity of students.

gus_massa|1 year ago

The Racket distribution has many languages, in particular a few "Student Languages" that are simplified versions of the main language and are degigned to use with the book "How to Design Programs" [1].

They have some artificial restictions to avoid common errors of beginers, and give better hints in case of common errors. They are (almost) a subset, so you can just change the language declaration at the top and get the full power.

  #lang beginer ; <-- I'm not sure which is the magic keyword [2]
  (define (f x y) (+ x y))
  (display (f 2 3)) ;==> 5
  (display f) ;==> error: it's probably an error of a beginer

  #lang racket
  (define (f x y) (+ x y))
  (display (f 2 3)) ;==> 5
  (display f) ;==> #<procedure:f> 

[1] https://docs.racket-lang.org/drracket/htdp-langs.html

[2] There is some magic in the editor to hide the declaration in the students languages and I don't use them, so I'm not sure how to summon them in the text version.

j16sdiz|1 year ago

> I think students should be taught in "professional" languages, but crossover is not my main reason. Rather, it's that professional languages have an enormous corpus of examples that students can look up.

PHP fits this description, and lots of self-learners get it as their first language. I am not sure we want to go that direction

vishnugupta|1 year ago

My hot take on this topic is that one should introduce programming through spreadsheets, Google sheets or even MS excel.

Assuming it’s done at the high school level students can immediately find value in using it for household budgeting, school or business inventory management, small business accounting, event management and what not. Combine it with Google Forms and you have a near complete product.

alexey-salmin|1 year ago

> I find the core position of the author unconvincing - that is, the author advocates for non-professional languages for beginners

Based on my experience of teaching 10-16 year old kids to program, a non-professional language does help. Is it necessary? Absolutely not. Does it increase chances of success for a child struggling with their first programming experience? I believe so. Even 10% increase makes a huge difference when applied at scale in schools.

How does an artificial education-focused language help concretely? In my experience there are two big problems well-meaning kids experience when they learn stuff: insufficient attention and insufficient resilience.

1) Attention. If you want to explain something to kids you better get to the point damn quick otherwise in 10 minutes you get that blank stare from 8 out of 10 kids (even if you managed to keep them from looking into the window, talking to each other or playing with their phones). When you see these glassy eyes you know it's already lost, no matter what you say next it just won't stick. You have to reboot the lesson with some distraction and start over again. When teaching the first programming language this means that you absolutely cannot explain properly how scanf("%d",&i) works. It takes variadic parameters, in this instance it's two pointers and pointers typically take 3-4 dedicated lessons to truly understand, much later in the curriculum. You'll never get to these pointer lessons if you didn't even manage to write your first program that reads a number from the keyboard. And I'm not even getting into #include <stdio.h> and preprocessor stuff. So what you have to do is to say "trust me, just memorize it as a spell, you will understand it later". When teaching C to non-programmers you say that phrase a lot.

2) Resilience. Not all kids are the same but many of them (can't say if majority or not, depends on the composition) give up rather quickly in the face or problems, judging either themselves or the subject to be stupid (depending on personality). There are 10 different ways in which you can write scanf("%d",&i) incorrectly when you don't understand the mechanics behind it, which increases the chance of mistakes and increases the number of kids who give up. When teaching C to non-programmers you see desperate people struggling with even simplest programs quite often.

Is it possible to overcome all this and learn C++ as your first language on a Dvorak keyboard while learning English in parallel, like one of commenters here unironically suggests? Yes, it is possible. Is it likely to happen? I don't think so, such curriculum will have very low success rates even with a good teacher. And an average school teacher would probably fail at it himself. You can also try teaching a child to count by starting from Peano axioms I guess.

So these learning-focused languages (like Logo from my childhood) help to maintain attention and resilience by building a proper progression curve: you don't need to understand complex concepts to be able write simple programs. Game designers know this very well: you never throw all the complexity at the player at level 1, you gradually introduce game mechanics and tricks so that they have time to adapt and learn. If you make a game where level 1 is overly complicated, will people still manage to play it? Some will, but most will give up.

Overall I'm quite depressed with the state of programming for kids where I live right now (Paris). At the age of 10 they didn't even begin, while at the same age we already drawing chessboards in Logo. And that was 1999 in the middle of Russia, not 2024 in the middle of Europe.