Slashdot Mirror


Ask Slashdot: How To Introduce a 7-Year-Old To Programming?

THE_WELL_HUNG_OYSTER writes I'm a professional programmer and have been programming since I was a small boy. I want to introduce this to my 7-year-son but know nothing about teaching this to children. Since he enjoys Roblox and Minecraft very much, and knows how to use computers already, I suspect teaching him to write his own small games would be a good starting point. I'm aware of lists like this one, but it's quite overwhelming. There are so many choices that I am overwhelmed where to start. Anyone in the Slashdot in the community have recent hands-on experience with such tools/systems that he/she would recommend?

16 of 315 comments (clear)

  1. scratch by Anonymous Coward · · Score: 4, Informative

    Use scratch. It's mildly obnoxious for a real programmer, but has everything you need off hand, and program flow is very easy to visualize.

  2. BASIC by Orgasmatron · · Score: 4, Insightful

    Did BASIC get uninvented recently? Why do people not start there?

    --
    See that "Preview" button?
    1. Re:BASIC by dbrueck · · Score: 5, Insightful

      I guess in some ways I got into programming because computers were a novelty and there wasn't an endless supply of free stuff, so in many ways programming was the entertainment. But now there is gobs of relatively high quality and free stuff to entertain that also /sort of/ scratches the builder itch (as I write this, my son is sitting nearby on the free-to-play Robocraft).

      So the "problem" is that there is an endless stream of stuff competing for my kids' attention that (a) is of a quality leagues beyond anything they can hope to do anytime soon and (b) gives /some/ of the same "fix" I get from programming. Back in the olden days the gap between what you could do with e.g. BASIC and what you saw in commercial apps looked a lot smaller.

      I'm always searching for something that does a good job of being an intermediate level - I can get my kids to do a lot of the intro / visual programming stuff and they like it, but then they run into this seemingly huge chasm when they try to go beyond that. It's like, "ok, so now you made a rudimentary game that runs inside this special environment on some website. You want to advance to something more flexible? Ok, um, now we need to talk about files and directories and a whole slew of tools and junk you never knew existed or were needed. Also, prepare to start typing a lot and using all those punctuation characters you rarely use in school assignments. And don't get me started if you want to get your little game onto a device so you can show your friends!"

      On the one hand I think it's just part of getting into "real" programming and they just have to suck it up and deal with it. But I really think one or two of my kids could really get into programming and really like it, but I've yet to help them get over that hump from super basic stuff.

    2. Re:BASIC by AK+Marc · · Score: 4, Interesting

      Because Apple IIC C64 and others had BASIC essentially built in. And there were piles of magazines with BASIC programs to make and try. Now, the basic command line editors are not included in Windows. You can't drop to a command line and edlin yourself a working program. Maybe you can, if you download and install an editor, but doing that is the same as installing a compiler for C++, so the low barrier of entry to BASIC is gone. It's no longer any easier than any other language.

    3. Re:BASIC by Anonymous Coward · · Score: 4, Interesting

      Because it's a bad language that teaches people bad habits. On the bright side, you used to be able to write programs in it on a $99 Timex Sinclair, which was a pretty low barrier to entry.

      Bullshit! Most of us learned to programme using BASIC when the only way to organise the code was by line numbers. We went on to learn assembly language for our computers and then integrated BASIC and assembly language programmes. Afterwards we moved onto other programming languages such as Pascal, Modula-2, FORTRAN, COBOL, Prolog, etc. Today we can learn any programming language necessary for our work or hobby projects. IIRC :Linus Torvalds cut his programming teeth on BASIC; we went on to create the Linux kernel and Git. You might have heard of them.

  3. I created a game with my SIster's kids by Anonymous Coward · · Score: 4, Interesting

    They were about that age.

    I eased the process so, that I made them design the game story and visual look. Later on, they looked and gave input as I churned the code during the next few days. After it was done, and they wanted to change something about it, they had to do it themselves -- I left several 'little annoying things' that are easy to fix there, so that they would ask and would want them changed.

    Being able to do noticeable effect with little changes made code less mysterious to them, and they were able to change little things on their own later on.

    They don't want to be good at coding, and are interested in other things. But atleast now they have experience of that as well.

  4. Scratch by NaiveBayes · · Score: 4, Informative

    Use Scratch - https://scratch.mit.edu/ It's what CoderDojo uses when teaching kids programming. It has a fun, immediately responsive interface. Bright colours and cartoon characters to attract kids, is easy to make basic games which makes it more fun, and still teaches programming logic.

  5. Learning programming through motivation. by JWSmythe · · Score: 4, Funny

    Give the kid a computer, and programming book.
    Install an electronic lock on the door with an interface to the computer.

    Give them simple instructions.

    Write a program to unlock the door.

    If you get out, you can eat again.

    If you can't, you will die in this room.

    A person typically dies without water in 7 days, and without food in 14 days.

    Good luck.

    --
    Serious? Seriousness is well above my pay grade.
    1. Re:Learning programming through motivation. by Krishnoid · · Score: 4, Funny

      That's a bit draconian. Try this instead:

      • Write a program to unlock this box.
      • If you can unlock it, you can get your smartphone out of it.
      • You can't use your smartphone until you get it out of there.
      • A person typically goes insane without smartphone use in 7 hours, and comatose in 14 hours. Shorter for teenagers.
      • Good luck.
  6. Re:Minecraft Mods by mitcheli · · Score: 5, Informative

    Minecraft Mods are an excellent way. My youngest latched onto those with no issues. Ironically, I tried to teach my 13 year old Apple's Swift language and he was totally uninterested, but mu youngest is latching right onto it, finding ways to modify our test game we're working on, and reciting back to me what objects, methods, and attributes are. I think he even understands inheritance and method overrides. He's got the tree structure of nodes in SKNodeKit down as well. And he's 9. And to think, the 13 year old was the one who expressed a desire to learn how to write games. To each his own...

    --
    Select from tblFriends where interesting >= 4;
  7. Simple answer ... by angel'o'sphere · · Score: 5, Insightful

    Don't?

    Why the heck are you supposing a 7 year old one should/could/want do that?

    Can he write already? Read? (Likely yes) ... how is he in math? And why the funk do you want him to exercise his hobby behind a computer instead of playing outdoors with other kids, a dog or hanging in a rocking chair and reading, if he can read ...

    Coding is a nice word to camouflage all the variations of developing, programming, software engineering, computer science ... what actually do you mean with coding?

    Why don't you let him practice cooking and read a cook book and then let him experiment with cooking and write his own cooking book? That is far more "coding" than most "coders" ever do in their job.

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  8. Don't! by EmeraldBot · · Score: 4, Insightful

    Unless you're kid truly displays a passion for it, I would not advise pushing him onto it. It's very likely that it'll overwhelm him, and then he'll never want to touch it again. If you are dead set on doing something like that, I would recommend starting with a LOGO implementation: those are usually pretty easy for most kids to handle, and indeed I got my start with it.

    But seriously, playing Minecraft and Robolox != enjoying programming. If anything, it shows that he likes building things, but that does not mean he is a programmer. Give him small and short steps, if at all; if you force this on him, he is going to hate it for the rest of his life. And if programming doesn't work out for him (and I highly suspect it might not), try giving him something practical or more physical; building models sounds like something he would enjoy, and LEGO's (if he doesn't have them already) would probably interest him.

    Do keep in mind, he might be playing Robolox and Minecraft for the social element behind them. It's very well possible he's playing them to make things, but a bunch of kids I've seen play it do so because it's an activity to do together, and I don't know they'd do it alone. Obviously, you are going to have to make that decision and I can't, but it's something to keep in mind.

    I don't mean to sound scary or anything, but you really want to make sure this is something your kid enjoys before exposing him to the full brunt of it. If he doesn't have a natural liking for it, it's going to be very stressful for the both of you. A lot like if your father ever made you play sports when you were younger - make sure gently stroking his interest does not turn to squashing it.

    Whatever happens, just keep an open mind and be sure he knows he can say what he wants. I wish nothing but the best of luck for you and your son!

    --
    "Set a man a fire, he'll be warm for the rest of the night. Set a man afire, he'll be warm for the rest of his life."
  9. HEY YOU KIDS, KEEP OFF MY COMPILER! AND LAWN! by TiggertheMad · · Score: 4, Insightful

    The perfect tool is whatever the kid is interested in. If you try to teach them how to write a game with Minecraft, and they want to write spread sheets, they are going to hate coding. Now, as parent post notes, Minecraft will probably hold most kids attention.

    Figure out some fashion that code interacts with their favorite thing, and there is your in. Building basic web pages might be a start, or perhaps set up a command line application where they can play with string manipulation. There are many ways you can simplify complex tasks and projects with 'training wheels', ex: APIs and such to hide away complex stuff that isn't important to a beginner. Get them a really simple sandbox where they can change things and see the effects of their changes, and then get the hell out of the way. They will be better than you are in two weeks.

    --

    HA! I just wasted some of your bandwidth with a frivolous sig!
    1. Re:HEY YOU KIDS, KEEP OFF MY COMPILER! AND LAWN! by khellendros1984 · · Score: 4, Interesting

      Ah, a "No True Scotsman" argument. From personal experience, I always skipped past the "program an elevator" section of the book and went straight to the chapters on graphics and sound. When I ran into something I didn't understand, I'd read the relevant section earlier in the book, but the "behind the scenes" stuff isn't what drew me in at first.

      I'll agree that eventually, someone who actually enjoys coding will take joy in writing whatever they can. An algorithm with a slightly better runtime complexity will be fascinating...but that's not necessarily what sparks the initial interest.

      --
      It is pitch black. You are likely to be eaten by a grue.
  10. Re:Minecraft Mods by PRMan · · Score: 4, Interesting

    Yeah, it has to be his idea. So start with modding something that he likes, like Minecraft. If my parents tried to force me to learn programming, I definitely wouldn't be doing it today. Fortunately for me, they didn't understand anything about computers, which allowed me the freedom to learn it on my own.

    --
    Peter predicted that you would "deliberately forget" creation 2000 years ago...
  11. Python by codetricity · · Score: 5, Interesting

    I have researched this subject extensively over the last several years. Most importantly, I have exposure to children between ages 6 and 14 that can program successfully with a text editor or IDE. The short answer is go straight to Python. You can read about my personal experience with my own children here: http://pychildren.blogspot.com... The main child is now 10 and using Python with IDLE and PyCharm. Also suggest you research this site: http://www.learningtech.org/wo... which I also have experience with by sending my own kid to the class. Note the Minecraft plugins from grade 4. Definitely wish I had started my eldest kid earlier as I think that age 8 would have been fine. There's a kid in my daughter's class that is 6 years old and completely killing it with PyGame. I think that I'm going to drop down from PyGame to Python Turtle (logo) with my daughter for a while. Good luck. Feel free to send me a note with your progress. I love hearing from parents with children under age 14 that are using text editors or IDEs.