Author Topic: Teaching coding to a 12 year old  (Read 3408 times)

0 Members and 1 Guest are viewing this topic.

Offline xrunnerTopic starter

  • Super Contributor
  • ***
  • Posts: 7558
  • Country: us
  • hp>Agilent>Keysight>???
Teaching coding to a 12 year old
« on: March 18, 2024, 12:54:38 am »
Was talking with a neighbor about what her three kids are learning lately (they are all home schooled). I know them very well becasue I 3D print things for them all the time. One of the things she mentioned was that she wanted the oldest one (12 years old) to learn coding. I told her I would be interested in teaching some if she wished.

The advice I wanted to ask (because I have no kids) would be if using the Arduino platform would be the way to go these days. Not only can you begin by writing simple programs and viewing the text results on-screen, you would also be ready to try things like LEDs and other types of simple interesting experiments (if they wanted to go that route). I am not a teacher so I do not know the best way, but it seems like a good idea to me. What do you all think?
I told my friends I could teach them to be funny, but they all just laughed at me.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11385
  • Country: us
    • Personal site
Re: Teaching coding to a 12 year old
« Reply #1 on: March 18, 2024, 01:04:39 am »
Unless embedded is an explicit interest/requirement, I would just stick to PC for learning to code. And later translate that to MCUs if needed.
Alex
 
The following users thanked this post: pdenisowski

Offline JoeyG

  • Regular Contributor
  • *
  • Posts: 118
  • Country: au
Re: Teaching coding to a 12 year old
« Reply #2 on: March 18, 2024, 01:14:27 am »
I  agree with Alex - stick with a known stable hardware platform like a PC.

I would start with the free programming online using simple block  graphical coding  eg   [Scratch] https://scratch.mit.edu/

Lots of online support an forums.

Then perhaps migrate to Scratch with external hardware to control robots etc  (such as lego minstorms)  https://scratch.mit.edu/ev3
 


other hardware that can connect to Scratch
https://en.scratch-wiki.info/wiki/Hardware_That_Can_Connect_to_Scratch
 

Offline artag

  • Super Contributor
  • ***
  • Posts: 1111
  • Country: gb
Re: Teaching coding to a 12 year old
« Reply #3 on: March 18, 2024, 01:25:40 am »
I disagree - I think real-world applications are more interesting than screen-bound ones. And I think having an aim in mind is essential to keep a kid's interest, you can't just do programming exercises.

That view is slightly moderated by the fascination of kids with computer games. If they can achieve something in the way of a game on screen, it may hold their interest and I don't know how much they care about parity with commercial games vs the satisfaction of doing something themselves.

Step one is probably to find out what interests the kid ..

FWIW my own son, despite being surrounded by electronics, never took much in interest in either that or programming. He was more interested in games and art. But he ended up doing a moderately self-sufficient and technical job at a semiconductor company so I guess something soaked in.

 
« Last Edit: March 18, 2024, 01:30:10 am by artag »
 

Offline xrunnerTopic starter

  • Super Contributor
  • ***
  • Posts: 7558
  • Country: us
  • hp>Agilent>Keysight>???
Re: Teaching coding to a 12 year old
« Reply #4 on: March 18, 2024, 01:34:17 am »
Thanks for the posts so far. The kids are very attentive and I think they are pretty smart, but I don't know what they have been taught so far. If the Mum wants me to try this I'll find out pretty fast if the oldest one is interested enough to do this. I'll keep reading along here and take notes of anyone's opinion.


Edit: I guess the key is - what math or logic is a 12 year old supposed to know?
« Last Edit: March 18, 2024, 01:36:39 am by xrunner »
I told my friends I could teach them to be funny, but they all just laughed at me.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14695
  • Country: fr
Re: Teaching coding to a 12 year old
« Reply #5 on: March 18, 2024, 01:43:48 am »
I dunno, NVIdia's CEO said that kids should stop learning to code. :popcorn:
 

Offline xrunnerTopic starter

  • Super Contributor
  • ***
  • Posts: 7558
  • Country: us
  • hp>Agilent>Keysight>???
Re: Teaching coding to a 12 year old
« Reply #6 on: March 18, 2024, 01:45:04 am »
I dunno, NVIdia's CEO said that kids should stop learning to code. :popcorn:

Oh my goodness. Why - becasue of the AI onslaught?  :-DD
I told my friends I could teach them to be funny, but they all just laughed at me.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11385
  • Country: us
    • Personal site
