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?

35 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.

    1. Re:scratch by mwvdlee · · Score: 2

      What kind of IDE/environment are you using?
      I think the biggest hurdle is not the language choice, but how to get things to run.

      My first language was Logo. Couldn't do much with it, but it was fully interactive, which meant that you got immediate feedback as soon as you pressed Enter.
      I've recently had to make a simple graphics language for my day job, including an interactive editor which ran the program (= redraw the image) on every change; feedback while you're typing. The language is quite strict and unforgiving, but if a similar language could be made friendlier, it could be a great kids' language.

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    2. Re:scratch by dotancohen · · Score: 2

      What kind of IDE/environment are you using?

      VIM. No, seriously, my eight year old uses VIM!

      My first language was Logo. Couldn't do much with it, but it was fully interactive, which meant that you got immediate feedback as soon as you pressed Enter.

      Perhaps that is why VIM is a good choice. In the learning stages one learns to use it, and the immediate feedback is a form of gratification if it does what you intended. And when VIM does something unexpected, we laugh and wonder what we can learn from that.

      --
      It is dangerous to be right when the government is wrong.
    3. Re:scratch by Teancum · · Score: 2

      The largest advantage of Scratch is the immediate results and the mixture of multimedia content that can be done with literally just a single click of a button. It can be extended to further complexity just one or two mouse clicks at a time.

      For this, I completely disagree that Python is a viable replacement or even worse something that should be done instead of Scratch. Don't get me wrong, Python is a fine computer programming language and perhaps as a 2nd language to teach a kid it might be very useful. It is just lousy as an introductory environment for somebody in grade school or junior high school to learn the basic concepts of computer programming.

      The other fun thing about Scratch that beats Python hands down is that Scratch is also multi-threaded with parallel processes happening as a major feature of the language. Kids doing stuff in Scratch don't even realize they are doing that kind of stuff until it is pointed out that some program/project they are making has nearly a dozen threads and even more event handlers being used. I don't see Python being nearly so easy to introduce such concepts.

  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 Anonymous Coward · · Score: 2, Insightful

      Because it's a bad language that teaches people bad habits.

      The same can be said for PHP, Python, Perl, Pascal, Cobol, Lua, C, C++, C#, Java, Javascript and pretty much any language out there that you can use to solve problems.
      Heck, programming on any computer with memory protection will teach you bad habits if you consider trial and error programming to be a bad habit.
      Basic may be bad, but it isn't as bad as people make it out to be.

      Unless you go for esoteric languages that only exists in academia then there will be quirks that can be misused.

    3. 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.

    4. 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.

    5. Re:BASIC by dbrueck · · Score: 2

      Haha, yeah - ironically it seems like it was far more accessible back then in a way. You could reasonably know a little bit (or even a lot) about nearly everything, and when you did use something higher level you knew pretty much everything about how it worked behind the scenes.

      Speaking of BBSs, and an example of what was enough to catch my interest back then, I once wrote TDSANSI.SYS, a drop-in replacement for the standard ANSI.SYS. It extended the set of ANSI escape sequences so you could do higher level things like drawing text boxes or repeating characters, the net result being that a BBS could do their "fancy" UIs in far less characters sent across the wire. The funny thing was that people who used it loved the speed but couldn't stand the fact that it used like 40KB of their 640KB of RAM. ;-)

      I think I was in high school at the time and it was a ridiculously nerdy project, but that was something I really got into, and yet I can't imagine asking my high school son to think in those terms nowadays. I'm guessing that's part of what needs to change - just because I came up through learning a certain path, it doesn't mean that's a good or practical way to do it anymore. Basically nobody needs to work at that level these days, so it only makes sense that he'd focus on more of an application level.

    6. Re:BASIC by Teancum · · Score: 2

      Visual BASIC used to be a pretty decent programming environment, and definitely didn't need a single GOTO command. There are other variants, although some of the later versions of Visual BASIC (to name one variant) have far too much influence from C++ developers in my opinion and has basically ruined a perfectly fine language.

      Other than compiling the language to P-code or some other interpreted middle-language (something that is definitely not unique to the language either), I fail to see what real drawbacks those with complaints about BASIC have. It certainly can be used as the primary development language for any modern application on any current computer platform including desktop computers or tablets and is simply a choice in a programmer's toolbox as well as based on the whim of the project manager for whoever is developing the application.

  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. Kodu by x0n · · Score: 3, Interesting

    Kodu from MSR is excellent.

    http://research.microsoft.com/...

    "Kodu is a new visual programming language made specifically for creating games. It is designed to be accessible for children and enjoyable for anyone. The programming environment runs on the Xbox, allowing rapid design iteration using only a game controller for input."

    --

    PGP KeyId: 0x08D63965
  5. 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.

  6. Minecraft Modding for beginners. by kiphat · · Score: 2
  7. 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.
  8. One of the ones my son uses by RingDev · · Score: 3, Informative

    My kid loves this one: http://codecombat.com/

    I got him started on it when he was 10, and he completed all of the free levels in two weeks with minimal help after I worked with him through the first few.

    Lots of other great recommendations here: http://venturebeat.com/2014/06...

    The board game one I've heard is good for younger kids, but once they have it down it's rather boring.

    -Rick

    --
    "Most people in the U.S. wouldn't know they live in a tyrannical state if it walked up and grabbed their junk." - MyFirs
  9. 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;
  10. 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.
  11. 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."
  12. Re:LOGO by Anubis+IV · · Score: 2

    Logo was my first thought as well, since I realized years after the fact that it and its use of turtle graphics was how I was first introduced to programming, way back in 3rd grade (I'm now in my 30s and have been in the industry for awhile). I didn't recognize it as programming at the time, but in retrospect I can recognize that it laid the foundation for the sort of thinking that became important later in life.

    In that same vein, when you're talking about introducing programming to someone at that age, it probably shouldn't be "programming" as most of us think of it on a daily basis. Instead, you might consider activities that get them thinking in the sorts of ways that they would use in programming. Asking them to move a turtle through a maze and other such things in Logo is one way to do that, certainly, and it worked for me, but it's not the only method. Another might be to play a game like SpaceChem, which is essentially a graphical means of programming algorithms that assemble chemicals to meet objectives in the game. Other visual languages might be a great start too. If you're on a Mac, download the free developer tools and check out Quartz Composer, which can produce some immediate graphical results with very little effort. Likewise, if you felt comfortable teaching Swift (it seems fairly approachable, but I've never used it), XCode provides "playgrounds" in which developers can immediately see their results played out.

    But yeah...I'd focus laying the groundwork for programming-like thinking, rather than jumping straight into programming proper.

  13. Bad idea by Jiro · · Score: 3, Informative

    Children aren't clones of their parents. (And even when we discover a way to make clones, they still won't be this kind of clones.)

    "I would have benefitted from learning programming early" or even "I did benefit from learning programming early" are terrible reasons to teach your kid programming early unless the benefits apply to most people, not just to you. And they don't.

    This is just a variation of the "how do I get my kid interested in sci-fi" or "how do I get my daughter interested in programming" questions we've had before, and the answer is the same.

  14. 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.
  15. 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...
  16. Computercraft by circletimessquare · · Score: 2

    It's a mod where you get little consoles, you craft them

    then you can program them with the simple scripting language Lua to automate actions in Minecraft: mine, fight, farm, etc

    it's good because they are programming *in* the Minecraft world: you're piggybacking on their love of the Minecraft universe to get them into programming

    http://www.computercraft.info/...

    https://www.youtube.com/watch?...

    --
    intellectual property law is philosophically incoherent. it is your moral duty to ignore it or sabotage it
  17. Re: Raspberry Pi by kamapuaa · · Score: 2

    You know the sad thing is that AC is totally right on this one. RPi is just another computer, giving a kid a cheaper computer isn't going to be helpful unless they don't have access to another computer.

    --
    Slashdot: providing anti-social weirdos a soapbox, since 1997.
  18. Re:LOGO by avgjoe62 · · Score: 2

    I'm now in my 30s and have been in the industry for awhile.

    Ha. Hahahahahahaha. Get off my damn industry, you kid! Hell, when I was a kid and we wanted to play with turtles in a maze, we went down to the fetid, stinking, polluted sewers and caught them ourselves! And built our own mazes out of barrels of toxic waste! None of this turtles-in-computer shit.

    --

    How come Slashdot never gets Slashdotted?

  19. Don't... by MetricT · · Score: 2

    I'm as geeky as they come. Most of a Ph.D. in theoretical physics, and have spent over a decade working in high-performance computing.

    When I was 7 years old, I was wandering through the woods, looking under rocks for creepy crawlies, playing hide-and-seek, and playing baseball with my brother and cousins. Not only did it *not* set me back in anyway, but it is some of my fondest memories of being a child.

    Let kids be kids for goodness sake. Take him to a science museum, and let *him* tell *you* what interests you. When I was a kid and hyped about computers, my dad thought computers were a fad only used to play Pac-Man. Not only do I have a good-paying career, but any time dad can't connect to the internet, I get an emergency telephone call.

    Let your child steer his future. He's the one who has to live it.

  20. 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.

  21. Spot on. Spot-Spot Spotty-Spot on! by Peter+(Professor)+Fo · · Score: 2
    Tech is an ANSWER not a QUESTION.

    Tech is for older kids. Challenge and experiment at this age. Lego to make a bridge that the cat can cross . Draw a picture that Auntie thinks actually looks like a Badger not a [insert vague animal here] Create a birthday invitation card that has fizz. Ask 1,000,000,000 questions you don't know the answers to.

  22. Re:Don't by anchovy_chekov · · Score: 3, Interesting

    Leave it be. They're just kids.

    I'd concur. My kids have an on-again/off-again interest in programming, but the crazy shit they come up with using Redstone wiring in Minecraft is just unbelievable. Sure, I could push them towards C or Ruby, but when I see them building logic gates, adders, flip-flops and the like in Minecraft I just think "they'll work this stuff out on their own". And probably have a better understanding of the fundamentals as they go on.

    MIT's Scratch system is probably a good start for a lot of nascent coders though. It's not just about the code - it's also the community around it, like a Github for little ones. Strongly recommend looking into that.

  23. Re:Minecraft Mods by samkass · · Score: 3, Informative

    This is how my kids started with Minecraft plugins, a plugin called ScriptCraft: https://github.com/walterhiggi...
    It lets you write mods in JavaScript, either with separate .js files in a directory or directly on the command line in-game. JavaScript was very approachable and forgiving, and gave them immediate visual feedback on their code. Now my 10-year-old has written a Java mod while my younger one is interested in trying. I swear the desire to mod Minecraft is doing more for STEM than any Pearson curriculum...

    --
    E pluribus unum
  24. Re:Eastman, is that you? by sconeu · · Score: 2

    You had sewers and barrels of toxic waste? You lucky, jammy bastard!!!!

    WE had to dig our own sewers, and then build the chemical plants to GENERATE the toxic waste!!! I'd have killed for barrels of premade waste!

    --
    General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.