4 ms·
Agreed that they should show an interest before you embark on this. Finding joy in general education is more important than job skills for that age. That said,
by smt88 7y ago
Agreed that they should show an interest before you embark on this. Finding joy in general education is more important than job skills for that age.
That said, Ruby and JS are not great languages for teaching fundamentals. They (especially JS) have a lot of weird design decisions that don't translate to other languages and don't map neatly onto problem spaces.
If you insist on JS, start with TypeScript at least. But maybe D, Kotlin, Go, or Dart would be better to teach general concepts.
Python would be a good add-on because they could actually use it to write quick utility scripts and, eventually, data analysis.
Instead of linear programming exercises, it may be easier to find problems they find interesting and help them Google their way through solving them. Maybe they have some tedious homework they could learn to automate.
The problem you'll find is that kids don't do much work, so programming (i.e. making a computer do work for you) isn't necessarily that exciting yet.
- lkCbdBclE 7y agoWhen first learning it's more enjoyable to see an idea translate quickly to reality. JS is great for that purpose. It's very easy to make animations and other fun effects in the DOM or build an extension on top of their favorite site. Once invested they might start research and discover CS fundamentals. Immediately throwing them at typescript without understanding JS could lead to frustration/confusion. They also might learn an appreciation for things like type safety by not having them. For that reason dynamic languages like Ruby /Python are great. They can execute an idea faster, and if they get frustrated by those types of issues then introducing them to those other languages. Kotlin is cool, but it makes a lot more sense if you have had to deal with null pointer errors before.
- stevewodil 7y agoI finally learned Javascript after hating two compsci classes that used Java. I really like Javascript or Python for beginners, I think other languages are too strict and are not "fun" to learn for beginners
- smt88 7y agoJava's strictness used to be tedious and redundant. Don't assume all strict languages work like Java. Type inference in Kotlin, for example, is fantastic. Strictness with good error messages is much better for beginners. That's why I use the strictest possible language in professional work: if the compiler can do a bunch of work for you, why not let it? Strictness is like bumper lanes or training wheels.
- smt88 7y agoIt's easier to use Kotlin to make fun animations than JavaScript, because Kotlin has better autocomplete. The DOM is neither the only (nor the easiest) presentation layer when you want quick results. > Immediately throwing them at typescript without understanding JS could lead to frustration/confusion. I don't understand why you think this would be the case. They could write plain JavaScript in a .ts file and get better error messages. There's no downside. It's also frustrating to constantly have to check docs for JS libs instead of using autocomplete. A good static type system makes coding much faster and require less memorization of things like parameter order or return types in libraries.
- noxToken 7y ago>Agreed that they should show an interest before you embark on this. Finding joy in general education is more important than job skills for that age. Thank you for including this in your comment. So many people are trying to force programming down kids' throats when the child may not even have an interest in it. Programming is the future! Everyone needs to know how to code! Nearly everyone can write some piece of code for use in their every day life to make it easier! I disagree. Code is good for kids who have an interest in it, because after so many months of not doing it, the kids that didn't refresh the knowledge will be nearly at square one.
- duxup 7y ago>They (especially JS) have a lot of weird design decisions that don't translate to other languages and don't map neatly onto problem spaces. As someone who started with JS, I feel like this is a valid point, but also ... not really a big hurdle to overcome later down the line. It's one of those things that is really apparent when comparing languages, but I'm not sure matters as far as learning goes. No doubt someone has run into someone who can't do anything outside JS, but I'm not sure that is all that common. I feel like if you're at all capable, it's almost no hurdle, and the benefits of being easy to start, can do some front and back end work, are pretty big.
- dahart 7y agoVery much agree on kids showing interest. I didn’t even have much choice, when my kids weren’t interested, they wouldn’t do it. Now that they’re interested, they’re self-motivated, exploring and begging me to help them. As far as language choice goes, I’ve tried to teach my son Python and a couple other languages, but he’s not that interested. He’s choosing JS and is self-motivated to learn because he can share his creations with his friends super easily, and because he can edit JS files directly on his website that doesn’t need to run a back-end. That’s not really built-in to any other language. TypeScript is closest, of course, but for a kid the prerequisite of learning npm and a transpiler and installing them on a server are huge hurdles. Personally, having worked in Python, C++, and JavaScript professionally for a couple decades, I’m not in the least bit worried about my son learning JavaScript and being able to use what he learns in other contexts, not even a little. All languages have oddities, and IMO JS doesn’t have more than any other language, they’re just different. JS is really great for asynchronous thinking and quick to prototype interactive web pages and games.
- timje1 7y agoSeconding the idea of finding them problems that they can solve or things they can build that they find interesting. Programming to make their homework easier? Great. Programming a game they can show their friends, that lets them compete to get a high score? Great. Programming some interesting scripts into minecraft? Great. Programming to learn to how to reorder a red black tree? ="programming is boring"
- stronglikedan 7y agoI don't think waiting for obvious interest is a good idea. I believe in putting as much as possible in front of children as soon as you think they are ready. If they show interest in something, then foster that interest, but don't force them if they don't. I never had an interest in coding before it was put in front of me, and I know many others in the same boat.
- tmaly 7y agoI have been teaching my 5 year old daughter Scratch. But we make animated stories and add funny sounds. She has a blast doing it. I am gradually teaching her more complexity but keeping it fun and interesting. I will try to make a course out of it at some point. This by far beats the maze games I would program in basic back in the 80s.