Re: Teaching coding to a 12 year old
« Reply #7 on: March 18, 2024, 01:49:42 am »
No, he is rich enough that he is in the stage where he says random nonsense and people spread it around. His opinion on stuff is largely irrelevant unless you hold NVDA stock.
Alex
 
The following users thanked this post: woody

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1261
  • Country: pl
Re: Teaching coding to a 12 year old
« Reply #8 on: March 18, 2024, 01:55:35 am »
As a 12 year old I dreamed of Lego Technic 8485. In my imagination it was capable of much more it really could do, but the gist of it was the ability to make the machine act on its own. That comes from a kid, who not only was terrified of computers, but just a bit earlier almost burst into tears after closing Program Manager in Windows 3.x. I was terrified I broke the computer and my mother will have to pay for it.

I believe that some kind of interaction between code and the physical reality is a great way to make a person interested in programming. This also opens much more opportunities for practical(1) uses and that means: motivation.

If only you can provide that kind of interaction, which the Arduino board itself isn’t providing, then I’d say it’s a great idea. Otherwise I would agree with ataradov and JoeyG, as merely running the code on a separate device isn’t more attractive, while being more expensive and prone to error.

In either case Scratch is something I see as a useful introduction tool and — later — a way to quickly check ideas.


(1) Note that for a kid “practical” has a very different meaning than for an adult.
People imagine AI as T1000. What we got so far is glorified T9.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21873
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Teaching coding to a 12 year old
« Reply #9 on: March 18, 2024, 03:27:11 am »
I would recommend Python: easy to use, comfortable syntax (the most common gripe / meme is about indenting, I'd say that's a good compromise versus C's arcane symbology, for example..!), rich libraries, you can do anything on a modern OS without a lot of work, granted the performance might not be there, but what are you doing that needs it, and when you do, probably someone's got a library for that already, too.

Arduino, a good embedded introduction, sure.  If they're inclined to work with things more hands-on, that's a way to introduce a lot of that from a programming angle.

Javascript, web dev in general: the nuts and bolts of the visible internet.  Trivially easy to get into: you're looking at it right now.  Show off the capabilities of any desktop browser's dev tools (F12 button usually), and where to get docs (MDN usually).  A rather dive-into-the-deep-end to work with DOM and lambdas and all those modern language features that JS contains, but introductions can be structured to ease into that, perhaps following a book or course, perhaps just by looking at stuff.  Upsides are it's very discoverable, not like functions have doc attached in the browser (that said, there's probably a plugin for that?), but you can interrogate the properties of any object in real time, and so for example enumerate all the functions (methods) window or Math or Number or etc. have, and look them up separately, and see how to use them right there.  Python of course much the same way, when in interactive mode.

