Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Education Programming

How To Teach a 12-Year-Old To Program? 799

thelordx writes "I've got a much younger brother who I'd like to teach how to program. When I was younger, you'd often start off with something like BASIC or Apple BASIC, maybe move on to Pascal, and eventually get to C and Java. Is something like Pascal still a dominant teaching language? I'd love to get low-level with him, and I firmly believe that C is the best language to eventually learn, but I'm not sure how to get him there. Can anyone recommend a language I can start to teach him that is simple enough to learn quickly, but powerful enough to do interesting things and lead him down a path towards C/C++?"
This discussion has been archived. No new comments can be posted.

How To Teach a 12-Year-Old To Program?

Comments Filter:
  • Python (Score:5, Informative)

    by stoolpigeon ( 454276 ) * <bittercode@gmail> on Sunday December 27, 2009 @03:48PM (#30564848) Homepage Journal

    Python is multiplatform and is free. There are quite a few free tools and libraries available. It is a 'real' language that is at the same time suitable for youngsters to learn on. With the huge Python ecosystem that exists you can have them cranking out code in a text editor, an interpreter or a full blown IDE. (A wide number of them in fact). Python also makes for a nice bridge to C as it pretty easy to integrate the two [python.org]. If you feel competent, you could probably just hit the Python docs and work your way through them. If you'd like a little help and have material already prepared for teaching younger people how to program with Python, there are resources out there.
     
    I recommend Hello World! [amazon.com] which uses Python. (You can read my full review of it here [slashdot.org].)
     
    If you don't want to buy a book, then you may want to look at Invent Your Own Computer Games with Python 2nd ed. [inventwithpython.com] I haven't read it myself yet, and a quick glance showed it to have some rough edges, but one can't be too picky at that price. It is available to download or read online.

  • javascript (Score:3, Informative)

    by emj ( 15659 ) on Sunday December 27, 2009 @03:50PM (#30564862) Journal
    with canvas you can easily get graphics, and you can do network stuff.
  • Re:javascript (Score:2, Informative)

    by cathector ( 972646 ) on Sunday December 27, 2009 @03:55PM (#30564902)

    +1 javascript.

    it's got a C++ - style syntax,
    is forgiving about lots of stuff,
    can do graphics,
    can do awesome 3D if there's an interest in that,
    and imo best of all, it's the most portable language going: it's easy to put your nephew's apps on the intertubes they're guaranteed to run on his friends' computers with no fuss, no muss.

  • by YA_Python_dev ( 885173 ) on Sunday December 27, 2009 @04:18PM (#30565118) Journal

    Python is a very good suggestion. Be sure to check out the turtle module [python.org] (included in the Python standard library), it's quite nice and inspired by Logo.

    Also, Python 3.1 is slightly simpler and easier to understand for a beginner that the old Python 2.x.

  • by WolphFang ( 1077109 ) <<m.conrad.202> <at> <gmail.com>> on Sunday December 27, 2009 @04:21PM (#30565150)
    Why not try Free Pascal and Lazarus? You can use a lot of the material found in learning Delphi 5+ books for it. Is fully object oriented. It is seriously cross-platform also.

    From: http://wiki.lazarus.freepascal.org/Overview_of_Free_Pascal_and_Lazarus [freepascal.org]

    Free Pascal (FPC) is an open-source Pascal compiler with two notable features: a high degree of Delphi compatibility and availability on a variety of platforms, including Windows, Mac OS X, and Linux. Free Pascal's compatibility with Delphi includes not only support for the same Object Pascal programming language that Delphi uses, but also for many of the same libraries of powerful routines and classes that Delphi is justly known for. This includes familiar units such as System, SysUtils, StrUtils, DateUtils, Classes, Variants, Math, IniFiles and Registry, which are included with Free Pascal on all supported platforms. Free Pascal also includes units such as Windows, ShellAPI, BaseUnix, Unix and DynLibs for accessing features specific to an operating system. These dozen or so units make up the core of what is usually referred to as the Free Pascal run-time library (RTL).

    Lazarus is an open-source development system that builds on the Free Pascal compiler by adding an integrated development environment (IDE) that includes a syntax-highlighting code editor and visual form designer, as well as a component library that's highly compatible with Delphi's Visual Component Library (VCL). The Lazarus Component Library (LCL) includes equivalents for many of the familiar VCL controls such as forms, buttons, text boxes and so on that are used to create applications that have a graphical user interface (GUI).
  • Re:Programming (Score:4, Informative)

    by SteveWoz ( 152247 ) on Sunday December 27, 2009 @04:24PM (#30565198) Homepage

    It's less important the content (how to program, which language) than the motivation, having the student want to learn it. When a youngster wants to learn something, they will learn more than you ever could have taught them. It's too easy for experts to not be teachers and lose the youngsters early.

    If the kid wants to learn and you have the time and patience, you can never fail, one-on-one.

    I agree strongly with you step-by-step approach to reaching your destination.

  • Re:javascript (Score:3, Informative)

    by Ken_g6 ( 775014 ) on Sunday December 27, 2009 @04:36PM (#30565302) Homepage

    It's just not all that great a development environment.

    That's what Firefox + Firebug does for you. OK, it's not Visual Studio or Netbeans, but it's leagues beyond anything in IE.

  • Re:Python (Score:3, Informative)

    by bcrowell ( 177657 ) on Sunday December 27, 2009 @04:49PM (#30565406) Homepage

    But if you are just trying to build interest, rather than solve a problem, I suggest javascript as you can build on an existing familiarity with web pages to interactive slide shows, quiz games, etc.

    This seems to me like a good idea in theory, but a poor one in practice. I like javascript as a language, and have written a couple of reasonably nontrivial apps in it. However, a beginner is going to need a book that's designed to teach programming using a particular language. I don't think there is an appropriate book of that kind for js. The O'Reilly rhino book (Flanagan) is basically the only js book on the market that's any good. The rest are pretty much all crappy things aimed at teaching web designers to do little browser tricks; you could do everything that's in one of those books, and still never develop a clue about programming.

  • Stagecast and Alice (Score:2, Informative)

    by VeryLargeNumber ( 1394367 ) on Sunday December 27, 2009 @05:09PM (#30565548) Homepage

    I know two programming environments, designed specially for children. One is Stagecast Creator http://en.wikipedia.org/wiki/Stagecast_Creator [wikipedia.org], which is created in Apple, and was known as Cocoa before Apple reused the name for the Cocoa API. The other is Alice http://en.wikipedia.org/wiki/Alice_(software) [wikipedia.org], created in Carnegie Mellon, by a group led by the late Randy Pausch (you might have seen "The last lecture" by Randy Pausch).
    Stagecast creator is a programming tutorial, disguised as a 2D game designer, and Alice is a programming tutorial disguised as 3D scene creator. I, being a keen NES gamer, tend to like Stagecast better.

  • ALICE from CMU (Score:5, Informative)

    by Proudrooster ( 580120 ) on Sunday December 27, 2009 @05:12PM (#30565582) Homepage

    I am sure someone has already posted it by now, but this about this.

    What is the goal of programming?

    To learn about objects, methods, functions, variables, loops, arrays, program flow, statefulness, events, design, and concurrency (threads).

    You can do all of this in Alice from CMU. http://alice.org/ [alice.org]

    Alice starts out as fun which is a great hook and quickly changes to a programming environment as you want to build more complex worlds. Once students understand all the abstract concepts of programming then you can spring C, C++, Java, or whatever. Alice is nice because you only have to learn one level of the abstraction at a time and not wrestle with programming syntax. Having to deal with two abstractions (syntax + programming concepts) will lead to disinterest because it is HARD, even for people who like it.

    I also recommend getting a Lego Mindstorms NXT. You can run nearly any language on it.

  • by Nitewing98 ( 308560 ) on Sunday December 27, 2009 @07:23PM (#30566492) Homepage
    I agree with most people here, but for a different reason, I think. Any scripting language is interpreted rather than compiled. I think compilation is difficult for beginners to understand. A good interactive interpreted language gives quick results so it encourages them to "experiment." I learned with BASIC and LOGO, but I'd also recommend Python or even Applescript or shell scripting (dos or linux) - those are all "quick result" languages that allow him to see that he is controlling things happening on the screen.
  • by kervin ( 64171 ) on Sunday December 27, 2009 @07:27PM (#30566514)

    Game programming with Blitz Max [blitzmax.com] was the way we went. There is actually a book called Game Programming for Teens [amazon.com] that gives you some lesson structure.

    BlitzMax also has a C++ SDK, so you can graduate to that at some point. But as a recovering C++ developer myself I can't understand why you'd want to do the poor kid that.

  • Re:ALICE from CMU (Score:2, Informative)

    by rrossman2 ( 844318 ) on Sunday December 27, 2009 @08:00PM (#30566732)
    Amazingly, you're only the second to recommend ALICE. It was what my teacher used in our problem solving and logic class (he knows some people at CMU who worked on it).

    Alice is very object oriented, easy to pick up on yet can do some pretty cool things. Here's a quick class project I put together.. it's a demo I did for the class, and was put together within the first few hours of having ever touched alice. Doeasn't look like much but the behind the scenes code for the timining and all that is quite large.
    http://www.youtube.com/watch?v=65swK6i3HgE [youtube.com]

    There's a lot more demos of Alice projects on youtube as well
  • Greenfoot (Score:2, Informative)

    by brainburp ( 1547139 ) on Sunday December 27, 2009 @08:40PM (#30567040)
    Greenfoot: http://www.greenfoot.org/about/ [greenfoot.org] The thing is, most people are not "meant" to be programming. That is really a weird thing, really. Life is for taking showers and stuff. So, that's why I recommend Greenfoot; first see if someone is even interested. See more at: http://en.wikipedia.org/wiki/Educational_programming_language [wikipedia.org]
  • by Jim Hall ( 2985 ) on Monday December 28, 2009 @05:05PM (#30575618) Homepage

    Most kids like to write some kind of game as their first program. It's immediate enjoyment, and something they'd like to play with when it's done.

    So a good start for learning programming might be GNU Robots [gnu.org]. In it, you write a program for a little robot, then send it out to explore a world on its own. The robot has to run autonomously, using the program that you gave it to navigate obstacles, avoid (or destroy) enemies, pick up energy tablets, and collect rewards. And you get to watch the robot do its thing, so when it's done you can immediately update your program and try to improve it.

    GNU Robot programs are written in Scheme, which should be fairly easy to learn.

    (Disclaimer: I'm the original author of GNU Robots, although I turned it over to someone else after I released version 1.0D in 2000.)

"Engineering without management is art." -- Jeff Johnson

Working...