loading...

How to teach programming to my 10 years old nephew?

github logo ・1 min read

Often my sister and her children come home during the weekend, and my nephew is always around to see what I'm up to. I asked him, "do you want to make your own game?" to which he replied "well, yeah, but I need to learn to code first". And then this question struck me "How do I teach him?".

twitter logo DISCUSS (19)
markdown guide
 

AFAIK it's generally accepted that early programming should teach underlying concepts while being greatly engaging. For me that was turtle programming in primary school. Of course we're not in the 90's anymore so cooler tools exist.

There are a variety of games and tools that teach programming concepts:
scratch.mit.edu/
store.steampowered.com/search/?sor...
mommypoppins.com/coding-kids-free-...

Since he wants to make a game, UE4's graph-based editor might be a good way to go too.

One thing I would personally be wary of is the apparent insistence on Von Neumann architecture/imperative programming, but to my knowledge there is not much you can do about that and, for the moment, it makes sense for video games anyway.

EDIT: totally forgot, modding is a great place to start as well.

 

Church! I mean, Alonzo Church. Yeah I also wish there were more resources to start kids with functional programming. The great thing about it is you can start rather simply (if presented that way), get a lot of value just from practicing immutability and referential transparency, and then later it surprises you with extremely reusable concepts based on provable math.

 

I'm starting to think provable math should be at the basis rather than something to discover later. Show that composition of effects is not fundamentally different than composition of numbers as by e.g. addition or multiplication. I think that might give people a far better understanding early on about the usefulness of functional programming.

I agree with this in general. However, it depends a lot on your target audience. Some audiences won’t survive a math based curriculum whereas they could survive a more procedural learning track, except with immutability and pure functions. Then later they can discover all this amazing reusability based on math goodness. Analogous to multiplication tables before algebra (before calculus).

Maybe, but I think our view of math has been characterized far too much by stuffy classroom mathematics. I myself only started liking math after university.

Your analogy with multiplication tables and algebra is a good one. Here too I might be inclined to argue that learning algebra first might be better. Algebra expresses meaning, learning multiplication tables is just caching results.

Both approaches probably have their place.

In my case, I am mentoring a middle school youth. She is smart, but I still don't think starting with category theory would be the right approach for our circumstance. Typing something and seeing it affect the screen is more likely to keep interest at this stage.

Functional programming could be great for either approach, but as you said, most of the learning resources are not geared for it. Which is unfortunate.

 

After attending a meetup yesterday about, among other things, teaching fp to children, I would like to add a few resources:

  • LOGO is still a great tool
  • fractals are a great visual way to learn about recursion
  • The book mindstorms by Seymour Papert, Lego's Mindstorms was based on this book
  • sonic pi

I haven't tried any of these myself, they're all recommendations from someone who knows way more about teaching than I do.

There's also code.world but that was recommended by someone else.

 

@drbearhands , another excellent resource to teach kids coding languages: codakid.com/kids-coding-languages/

You should add it to your list!

 

I'm gonna check those games since he likes games so much. Thanks.

 

@drbearhands , another excellent resource to teach kids coding languages: codakid.com/kids-coding-languages/

You should add it to your list!

 

I think a really fun way to teach programming will be to buy an Arduino starter kit. Comes with a set of LEDs, motors, resistors etc. and an extremely simple Programming interface. It helps to learn to code, and you get to physically see what you're code does (which feels amazing!) and also, you learn not just to code, but, have that fundamental understanding of what is happening when your code executes (transistors, resistors, inductors, diodes etc. but, this comes at an advanced user level)

 

For ten-year-olds, code.org/ is an awesome place to start. They have tutorials that are great. There are also coding games, like a ball you can program to move around in different ways or robots.

 

code.org looks pretty good. I'm gonna show him that. Thanks a lot!

 

I have a son the same age and I put a computer in his room that runs Linux and dual boots with Windows but I told him Windows is mainly for noobs so he shouldn't use it! >:)

Funnily enough, the thing that got him interested was the simple bash shell. "This is how you can learn to hack computers!" I created some fun aliases (cmatrix, lolcat) and mixed them in with some useful ones (netstat, ping, nmap) to show him all the devices connected to the network. I ended up explaining a lot more concepts to him than the last time I tried to teach him raw programming (loops, if statements). I also showed him how to create aliases, simple scripts, etc. The bonus is you can ask what they want to do and sudo apt install it instantly! That power of that alone blew his mind. I also showed him how to "mine bitcoin" (it was just Ethereum Classic but whatever... ;)

They have plenty of time to learn "real" programming, for now you have to give them quick bang for buck. Looking back on it, I think that it's best to just open some pathways to see what piques their interest, I mean learning traditional programming is pretty 80s right? There are so many areas in computing nowadays - networks, digital currency, security that might seem cooler to a 10 year old in 2018.

Oh, and make sure the computer is attached to a mechanical keyboard! My kid loved the feeling and just wanted an excuse to type out commands :)

 

This reminds me when I knew Linux for the first time. Knowing about the existence of Ubuntu in a magazine prompted me with the urge to install it and use it ASAP. But my father first told me that I have to learn bash before. Well, I learned it first with a live distro, then installed Ubuntu. Ten years later (and a lot of distro hopping) and I'm still using Linux.

 

The answer to How do I teach him? Is simply whatever gets him to stay at the keyboard, would be a good start.
For me it was exciting to learn BASIC by printing my name to the screen in a loop. I still feel that same excitement today when learning something new! This was on a commodore 64 sometime in the 80's.
Today, there's a lot more available. I gave my daughter (then 7) her own raspberry pi, she was super excited to learn about ping. Pingpath blew her mind.
Sometimes the smallest of concepts can awake very strong interests that can be a lifeline later on in life.

 

I know I'm a bit late to the party, but from first glimpses codecombat.com looked interesting, too. Pros and Cons as usual. Python and half-commercial/half-oss, but very nice graphics and a good gratification system. I did not go deeper, tho.

 

What my son liked was creating his own mobile phone game with scratch-like catrobat.

 

If your nephew is prompting you with this awareness, it's a pretty great start. One of my nieces would love to learn to code. I know this based on her interests and personality, but my encouragement about coding has fallen flat thus far.

I think there are probably some good takeaways for you in this post:

I think so much is early success and momentum. I'm sure others will have suggestions on the nuts and bolts of teaching code, but I find most people are willing to teach themselves if they're motivated by early wins.

Classic DEV Post from May 8 '19

Is “Defensive Programming” actually healthy?

I can’t solve this one, and I think I need the help of the DEV Community. So, a d...

Sócrates Díaz profile image