I probably started playing with QBASIC when I was... 10 ish?  Computer language seems age appropriate, and, anything will do, as long as it's easy enough to make and modify catchy demos on.  I'd have likely found these languages much more interesting, certainly more powerful, but also easier to use; there are so many weird quirks and limitations of something like BASIC, who knows what kind of problems I was having with it at the time (but, the online help was mostly pretty good, without which I'd have been hopelessly lost!).

I wonder where Python was all these years... I've looked up hardly any history on it, and only started hearing about it myself ca. college age.  It feels much newer than its introduction date of 1991(!) feels.  Was there actually a DOS version of it?  ...Was it any good back then?

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4109
  • Country: nz
Re: Teaching coding to a 12 year old
« Reply #10 on: March 18, 2024, 09:18:38 am »
I'm on the side that says Arduino is a great way to start.

Just like writing code for the PC, you can do terminal-based printf() and input, so you don't lose anything there. Except line by line debugging. I think printf is better anyway :p

But Arduino has the huge advantage that you can easily write programs that interact with the real world. Switches, temperature and light and other sensors, LEDs, motors, servos are all cheap and easily available. Even a full-sized Uno can be strapped onto a buggy or robot and control it, and of course there are much smaller but compatible boards that are even better for that.

If you're NOT going to do the real-world interaction then there is indeed little point to Arduino -- unless they get advanced enough to ditch the C++ and the library and do bare-metal assembly language programming. In which case the AVR is again one of the very best choices to get started on.

Writing web-based things using HTML and JavaScript is also an excellent way to get started.  Kids can immediately build something comparable to (simpler, of course) things they use online every day. And they can publish their creations and send URLs to their friends! And it will work on everyone's phones as well as their PCs. There are any number of places you can get cheap or free web hosting.

Simple example:

https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_length_converter_feet_to_meters

But the sky is the limit. You can display images and animate them. You can make drawing and painting applications. You can make complete PC / Apple / C64 etc emulators in a web page.

That's also the option that today leads most easily to $$ jobs.
« Last Edit: March 18, 2024, 10:04:33 am by brucehoult »
 
The following users thanked this post: xrunner

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6456
  • Country: fi
    • My home page and email address
Re: Teaching coding to a 12 year old
« Reply #11 on: March 18, 2024, 09:54:49 am »
My own suggestion would heavily depend on what else the 12-year old is interested in.
Aside from specific interests, if they are communications-oriented, I might suggest going the HTML+Javascript and Python/PHP backend programming route; if visually oriented, perhaps Python+Qt (applications) or SDL2 (games); if technically or mechanically oriented, Arduino + servos; if mathematically or physics-oriented, C or C++ and simulators; and so on.

I would not bother with simplified stuff (visual programming languages), but start with the actual stuff, just scaled to keep interest and motivation high with suitably paced rewards.  When I was that age, I was given a copy of Borland Turbo Pascal without any manuals or anything, with nothing related in the local library, and only limited and slow BBS modem access, and learned on my own.  Granted, with only three TV channels and no smartphones, and no stores selling games within a hundred miles, I had plenty of time.  I was ecstatic to find Ralf Brown's Interrupt List at a BBS.

Do not underestimate what a well-motivated 12-year old can do on their own.  If their interests have a natural intersection with any programming, math, or physics subfield, I'd use that as the source of motivation, and thus pick the approach based on that: show them how programming can be used as a tool for investigating and experimenting and creating that which they're interested in.
 
The following users thanked this post: nctnico, cfbsoftware

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10026
  • Country: nz
Re: Teaching coding to a 12 year old
« Reply #12 on: March 18, 2024, 11:09:39 am »
My own suggestion would heavily depend on what else the 12-year old is interested in.

+1 to this.

It has to be fun, so will depend on what they find fun to build using coding.
Maybe try a few approaches and see what they enjoy the most   
- Hardware buttons/switches/displays that do things.
- Windows app that implements some super simple graphical stuff that can be turned into a game.
- Code that makes simple sounds
etc
Greek letter 'Psi' (not Pounds per Square Inch)
 

Online Picuino

  • Frequent Contributor
  • **
  • Posts: 995
  • Country: 00
    • Picuino web
Re: Teaching coding to a 12 year old
« Reply #13 on: March 18, 2024, 01:22:00 pm »
Scratch is a very popular choice. It is primarily for programming PCs but can be connected to hardware boards such as Makey Makey, micro:bit or Lego robots (Mindstorms, WeDo...).
 

Online Picuino

  • Frequent Contributor
  • **
  • Posts: 995
  • Country: 00
    • Picuino web
Re: Teaching coding to a 12 year old
« Reply #14 on: March 18, 2024, 01:25:44 pm »
Another choice for beginners is code.org

List of code.org activities in my website: https://www.picuino.com/en/prog-codeorg.html
 
The following users thanked this post: xrunner

Offline onsokumaru

  • Contributor
  • Posts: 10
  • Country: es
Re: Teaching coding to a 12 year old
« Reply #15 on: March 18, 2024, 01:58:32 pm »
If you want programming and also interaction with hardware (motors sensors etc), M5 stack is a good option. Their bricks are based on esp32 and you can program them in UIFLOW (scratch like block programming), or in micropython, or using the arduino ide. 
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6456
  • Country: fi
    • My home page and email address
Re: Teaching coding to a 12 year old
« Reply #16 on: March 18, 2024, 02:05:22 pm »
I wonder if Godot might be a suitable start for some.

The first 2D game tutorial seems thorough but simple enough for a motivated young learner, giving a concise but realistic intuitive picture of what game development generally requires.  The necessary assets (artwork and music) and even source code are provided, but the tutorial goes through it step by step.
 

Online kripton2035

  • Super Contributor
  • ***
  • Posts: 2627
  • Country: fr
    • kripton2035 schematics repository
Re: Teaching coding to a 12 year old
« Reply #17 on: March 18, 2024, 02:39:07 pm »
+1 for scratch. then once mastered, go to the arduino and c++ or micropython
c++ is more challenging to understand than scratch.
« Last Edit: March 18, 2024, 11:00:08 pm by kripton2035 »
 

Online Picuino

  • Frequent Contributor
  • **
  • Posts: 995
  • Country: 00
    • Picuino web
Re: Teaching coding to a 12 year old
« Reply #18 on: March 18, 2024, 03:54:20 pm »
Scratch is not just another language for block programming.
Scratch is developed by the MIT Media Lab (directed by Mitchel Resnick) specifically to teach programming to children as young as 8 years old.
This MIT lab is the same lab where Seymour Papert, who developed the robot turtle and the educational language LOGO, worked. Papert, an advanced disciple of the famous psychologist Piaget, is the creator of the learning theory known as Constructionism.
Scratch is not a commercial product, is the result of a very extensive background of experience in research and teaching programming to children.

https://en.wikipedia.org/wiki/Scratch_(programming_language)
https://en.wikipedia.org/wiki/MIT_Media_Lab
https://en.wikipedia.org/wiki/Mitchel_Resnick
https://en.wikipedia.org/wiki/Seymour_Papert
https://en.wikipedia.org/wiki/Constructionism_(learning_theory)
https://en.wikipedia.org/wiki/Logo_(programming_language)
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19846
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Teaching coding to a 12 year old
« Reply #19 on: March 18, 2024, 04:12:10 pm »
I am not a teacher so I do not know the best way, but it seems like a good idea to me. What do you all think?
...
Edit: I guess the key is - what math or logic is a 12 year old supposed to know?

There is - and can never be - a single best way. There are many ways that might work. The trick is to find a simple concept that can be implemented quickly and easily, but which can also be extended indefinitely. Once upon a time, I would have suggested a traffic light controller, extended to have sensors, pedestrians, etc.

What to do, specifically? Easy... Find out what interests the child, and do something related to that.

What math and logic should they know? Easy.. It doesn't matter - yet. Start simple, and use that as a means of introducing concepts as necessary.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8837
  • Country: gb
Re: Teaching coding to a 12 year old
« Reply #20 on: March 18, 2024, 04:26:32 pm »
I taught myself to program in Fortran II in the 1960s, when I was about 12 or 13 and had no access to an actual computer to run anything on. A bit later, I got limited access to run some things on a Honeywell machine at a local Polytechnic. I had learned enough in isolation that getting code to run on a real machine was pretty easy for me.

Today its really easy to get started. Almost everyone has access to a PC, and compilers can be installed for free. Just pick a language, and get a child started producing simple command line programs for a PC. If they take to that, you can start to introduce more things. like GUI development or embedded hardware. Don't start out with complexity.
 

Offline xrunnerTopic starter

  • Super Contributor
  • ***
  • Posts: 7558
  • Country: us
  • hp>Agilent>Keysight>???
Re: Teaching coding to a 12 year old
« Reply #21 on: March 18, 2024, 10:52:30 pm »
I did read all the advice and I thank you all for that. I will consider all the options presented. I will let you know if I get the chance to do this tutoring.

 :-+
I told my friends I could teach them to be funny, but they all just laughed at me.
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 19846
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Teaching coding to a 12 year old
« Reply #22 on: March 19, 2024, 12:50:15 am »
Another possibility: what is Lego offering nowadays?

Mindstorms used to be a good starting point, but ISTR they don't do it anymore.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline shabaz

  • Regular Contributor
  • *
  • Posts: 207
Re: Teaching coding to a 12 year old
« Reply #23 on: March 19, 2024, 02:46:47 am »
I've not seen what Lego has to offer, but it could be a good option. There is a raspberrypi.com 'Build HAT' (motor control) too (no idea if it's any good), if kids outgrow any official Lego controller.

