code - Coding for kids?

26
2014-06
  • sudoodus

    I'm looking for easy, accessible ways for young kids to make and see code work.

    My memory is being 6 or 7 and being shown by a high school babysitter how to make very simple BASIC programs on my Commodore 64. I could quickly make my own programs. They generally just incremented a variable by some value, displayed it, and looped (with a GOTO statement !), until manually killed.

    Very simple stuff, but it was amazing for me. I want to be able have a similar or better experience for my kids. However, they won't be able to do much with directory structures, command lines, directives, etc.

    What's the best way to make my kid a coder?

  • Answers
  • Doktoro Reichard

    Maybe you could look into Python's Turtle module and this educational interface. From the Python reference:

    Turtle graphics is a popular way for introducing programming to kids. It was part of the original Logo programming language developed by Wally Feurzig and Seymour Papert in 1966.

    Imagine a robotic turtle starting at (0, 0) in the x-y plane. After an import turtle, give it the command turtle.forward(15), and it moves (on-screen!) 15 pixels in the direction it is facing, drawing a line as it moves. Give it the command turtle.right(25), and it rotates in-place 25 degrees clockwise.

    By combining together these and similar commands, intricate shapes and pictures can easily be drawn.

    From a first glance, it is on the heavy side (it has several commands, so it may be hard for a child to learn all of them) but the instructions are lexical (i.e. if you want the turtle to move 100 pixels forward, type forward(100) into the shell). With little code, you can do stuff like this:

    turtle star

    The interface I linked (PythonTurtle) seems more directed to children, as for the screenshot:

    PythonTurtle screenshot

  • baum

    I started with scratch (scratch.mit.edu) when I was about 12. Now, I teach classes in Scratch for kids as young as 5, and they do great with it.

    The nice thing about scratch is how easy it is to do amazing things: the environment takes care of a lot of the lower-level components for you, and it is overall very intuitive with its English-like syntax.

    Later, as I moved on to python, C, etc., I remember being amazed at the simplicity of the language: most of the animations/games I wrote in Scratch had almost no variables; there is default support for parallel tasks; keyboard, mouse, video input; sound & video output: everything is just taken of for you.

    I highly recommend it.

  • Keltari

    This is off topic, but Ill give an answer:

    You might want to try Karel the Robot. Karel is a very simple, yet fun way for kids to learn the basics of programming. You use a limited set of functions to move a robot through a maze. It teaches logical thinking and problem solving. Karel can't turn right (or is it left), so how do you get around that? 3 lefts! Its made with kids in mind, but good for any age.

  • addy2012

    You could take a look at SmallBasic (http://smallbasic.com/) from Microsoft. It has a very simple Basic syntax and a quite good auto-complete editor that gives a lot of help while discovering the functions of that language.

  • Jwosty

    I'd highly suggest Scratch like @baum, but I'd like to add a little. The first thing anybody will notice is that it's a visual language: you snap together command blocks like legos, forming scripts, which can then be dragged around and executed at will. You mostly use the mouse; the keyboard is only used for filling in numbers and strings in said blocks. The entities, called Sprites, execute the scripts totally independent of each other, so you don't have to worry about threading. Scratch also has turtle graphics, which IIRC originated from LOGO, a simple language aimed at beginners.

    Overall, it's a very low floor but also a low ceiling, which works out pretty well. You see your work very fast, but after a year or two (at least for me), you become too advanced for it, at which point you're reading to move on to a programming language. Personally, the first real coding I ever did was playing around with Scratch's Smalltalk source code. It's a great learning tool.

    You could also look into the Kodu Game Lab on the Xbox 360, but I don't know anything about it.

  • Alex

    I'd like to suggest the great alternative. Robot programming! The object oriented C++like language in full 3D gaming environment. It's funny for children from 9 to 65! Colobot This is generic experience, so kid can proceed to any language he wants.

  • 200_success

    Along the lines of the turtle-based programming environments, I'd like to suggest a board-game analogue: Robot Turtles. The idea is that a turtle (represented by a card) needs to navigate its way through a maze (the board, with castles and other obstacle tiles laid out in the grid) to reach a goal (a "gem" tile). The child is not allowed to touch the board, but submits a "program" in the form of a sequence of instruction cards, which request you to advance or turn the turtle.

    It's great fun for younger kids. The advantage over directly programming a computer is that the board game is highly interactive. You get to make silly robot noises ("Meep!"), make fun of buggy programs ("Bonk! Bonk! Bonk!"), suggest strategies, and celebrate in successes, making you an active participant in the child's learning experience.

  • Mr T

    Scratch is good. If you have an iPad, Kodable is worth a look. If you want to spend some money on something real, take a look at Sphero. There are tons of apps on iPads & Android to control these devices, some of which are code based.

  • André

    Python is probably the best choice.

    The other answers here mention some languages that are specifically designed for beginners to start programming, but other than playing around they won't do much with them, where as Python is actually used to "work" rather than just play, for example some very big websites like Instagram use Django, a Python-based web app framework.

    So using Python will both introduce them to programming and leave them precious knowledge that they can reuse in the future to create powerful applications if they choose to become developers later.

  • Tomáš Zato

    If you've got lots of money, you can get them lego NX Cube. It has graphical programming interface by default.

    It also has support for Not Exactly C (download here) language when they get older.

    We used this in a highschool programming competition.

  • bjb568

    Javascript! I'd recommend Khan Academy Computer Science (they have good math stuff too).

    You get a textarea on one side and a canvas on the other - typing into the textarea gives instant feedback in the canvas. They have audio tutorials on top of the system with real-time code modification (basically a video) and fun challenges.

  • Homberto

    I am 13 and I know lots of Codes....

    HTML

    CSS

    JavaScript

    PHP

    C++

    For HTML and CSS I just did the basics. I wrote the code using notepad, saved it, and opened them in Google Chrome and used DevTools to see what errors it threw. I enjoyed seeing the outcome when the code was finished, and I find coding to be fun (like most coders i come across). I did a similar thing using JavaScript; it was fun to see my website become dynamic. (I coded a random joke generator). Eventually, I coded an entire website (15 pages, 3 months work) (never published though). I know some people who were coding PHP and I decided to learn it. This was difficult, especially the OOP, but eventually I understood the language. Using the Codecademy console, I coded some cool PHP scripts. Seeing the result of the code execution is always the fun part; a turtle as part of the output doesn't make it any more special.

    C++ was hard because of the complexity (data types, casts, compilers, etc.) Currently i'm coding a C++ program and of course it's fun to see it execute.

    (w3schools offers great tutorials/reference/try-it-activities for HTML and CSS. Codecademy offers excellent JS and PHP tutorials which is centered around try-it activities. cplusplus.com offers a great tutorial and reference, plus plus it has a C++ forum)

    Really, to me at least, the best way to learn to code is to do it yourself, and the best way to make it seem fun to a child (Let's say 7) is to have them start coding and show them the output.

    A young child will find anything to be cool. If he/she can learn to code a JS "Hello World" program, then he/she will say "cool". Then add a few setTimeout's and he/she is amazed.

    In my opinion, hands-on learning and writing code is better than a turtle game. But no matter if you use a turtle game or writing from scratch, if the child sees the code, the child will want to learn more, do more, write more, and experimenting with code.


    I have a friend who started with python; It is a good introduction to web coding and scripting. But I believe that the first code language you learn should be HTML, followed by CSS and JS. (The three languages every web developer should know). Then other languages like python, PHP, and C++ should be learned after learning the other 3.

  • bkbeachlabs

    I highly recommend using CodeHS. It's free to try their first module, which is enough for most kids to decide if programming is for them. I used it to teach two students and they both really enjoyed it! It's powered by Karel too but its a full-featured course with lessons, examples, and videos. And its intended for use by teachers so you can track the progress of your students as they go!

  • Santa Claus

    This is a really interesting question.

    As others have said, Scratch is a fantastic the first step. Programming Lego mindstorms is also useful in the beginning.

    After that, its a little harder to choose.

    As a second step:

    • Python is a great way to transition from graphical languages to text-based ones.
    • Javascript Could also potentially work as well.

    But beware - kids will have questions. And if you don't have answers, its possible the kid will get discouraged and walk away. I was a kid not too long ago (it seems), and was always frustrated when my Dad wasn't fermilar enough with the language to help me when I got stuck.

    I also can recall messing with a bit of HTML when I was about 9 (I was showing off to my 4th grade teacher how I could change the background color of a webpage).

    Also, look for science museums in your area that may be offering programming workshops or summer camps, as they are a great way for kids to jump into programing with other kids.

    For the next step, you might want to tell your kid about the various platforms available and see if any sound interesting to the kid:

    • iOS wasn't my choice, but its what I ended up persuing, and I'm glad I did. I was lucky enough to have access to an iMac in my houseold, and was gifted with an iOS programming book, which I found very helpful, and I have continued developing for this platform ever since.
    • Another choice might be developing for the web. If you show your kid HTML (or in my case, I taught it to myself), and they enjoy it and like the prospect of having their own website, it might be good to just let them continue with HTML. they might be amused to learn how to add Javascript to their website, or add CSS to style their website.
    • Potentially show them C# and the whole Windows development thing (If you cannot tell, I have zero experience in that field)
    • Java might be a fantastic choice if your child is into a game called Minecraft (like most children are). Java can help them customize the game by adding client and server features through modding.

    But again, I will stress that kids will have questions, so it is very helpful if you know some of the language that your kid is learning. That was the most frustrating thing for me when I was learning a new langauge or concept.

    I think kids learning to code is fantastic. I currently fall in the 13-18 age group, and I started with Scratch when I was about 7 or 8, and still love programming today. It's one of the few things that can be carried on from childhood into grade school, college, and beyond.


  • Related Question

    home networking - Protecting kids online
  • Phillip Ngan

    My eldest child is at the age where she will start using the web for school work and general interest. What can I do to protect her from encountering inappropriate content, while browsing the web using our home computers? I'm open to any suggestions, not just technical ones.

    Update: Encounters with inappropriate material can be caused by inadvertent actions or willful actions. I'm really looking for protection against inadvertent actions, e.g. looking up "wet willy". But I understand that protection against willful actions is best mitigated with eduction.


  • Related Answers
  • rlb.usa

    Computer In Public Location

    This is a little known trick to help curb less appropriate activities. Putting the computer in the living room, dining room, kitchen might seem absurd at first, but if you think about it, the vast majority of inappropriate activities occur when one feels they are alone with privacy.

    Limit Computer Time

    This will help keep your child from living a second life on the computer as they know they only have X amount of minutes on the computer and will prioritize their activities.

    Computer User Account Permissions

    You might also consider setting their computer logon account permissions such that they cannot install programs (like messengers, poker, online games, or other unwanted programs). It won't prevent your child from using online applications, but it will certainly make things less convient.

    Monitoring Software

    I hate to say it, but if you are really, really concerned, there is monitoring software to consider. Specter Pro has been the leader in this field for many years and can log keystrokes, web browsing, im history, emails, screenshot activity, and more.

    Just Ask Child What They Are Doing

    As a child one of the things that both worked the best was being constantly questioned about my online activities. As a parent passed by they might look over my shoulder, "Oh, what is that window there.", and inquiring about what it does, why I need it, and if it is appropriate. It can show the child that you are personally interested when they take an interest in new things (Perhaps the child answers that he is researching rockets!), and can allow the parent to sniff out and discourage bad things (Perhaps the child is talking to a stranger). This helps the child learn about what kinds of things are good and bad to be doing as they grow older and it will stick with them.

    Two key themes in it all:

    • make bad behavior less convienient

    • take a personal involvement/interest in your child's activities

  • David Pearce

    Although I am no parent, and have no experience in sheltering children from the horrors of the internet, I do think you really do have to take two approaches to protecting your children

    Education

    Really, the first part is to teach your children about the internet. I do beleive it is wrong to just start filtering your children's internet without talking to them about it first. Tell them that, although it can be really helpful, good and fun, there are a lot of bad websites with wrong content on it. Teach your children how to be safe online and tell them:

    • When you are online, you should not really give out personal information of any kind
    • Not everything on the internet is true. Some people will go to great lengths to make people believe their lies
    • Don't download any files1
    • If you think a website is bad or wrong, get out of it straight away

    And of course a couple of others.

    I believe that education is the most important aspect of keeping your children safe online. Teach them how to behave on the internet, and what is right and wrong. There is no easier way to say "I don't trust you" to your children than filtering their internet without talking to them about why you are doing it (if you actually are).

    1Mainly to prevent malicious software from installing itself on the computer. Depending on the age and 'smartness' of your child, you might want to also teach them how to search the internet properly (to avoid bogus results with virus downloads) and how to identify a malicious website.

    Website Filtering

    There are numerous filtering programs out there designed to keep track of the websites that are visited on your computer and to limit access to bad websites. The disadvantage of these is that you have to install them on each computer, which means they can just be uninstalled. An alternative to this is a network-based filtering system, such as OpenDNS.

    OpenDNS Parental Controls divide the Internet's content into more than 50 categories. Simply choose your desired filtering level, from "High" to "Minimal," and check a box. Your filtering preferences take effect in just minutes. Further customize your preferences by adding additional categories or individual Web sites that are problematic or unsafe for your household.

    OpenDNS Parental Controls, recommended by industry experts, require no appliance and setting up is a breeze.

    The main advantage the OpenDNS internet filtering has is that it is simply a DNS server, which requires zero installation. Quite literally, you can set this up in 3 minutes.

    You just enter the OpenDNS IP addresses into your network configuration on each computer, or enter them into your router to make your whole network connection 'protected'. For more details, check out the start guide at OpenDNS.com.

    But remember, all filtering software can be bypassed and 'cracked' by anyone with enough determination and time (something which many kids have plenty of), so these filters must not be used or thought of as the be all and end all of internet safety. They rarely contain every single website in a given category that you wish to block.

  • Wim ten Brink

    While many people believe in the power of installing internet filters or whatever more, this is actually something that you definitely should NOT do! And yes, many people will call me crazy but as a parent it's a way to tell your child: "I don't trust what you do online!" which is something children don't want to hear. Only install a filter if the child wants one too and teach your child how to disable this filter again if the child ever needs to get around it.

    The best thing you can do is the same as you can do when you let your child walk on the streets all by themselves: educate them as best as you can and don't try to avoid any topics that they might come up with, no matter how uncomfortable such topics will make you. (But feel free to explain that you feel uncomfortable about that topic.)

    First of all, filters are unreliable. China has created the Big Firewall of China hoping to control the contents of the Internet within it's borders. They're failing miserably, no matter what they try because there are plenty of options to go around it. Myanmar even closed off all Internet connections within it's borders simply because of the civil disorder. They didn't want to have any images of political abuse leaving the country. They failed too, although they did manage to keep a lot hidden from the outside world.

    If you tell your child not to visit porn sites or whatever, then your child can just obey or disobey your wish. When you install a filter then you will just encourage your child to find a way around this filter, if they really want to find porn online. A filter isn't going to stop them! Maybe they'll just go to a friends place, where the friend has no filter and thus unlimited access. Or maybe they'll visit a library, if the library has no filters. Or they find a way to disable your filter. Anyway, children are cunning enough to get what they want, if they really want to.

    Also keep in mind that a filter might block too much, or too little. For example, this post might be blocked simply because it uses the word "porn". If that's no reason to block this post, words like "penis", "vagina", intercourse", "condom", "viagra" and "aids" might be enough to block these posts, even though these words would be common words for a medical site or even Wikipedia... (Btw, if your filter blocks this post, please raise your hand!)

    But how do children respond to those "bad sites"? Well, if they were looking for it on purpose, they'll be happy. But when they're just browsing the Internet in search for something else, they just behave like most adult Internet users: take a peek out of curiosity and then just ignore it. Children who discover porn sites or sites containing pictures of mutilations and worse material might be upset at first but will soon learn to ignore it. By educating them how to ignore such sites and by teaching them what to do when they discover a bad site.

    And finally, talk with your child about installing a filter and explain to them how they can disable it! This tells them that you trust them to do whatever they like and that the filter is there to help them, not to block them. If the filter is voluntary, your child will much more appreciate you for it. (And they won't try to disable it simply because they don't have to.)

    People who try to educate children by restricting their options simply forget that if a child wants to do something, there isn't much that will stop them from doing so. Children aren't just home enough to control them 24/7. School will bring them in an environment where they can learn all the dirty tricks. And visiting friends will give them enough possibilities to do things without your knowledge. A filter won't stop them. At most, it will just annoy them.


    The biggest problem with filters is that they give a false sense of security. People start to believe in a piece of software to do their parenting for them. This makes absolutely no sense! There are people who just install a filter, thinking their child is safe, while their child just goes visiting a friends place just to look at everything you've forbidden.

    Filter software only has an advantage for those who create it. They earn Big Bucks by making parents paranoid about the dangers of the Internet.

  • Mahesh

    Netnanny and Cyberpatrol are two internet-content filtering softwares which you can install on your computer. Also OpenDNS filters lot of objectionable content (that includes malicious links).Other alternatives (but less effective options) are spector and Safe eyes.

    Firefox filtering extension Procon, IM-filtering software IM-Safer. For session monitoring, Safesurfers is monitoring software but it's too much if you wish to log the kids sessions.

  • tgbarnett

    I use OpenDNS to look after the Network here.

    One objection that people have to services such as OpenDNS is that they are able to log all of the sites (to Domain Level) that you visit. Two things:

    1. This can be used when they are suggesting corrections for an incorrect domain.
    2. Your ISP is able to log every site that you go to as well.

    Some ISP's actually have a service where they will block sites that are perceived to be objectionable, so I suggest that you look into this option with your ISP.

    I agree with Joshhunt, Education is very important. In New Zealand there are sites such as Netsafe that give practical advice on Cybersafety (and as it's on the Internet anyone can see it).

    Hope this helps.

  • Chris Tarazi

    You can download/buy this piece of software that filters out unwanted content on the web.

    http://www.cyberpatrol.com/family.asp

    Headquarters Toolbar Control how and when people use your computer. Quickly and easily check status and modify settings

    Flexible Content Filtering Options Use the ‘ready-to-go’ filter settings, or customize for each user. Block porn and other unsuitable web sites, content and images Choose from Child, Young Teen, Mature Teen or Adult settings Select from 9 commonly blocked categories including Adult, Chat, Drugs, Gambling Create your own pre-approved list of sites

    Limit Access to Programs Do you want to make some programs ‘off-limits’ to your children? Block IM, chat, games or home finance programs Prevent program downloads that can harm your PC

    Restrict Chat & Instant Messaging Keep cyberbullies, online predators and scammers away from your kids. Protect personal information (address, phone number, etc.) from being revealed Block objectionable words and phrases used by cyberbullies and predators Choose from an enhanced list of common cyberbullying phrases to block

    Monitor Internet Activity Know where your kids go online. Get detailed reports on web pages visited, time and length of visit View and save weekly and daily summaries Easily block future access to objectionable sites

    Limit Time Online Too much Internet? Create predetermined time rules. Limit based on time of day, or daily/weekly cumulative time allowances Control both Internet and program use Once time limits are reached, a blocking message appears

    Manage User Profiles Manage Internet access for as many people on one PC as needed Create multiple users with different filtering levels Integrates with existing user names on Windows XP and Vista