82 points · by evolve2k · 7y ago · 86 comments
I have experience in ruby and react and currently work as a Digital Media Designer.
What resources would you suggest? A. As a curriculum To run a small code club with them and a friend or two with homework in between
B. Self directed online resources they can use to level up themselves?
I’ve always loved ruby but am aware that JS is king and also want them to have exposure to functional languages also.
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.
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.
> 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.
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.
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.
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.
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.
This by far beats the maze games I would program in basic back in the 80s.
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"
One of the programs we run at work is an online 5 week competition where you learn to code (either with Blocky or Python) at the same time. It's called the NCSS Challenge http://ncss.edu.au/challenge . It's aimed at Australian students, but you can give it a go from anywhere in the world.
Teachers often run the Challenge in their classes and we have had a few code clubs run it too. It works really well having a group of kids be able to compete and encourage each other to solve problems.
There are multiple levels, but it increases in difficulty each week at a challenging but achievable rate. At the hardest levels it gets quite competitive with students making programs to compete at playing games (last year was Big2) against each other.
I'd recommend clicking the "Try demo" button at the bottom of http://ncss.edu.au/challenge . Even if you don't sign up, you can get an idea of what kind of problems we see kids getting hooked by. I think there's a lot you could "steal" in terms of how to pose interesting yet simple and informative problems for teenagers to solve.
It's also a really great learning community, thanks to their "remix" feature (like forking on GitHub).
I don't recall learning much, but I was at an age where I was more concerned with getting Nario to jump over a bucket than with actually learning. I likely did learn something, maybe even just a passion for sitting in front of a computer and making it do cool things. I'm sure I also learned that if you really want something, just put in the hours and jfgid. For me though, the operative part was games. I wanted to play games and at some level, I wanted to learn how other people built amazing games for my Tandy.
The point of all that (other than 7:30am nostalgia) is that, for me at least, I had to be motivated. I had to want the end result enough to push through the grueling bullshit of it all. To this day, I believe that the only way to learn to code is to fall in love with a project to such an extent that you can't stop yourself. Whether that's a good lesson for teenagers will have to wait...my kid is only three, so I have a decade of self doubt to interfere. :)
This is why, I think, we see people "coding" in Minecraft and Roblox. They have all of the environment set up for them and can do cool stuff which they can immediately appreciate.
Thanks for the comment and helping my memories! This has been a great thread.
Minecraft uses javascript on Bedrock, but also has a command block scripting language along with redstone, which together form a unique and mentally stimulating coding environment.
This isn't even mentioning mods which add different languages (Forth or Lua) or modding the game itself, which isn't that difficult to stumble into these days.
I kind of have a problem with training people to "code" rather than teaching computer science; feels sorta like comparing a "wine and painting night" to a course in oil painting, in that you might shortcut to something acceptable-looking but with little understanding of how or why you did it. But they're kids and will probably quickly tune out during Dad Explains Linked Lists :)
Ideally I'd suggest starting off with some smaller guided exercises to get them familiar with the language, then work with them to spec out and implement a more interesting project. In my CS courses in college we implemented the minimax algorithm for tic-tac-toe and checkers, starting with a tic-tac-toe engine which just printed out its desired move and evolving along until we were displaying a checkerboard as it played along. Could be a good project for you since it's implementing something they're familiar with (board games), doesn't use anything weird like networking, and can introduce concepts such as recursion and complexity ("if we have it calculate the next move, how many possible moves are there? What if we calculate the next two moves? The next three?")
We had a test where I ended up finishing in about 10 minutes. The second person to finish took 30 minutes +. In hindsight I should have went slower because it was obvious no one could have finished as fast as I had.
After the class was dismissed the teacher obviously asked me to stay after class and asked me if I had downloaded all the formulas I had used.
I explained that I did not download/transfer from someone and that I had programmed the calculator to do it for me.
Teacher called me out (probably not believing it) and asked me to program the volume of a cylinder.
Took about 10 minutes to write it up quick, showed it worked and rather than reprimand me the teacher did something amazing.
She said something along the lines of, "If you understand the formula enough to write a program to do it for you, that shows you understand it at a higher level. Rather than punish you, I will still give you a 100% and you are allowed to use your calculator for the remainder of the class as long as you do not share your program(s) with anyone else."
I never had many friends (loner nerd type) so that was easy and it was the easiest 100% I had ever gotten.
Getting them directly into programming directly will likely be the wrong attempt, because (in my opinion) programming requires a lot of frustration tolerance and if done the wrong way will spoil it for them. Also combining an existing interest with development, such as using their painted characters in a game might create interest in content creation.
In our Game Design BA, we also give a summer school course for kids (12-18 years), that teaches them to develop a game in GameMaker during 2 weeks. Other visual development systems such as GameMaker might be good as well. Afaik lego also has a visual programming system for it's mindstorms system.
If you you insist on classical programming languages i'd suggest python with some ui based libraries (for example pygame, not because of gaming, but because of graphics, sound and interaction aspects) or processing.
I also consider gaming as an important aspect of learning. But the game has to change often, othervise it's just enjoyment to get perfect in a system that you already mostly understand. I usually reach this point after 2 to 8h in a game, because i want to understand the logic of the game. If you enjoy the story, you have to go trough the whole game usually. To reflect on the things you played and experienced is good to learn as well, but usually spoils the fun. There are a lot of games that teach logic thinking and often contain logical structures systems or train logic thinking. (minesweeper, sudoku, kerbal space programm, bridge builder games, lots of construction games (minecraft)...)
I learned programming from doing C, and man am I glad I did. I thinm if my first language had been something like JS it would have been a major impediment.
Also, learning programming was applied autodidactics for most of us, isn't it? My feeling is that this is the only really working way of learning programming (have worked 10y in university, teaching programming: Doesn't work well).
It really depends on your kids and on your relationship to them. Maybe you should present them a vast amount of programmable devices and interfaces to explore together interesting projects.
At best they will end up with something not much more than a static website that can accept image uploads. Forget about live video, stories and the stuff people actually use on IG.
I think a simple game would be better. Easier to see results early on, at which point you can dive deeper into the mechanics of what's happening.
The nice thing about Beaker is:
* They can write dynamic apps without needing to write server code. (We are working on note-taking apps and home pages that save to the file system.)
* They can share their stuff and link to each other without needing to publish anywhere. This also makes it a kind of private network, so it feels like a safe place to make mistakes.
* Has a built-in text editor and file manager. Eventually they will learn more - but let’s start with just the HTML, CSS and JS - that’s already a lot to take on.
* Concept of versioning is built-in, so hopefully this will make it easier to teach source control.
Other good tools that I have enjoyed using to teach elementary-age kids: Twine is amazing. And Scratch (as well as Scratch Jr on touch devices) are good preparation.
To determine interest level, I like to have them watch over my shoulder while I build something small for five or ten minutes. (Don’t go too long.) I start by just showing how HTML tags work. This will excite many of them - they may even start to conjure up ideas right away - if it doesn’t excite them, then perhaps the interest isn’t there. (Or they might not understand something like HTML yet and need something simpler.)
Attempts before with Scratch weren't too successful, but once the Why was there, setting up Eclipse and all kinds of silly things Java makes you do weren't a lasting obstacle.
In the past year I've witnessed:
Student run AR / VR clubs producing award winning interactive digital content
OS development in Rust for a robotics competition
Computational cinematography for programmable drone swarms to produce short form content for a YouTube channel
Functional design in CAD of a Martian habitat
CV object recognition and tracking app using Core ML
And an automated burrito making machine!
VR edtech content is particularly effective in classroom settings, with near 100% interaction rates. I'd say producing 3D VR / AR content is probably the skill they are most anxious to acquire. And it involves not just getting Oculus type hardware into classrooms and training instructors. But also Blender skills, narrative voice for the new medium, and thinking about localization for global distribution. There's no downside to being able to express one's embodied teenage reality in an immersive imagined world.
That said, I don’t think music education is a good analogy, unless you’re working at Guitar Center. I’d say it’s more like learning Spanish, if you want to be a food service manager. It’s not your job to speak nor write in Spanish for Spanish speakers, but it’s damn useful.
So what I’m saying is you don’t have to become a programmer to realize the value of doing a data analysis task in a fraction of the time it takes in Excel. Especially how business likes to pile on work (now you have one more thing to do every week) in a way that design and project-based work does not.
I think for a language, Javascript is a great choice. It's convenient because it can be used in the browser, or CLI / server with Node. It has powerful and user-friendly tools for debugging and profiling. NPM has a wealth of libraries for graphics, robotics, machine learning, and pretty much anything else you might want.
For functional programming, with interoperability with Javascript, there's Elm: https://elm-lang.org/
Programming isn't just about web apps and mobile games, so teach them how to build simple projects. Their eyes will open up to all the things computers control all around them. That way they get to decide what they like, hardware, software, both, neither.
Therefore I would go for Processing, which is a kind of Java. Or even the online version https://p5js.org/ which integrates the HTML DOM.
And ofcourse follow The Coding Train with Daniel Shiffman. Fun to watch and he has video's for starters and experienced coders.
so start by finding a project. even better if they find the project on their own...
I think trust is also important. So if you can do a collaborative project where you do your bits and they do their bits then it should all work out.
Then you need some imagination. To think of a project. It should satisfy a personal itch. Or a neighbour's problem.
A good breakdown of roles is for adult person to do some hardware, even if the computer interface is just a switch and a relay and then the computer bits can be done by the young person.
I would say that listening is important, particularly if you want the young person to be owning the project.
First, I’d say data storage and retrieval. I created my first DB on a Macintosh and FileMaker. Super useful. I still use a DB I started 20 years ago filled with every book I read. Make a project for quickly designing a database and using it. Someday they'll find a use for the skill.
Second, flip the script. Instead of cool projects, teach them what computers are great at. I think algorithms and models/simulations are really on-point. Team that up with learning Jupiter Notebooks, wow.
Finally, maybe you could teach them strategies on how to learn, and mix some computing solutions into it. Audit some Coursera or Edx classes. I recommend Charles Severance [1] and the Guttag and Grimson [2]. The whole course may be over their head, but there are a few really accessible lessons that are super interesting.
Good luck. Whatever it takes.
[1]: https://www.coursera.org/learn/python-network-data
[2]: https://www.edx.org/course/introduction-to-computer-science-...
For me gaming led to wanting to mod the games, which led me learning how mods were created and learning to 'break' the game.
I am not affiliated with them however I did stumble across a DApp programming 'game'
If they like the above at that point I would direct them to other programming languages.
http://timothypratley.github.io/power-turtle/ (try in browser)
Teaching programming fundamentals via game projects. Things mostly from scratch, no engines.
If they aren't interested in video games, it might be harder to sell programming as a hobby. I guess there is something a bit more magical to "hey, I managed to make this cube move when you press the joystick, and then when you press A it jumps" vs "hey, I have a sign-in form for my app".
The instructor Daniel Shiffman explains coding from the ground up and is easy to follow along. The kids can use the web based editor http://editor.p5js.org/ and all you need is a browser. This is usable from a tablet but using any laptop or desktop will provide a better experience.
Start with the playlist Coding with P5.js https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tM...
This channel starts with the basics and goes all the way to machine learning !!!
This idea is biased to my own experience.
The benefit of this approach is that it teaches that computer science on its own is great. If you add an understanding of science and math, it can be even more powerful.
I think working with numbers is something programming "snaps to" easily.
The weakness of this approach is that anyone who thinks they're weak at math or logical thinking ends up possibly feeling left out.
For example:
- if Mario touches an enemy, he should loose a life
- if Mario has a power up active he should go back to original form
- implement Mario's jump
- implement Mario's movement
- make it inertial
- implement gravity
- implement momentum
- etc..
In this case, your kids should learn the language that teaches them CS at meaningful and deep level, so that they can see what is the soul of programming. You would need Scheme language, the text being one by Friedman (sorry, not a fan of Wizard book for the reason that it is very MIT-centric and elitist in that sense).
Once they know enough CS and Scheme to find their way in the map of programming (in the scheme of things, pun intended), then I suggest at least two programming languages that differ from each other in how they solve problems and what kinds of problems. One of these is without doubt Python, because it is connected to all sorts of fine things like web dev, AI, general purpose programming etc, and is programmer-friendly enough to not cause mild and chronic masochistic psychosis like certain languages (not naming names, because this is highly subjective).
After your kids are experts in Python, they should learn Javascript because of its utility, but also how different it is from Python. These two languages for operational, utilitarian purposes that also nicely supplement what they did with Scheme.
Once they have a good grasp of Py and Js, they should build proficiency in Haskell so that they can appreciate programming from a completely different angle; Haskell is going to be more useful later, so it has more than just didactic value.
After Haskell, some Julia for computational programming would be nice, since Julia does things efficiently and differently.
At last, they should also master C, for historical and low access purposes (and to not to fail "can you C" question).
With these languages under the belt, and the basics of CS1, they should move on to CS2, and try real world programming. John Zelle's book teaching Python and C++ for a second course in programming is very nice.
Then have a search on places like 8bs.com and download some of the "type your own xxx xxx game" books, or have a look for "Marshall Cavendish input magazine" if you search around you can find all 52 issues as pdfs.
Have the kids work through the books, and the practical exercises in the magazines.
In the 1980s and 1990s this produced some of the best UK developers and coders around, and inspired an entire generation to write their own softwate, to explore the machine, to tinker about under the hood with things like assembler language, and really understand what's happening inside.
Once they grasp that, change the config of the rPIs and install desktop c, get them writing desktop software and designing guis for their apps so they start to learn high level languages, and how they relate to the low level, use your skills to teach them how users will interact with their gui.
When they start mastering that, jump up higher, compiled vs interpreted, script languages, presentation languages (such as html).
It never did me any harm, I make a pretty good living, I'm an 80s back bedroom developer and proud of it.
Before I submit this though, I know there are going to be many who will cry "we don't need low level knowledge anymore", "what on earth do you want assembler for" or "you old hippy grey beard, bigger off and leave us kids alone", to which I say.....
Trust your gut, it's not about learning assembler, or low level, it's about encouraging exploration, it's about getting them to discover how fascinating the journey they are about to embark on, and not just cramming their minds with syntax and turning them into code monkeys.
Even now, nearly 40 years later, I still love what I do, I'm not afraid to take the lid off windows/linux/macos and break things, because you learn so much more when you learn how to fix your screw ups.
Good developers are born out of passion for what they do, not from nessecity or a sense of future preperation.
Those might be mundane coding examples for teenagers, but it taught me the basics of logic.
Functions is one thing I wish I had learned about a lot earlier than I did. Also how to commenting out lines of code, rather than deleting them. And how to use the debugger. These are no-brainier concepts now, but I was 10-years-old and self learning from books with some guidance from my dad and brother.
I can say from my memory:
I received computer in 1999, on my ~10 birthday.
I don't remember if I had big drive for learning programming, but my mom found me a programming course for kids.
It was once a week for two hours?
We used Visual Basic For Applications (because it was present in every office install)
We mostly did simple cli-like applications, composed of strings of input and message boxes, i.e. quizzes, simple calculators, poem generators, maybe even simple interactive fiction? It took as a year to go through all of the basic primitives.
Later we used form-designer and made simple games with the Timer object.
I liked it :)
Then python. Though keeping that interesting for kids is going to be a challenge I think. Maybe if they can control some sort of LCD array or a motor or robot of sorts?
C and assembly are fundamental. If you want to get fancy: Rust, and https://ispc.github.io/
Ghidra is a good learning tool. Use it to decompile executables back to C, and to look at the assembly.
It requires a little hardware but I think that is what makes it more fun!
B. Leveling up will happen naturally when they see a problem and want a solution for it.
I would probably play to their interests with projects that are more concrete than abstract. If they are into video games, lots of games have mod languages and they can start by giving themselves more health, more power, different weapons etc. If they are into social media maybe javascriptlets to edit the DOM on a website to change peoples tweets and take a screenshot, twitter or insta bot that automatically responds to certain types of posts, etc.
Teenagers should be able to grasp non-toy languages and the concept of searching StackOverflow for how to do stuff :)
It's not my favorite either, but you'll probably get better traction in Python. Everything from Arduino to algo trading runs in Python. JS if they really like in-browser, but that's it.
The only challenge/disappointment vs. BBC Basic is that you need additional modules (and complexity) to output any sort of graphics; if this is of particular interest, I would highly recommend checking out processing [1].
Today, I would start by playing a bit with the browser developer tools, and then move straight to shadertoy to produce cool opengl demos.
Step 2) You'll want to check out these videos and pass them along as you feel they are appropriate: John Cleese on creativity: https://www.youtube.com/watch?v=Pb5oIIPO62g
Philip Wadler on the beginnings of computer science: https://www.youtube.com/watch?v=2PJ_DbKGFUA
Rich Hickey's Simple Made Easy: https://www.infoq.com/presentations/Simple-Made-Easy/
Types and why you should care: https://www.youtube.com/watch?v=0arFPIQatCU
80-20 rule and software: https://www.youtube.com/watch?v=zXRxsRgLRZ4
Jonathan Blow complains about software: https://www.youtube.com/watch?v=k56wra39lwA
I've got a list of videos and other links that is much longer than this. Start paying attention and building your own list. Pass on the links as they become relevant to things your kids encounter.
Step 3) I spent a decade learning effectively every programming language (at some point new languages just become a set of language features that you haven't seen batched together before, but don't otherwise add anything new). You can take it from me, all the programming languages suck. The good news is, though, that you can find a language that clicks well with the way you think about things and approach problem solving. The language that works for you might not work for your kids. Here's a list to try iterating through: Some Dynamic Scripting (Lua, Python, Javascript, etc); Some Lisp (Common Lisp, Racket, Clojure); C; Some Stack (Forth, Factor); Some Array (R, J, APL); Some Down To Earth Functional (Ocaml, ReasonML, F#); Some Academic Functional (Idris, Haskell, F*); C#; Go; Rust
Step 4) Listen to everyone, but remember that software development is on pretty tenuous ground right now. We've been building bridges for thousands of years, but the math for CS has only been around for about 100 years and we've only been doing programming and software development for decades at most. Everyone who is successful will have some good ideas, but there will be an endless list of edge cases where their ideas are worthless at best. Help your kids take the ideas that work for them and not get hung up on ideas that cause them to get lost and frustrated.
In this case, your kids should learn the language that teaches them CS at meaningful and deep level, so that they can see what is the soul of programming. You would need Scheme language, the text being one by Friedman (sorry, not a fan of Wizard book for the reason that it is very MIT-centric and elitist in that sense).
Once they know enough CS and Scheme to find their way in the map of programming (in the scheme of things, pun intended), then I suggest at least two programming languages that differ from each other in how they solve problems and what kinds of problems. One of these is without doubt Python, because it is connected to all sorts of fine things like web dev, AI, general purpose programming etc, and is programmer-friendly enough to not cause mild and chronic masochistic psychosis like certain languages (not naming names, because this is highly subjective).
After your kids are experts in Python, they should learn Javascript because of its utility, but also how different it is from Python. These two languages for operational, utilitarian purposes that also nicely supplement what they did with Scheme.
Once they have a good grasp of Py and Js, they should build proficiency in Haskell so that they can appreciate programming from a completely different angle; Haskell is going to be more useful later, so it has more than just didactic value.
After Haskell, some Julia for computational programming would be nice, since Julia does things efficiently and differently.
At last, they should also master C, for historical and low access purposes (and to not to fail "can you C" question).
With these languages under the belt, and the basics of CS1, they should move on to CS2, and try real world programming. John Zelle's book teaching Python and C++ for a second course in programming is very nice.
Post that, it would make sense to become mathematically involved in programming. For instance learning enough good mathematics to understand concrete mathematics for CS by Knuth et al. The best book to do that is the Rozov, Potapov, Dorofeeov text called "elementary mathematics" which was written in 80's when people when authors had very high IQs.
After they finish the Knuth Concrete Mathematics, they could develop real-world software to further hone their skills and decide what to learn next.
The most important thing however, is to let your kids gravitate towards it if they feel like it. I used to hate Piano, but not because I disliked piano per se, but because I had a bad teacher and it appeared harder than it actually was. So make sure your kids like it, but if they dislike it, it could also be due to factor x (some other reason other than sheer dislike).
Finally, good luck and hope my humble opinion has not offended anyone here.