Fishertechnik's app is neat. I got a kit called "Robotics BT Beginner (540587)" for my nephews. The programmability comes via flow charts, which they take to very easily (perhaps easier to use than 'Scratch', but children learn that at school with Micro:Bit, according a friend with a young kid). Learning flow charts could give them a great head-start in general.

The Fischertechnik kit is expensive (200 GBP or so) but reasonably fun (although hard to use for 8-year-olds and under, because the plastic pieces can be stiff to join/disassemble).

For coding on PC, some kids are interested in games, and there is a "Invent your own computer games with Python" book, it's not bad. There's also a very bright Usborne "Coding for Beginners using Python" book which is very good. I also tried "Coding for Kids Python" but that one is not good, it's written in a way that kids will not connect with, maybe adults would.
 

Offline bitwelder

  • Frequent Contributor
  • **
  • Posts: 969
  • Country: fi
Re: Teaching coding to a 12 year old
« Reply #24 on: March 19, 2024, 10:11:49 am »
Before going into the choice of which platform, programming language, etc. I would rather first introduce in general to the 12 y.o. what coding is and does and then try to find some problem that s/he would be interested in solving with the programming.
If there is a practical motivation to solve a problem or to create something specific, it will be easier to tackle the techical aspects of the programming.
Based on the answers then one can think if it's more suitable start with an Arduino environment, or developing something on a computer, etc.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf