Slashdot Mirror


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

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++?"

64 of 799 comments (clear)

  1. Python by stoolpigeon · · Score: 5, Informative

    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. 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! which uses Python. (You can read my full review of it here.)
     
    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. 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.

    --
    It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
    1. Re:Python by LaminatorX · · Score: 2, Insightful

      Seconded. If/when a transition to low-level is called for, you can (re-)write python modules in C to get your feet wet.

    2. Re:Python by Anonymous Coward · · Score: 2, Interesting

      You may actually want to be a little wary of languages like Python if you plan on teaching a kid C. It's a trap that I, as a young programmer, fell into with classic Visual Basic: the language is just enough that you get hooked on it and don't want to move on to something else. That's an important reason, at least in my book, why starter languages should be limited in their capabilities—that, and it makes a great learning experience for the kid to come back and complete his or her favourite language later!

      tl;dr: Python is a great language to learn by, but so featureful that your kid may never give it up.

    3. Re:Python by bcrowell · · Score: 2, Informative

      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.

    4. Re:Python by brian1078 · · Score: 2, Funny

      hassle? Doesn't python come with the operating system?
      $ python --version
      Python 2.6.2

      Microsoft Windows [Version 6.1.7600]
      Copyright (c) 2009 Microsoft Corporation. All rights reserved.

      C:\Users\brian>python --version
      'python' is not recognized as an internal or external command, operable program or batch file.

      guess not

    5. Re:Python by tzot · · Score: 2, Funny

      tl;dr: Python is a great language to learn by, but so featureful that your kid may never give it up.

      You make it sound as if not giving up Python is a negative thing. Perhaps I can understand it if I change context:

      - My little brother wants to enter the world of relationships. Whom do you suggest he should get involved first with?
      - Natalie Portman.
      - Well, Natalie is a trap; he can get hooked on her and never want to move on to someone else.

      Nope. Still does not compute.

      --
      I speak England very best
    6. Re:Python by Simon80 · · Score: 3, Insightful

      Because Python is more popular, isn't tied to a proprietary vendor's toolchain and runtime, has various modern features that make it rather powerful, has a wide selection of standard and third party libraries, and can interoperate C or C++ as needed later on.

    7. Re:Python by Anonymous Coward · · Score: 2, Insightful

      Answer:

      He'll go on to play football, party, get pussy, get straight-C's in high school, and become generally well-adjusted with social skills. Then he'll get a degree in business and make a six-figure salary while boning hot secretaries all day as losers like you toil endlessly under shit wages and constant threat of outsourcing.

      Question:
      Though there are many many many reasons, briefly describe the number ONE reason why the united states was not considered a world power nor an economic leader in the twenty first century.

    8. Re:Python by hazem · · Score: 2, Interesting

      There's actually an interesting Agent-Based Simulation system based (loosely) on Logo called NetLogo (http://ccl.northwestern.edu/netlogo/). You can do basic Logo stuff, but it can actually do some very sophisticated modeling and the syntax is not very difficult.

      Using syntax similar to Logo, you have program agents to sense their environment and then take action based on that. The concepts scale well to other platforms like the Lego Mindstorms.

      It's not a traditional programming environment but as a beginner you'd still need to understand the idea of variables, objects, and conditional logic. Plus it's very visually oriented and has many examples that a kid can play with and tweak.

  2. Programming by sopssa · · Score: 5, Insightful

    You didn't tell if he actually is interested in programming at all. Because if he isn't, he will never be. I tried to show programming for my little brother too, but he just couldn't be interested. It's something you need to be interested at, and if you are, you've probably picked it up yourself at that age. But maybe it's worth giving it a try at least, but don't feel bad if he doesn't get interested in it.

    I started programming with Quick Basic. I don't remember exactly how I got there, I think I was doing "programming" like stuff with Paint or other such programs and my father instructed me to Quick Basic (this is when I was 7-8 years old). I remember having some game programming with quick basic book, that had simple examples and exercises. It was probably perfect for that age; simple, but still you got to see nice results. If i would had been dropped in to c/c++ instantly, I would probably had dropped whole programming thing.

    Next logical translation from that was to Visual Basic, continuing on making own games, mostly top-down ones. It was nice to be in Windows environment, while still having easy language to go by. And there were DirectX libraries available too, and I learned first basics in 3D programming and raytracing. There were also some nice sierra style adventuring games game developing books released and I had couple of them.

    Next step is more interesting tho. I had tried c++ for some times already, but I never really liked it. It was too much shit to get by, and wasn't that nice to develop with. I mean, I knew it and could code with it, but I really didn't want to. But I tried Delphi, and fell in love with it, mostly because of it's comprehensive component library, good help and nice coding. To this day I still prefer Delphi in GUI programming unless I really have to use C, it's just a lot nicer.

    But the main point being, do not throw him right away to the nerdy shit that programming is. Get him started with the more easy programming languages first. There's a lot more such now a days too. Hell, don't except him to get to c++ programming ever. It's a limited area in work sense. Sure it's good to know it, but it isn't the best language or answer to everything.

    Just let it be fun for him, and get him interested on programming on its own merits. Otherwise it's not going to work.

    1. Re:Programming by 0xygen · · Score: 3, Interesting

      Interestingly along those lines someone has created a low-entry-barrier BASIC type language. Check out http://kidbasic.sourceforge.net/

    2. Re:Programming by johnlcallaway · · Score: 5, Insightful

      Great advice! I also tried to teach my son to program, but he wasn't interested. I think the 'key' is to find something he is interested in that he has to learn to program to do it. Robotics comes to mind. My first language was also basic. My first program was a simple program go plot quadratic equations on graph paper for extra credit in calculus class. My second program was a program to hack passwords because I didn't have high enough priority to run things on the computer. I had a 'reason' to code beyond learning. I learned to code to solve a problem.

      Use the project to select the language, not the other way around. I too tried C++, but because my first program was a Windows GUI, it was hopeless. I then took an online class that focused on more batch-oriented homework, and it was a breeze. Use something that can have lots of small successes instead of one huge result. It's easier to cope with a small setback than a large one, and he will be less likely to get discouraged once he can start growing his skill set and see that growth.

      Start with the simple stuff ... basic syntax and if/then/else type logic. Then add some methods or functions. Toss in some for/while loops. Build a solid base that can be used going forward before you get into heavy stuff like operator overloading or inheritance. Syntax first, learn how to compile or run, learn how to debug simple errors. Then move on to more advanced concepts.

      And for gods sake, find something that he doesn't need to worry about libraries or a debugger to figure it out. Show him how to use printf statements to trace and debug programs FIRST before introducing him to debuggers.

      --
      I rarely read replies, it's my opinion and if you thought about your opinion a little more, I'm OK with that.
    3. Re:Programming by SteveWoz · · Score: 3, Informative

      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.

      --
      OK a new size TV
    4. Re:Programming by Anonymous Coward · · Score: 2, Insightful

      Or start with the important life lesson. Teach him hex numbers and then show him how to open his favorite save game file with a hex editor and improve his cash position. :)

    5. Re:Programming by 93+Escort+Wagon · · Score: 4, Funny

      You didn't tell if he actually is interested in programming at all. Because if he isn't, he will never be.

      Exactly! He may, for example, be more interested in girls. And if he knows how to talk to a girl, he probably won't amount to much of a programmer anyway.

      --
      #DeleteChrome
    6. Re:Programming by Inda · · Score: 3, Funny

      BASIC. BASIC. BASIC. That's how I started, aged 10.

      I typed pages and pages and pages of code I didn't understand. And when my "A" shaped man wouldn't climb up the italic "I" ladder, I got really pissed off. Radio controlled cars were much more fun.

      15 years after that, when my first child was born, I had a ton of staying-in time and I started to learn Java. But that was boring and didn't do anything I wanted it to do.

      HTML and Javascript was next. I got <breally</b> good at that.

      So get him a decent radio controlled car, tell him to wait 15 years, get married, have a child of his own, then write silly Greasemonkey scripts all night. There's so much fun to be had from auto-submitting forms.

      If you want any more advice...

      --
      This post contains benzene, nitrosamines, formaldehyde and hydrogen cyanide.
    7. Re:Programming by lastchance_000 · · Score: 4, Funny

      HTML and Javascript was next. I got <breally</b> good at that.

      +1 for unintentional irony.

    8. Re:Programming by Zalbik · · Score: 3, Insightful

      Great advice! I also tried to teach my son to program, but he wasn't interested. I think the 'key' is to find something he is interested in that he has to learn to program to do it.

      No you asshat, the 'key' is to find out what your child is interested in that they show aptitude at and nurture that. Attempting to force your child into some preconceived mold in order to enrich some deranged sense of proxy-succcess you get through your child's achievement is just wrong.

      Your children do not necessarily enjoy the same things you do. Deal with it.

    9. Re:Programming by geminidomino · · Score: 2, Funny

      Has nothing to do with the lack of a man page. It's because females' decision-making control structures are all non-deterministic.

  3. javascript by emj · · Score: 2, Informative

    with canvas you can easily get graphics, and you can do network stuff.

    1. Re:javascript by sopssa · · Score: 2, Insightful

      I hope you guys are kidding. First of all, javascript is an awful language. Secondly, I really fail to see how he would have fun in creating javascript stuff. It's a web programming language, not something a 12 year old should be using to have fun messing around and maybe trying out some 3D stuff.

      C#, Delphi or Visual Basic are a lot better languages to start with, with their easy to use language, large library and a language you still get somewhat nice results with little programming. It's also a lot easier to move from those to other languages later if need to, because they're fundamentally same unlike javascript.

    2. Re:javascript by Arancaytar · · Score: 4, Funny

      a web programming language, not something a 12 year old should be using

      From some of the Javascript code and web pages I've seen, it seems to be perfectly suited for 12-year-olds. :P

    3. Re:javascript by peragrin · · Score: 4, Insightful

      while java script isn't a good place to start it is doing something they are interested in and that would be web pages.

      You start where you have an interest and move from there.

      --
      i thought once I was found, but it was only a dream.
    4. Re:javascript by Ken_g6 · · Score: 2, Informative

      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.

      --
      (T>t && O(n)--) == sqrt(666)
    5. Re:javascript by uradu · · Score: 2, Insightful

      Javascript not a great suggestion for the OP, that I can second. But an awful language? You either don't REALLY know js beyond some simple HTML even handling, or your definition of "awful" is different from mine. The more I use it as the primary programming language for dynamic, heavily web service oriented web apps, the more I like it. It's one of the most expressive and flexible languages, something completely belied by its deceptively simple syntax. Then again, that's a trait it has in common with its syntactic granddaddy, C, which also fooled a lot a people with its perceived dearth of keywords. Anyway, js can be summed up with one word: closures. Until you wrap your mind around what all can be achieved, js may indeed seem like an awful language to you.

    6. Re:javascript by Phroggy · · Score: 2, Interesting

      It's a web programming language, not something a 12 year old should be using to have fun messing around and maybe trying out some 3D stuff.

      That hasn't stopped people from trying out some 3D stuff.

      --
      $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
      $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
  4. plain C, python, or ruby by bcrowell · · Score: 5, Insightful

    There's nothing particularly wrong with plain C as a first language. (I'd avoid all the intricacies of C++ syntax for a first-timer. The OO stuff is, in my opinion, totally unnecessary for a first-time programmer to learn.)

    Another good language for first-timers is a scripting language like python or ruby. (I like perl, but perl's syntax is goofy, and if he does want to explore OO at some point, it's better to learn it in a language that uses more standard OO syntax.) I've used python as a teaching language in the past, and it works fine.

    One thing to think about is what programming projects he's interested in doing, and make sure he's set up for success. A lot of kids that age want to program games, but programming a real-time video game requires a *lot* of skills. Whatever project he wants to do, make sure you have a combination of OS, development environment, and libraries that will work.

    1. Re:plain C, python, or ruby by dunkelfalke · · Score: 3, Insightful

      IMHO everything is wrong with C as first language. It gives you dreadful programming style and is not a right tool for application programming. You can mod me as a troll if you want but you've got to chose the best tool for the job and C is a tool for writing operating systems for fuck's sake. It isn't even a high level language. All those buffer overflow security holes happen because of both typical "clever hack" C programming style and choice of using a language for writing operating systems to write business applications.

      Pascal wasn't a very good teaching language for nothing - it forced you to write software in a very clean and readable way.

      --
      "It's such a fine line between stupid and clever" -- David St. Hubbins, Spinal Tap
    2. Re:plain C, python, or ruby by tomhudson · · Score: 4, Interesting

      IMHO everything is wrong with C as first language. It gives you dreadful programming style and is not a right tool for application programming. You can mod me as a troll if you want but you've got to chose the best tool for the job and C is a tool for writing operating systems for fuck's sake. It isn't even a high level language. All those buffer overflow security holes happen because of both typical "clever hack" C programming style and choice of using a language for writing operating systems to write business applications.

      So teach him assembler as a first language, and EVERYTHING else will look simple in comparison!

      Seriously, start him with either the java console (system.out stuff) so he can do "Hello, world!", or start him with html+javascript.

      Programming today isn't like when we were kids. In those days, you did whole applications with ONE technology and ONE package - dbase, clipper, turbo c, delphi, dbfast ...

      Now? The database is decoupled from the app logic. The app logic is decoupled from the presentation, which could be a program or a web app. We wanted separation of the storage from the logic from the front end, and we're there. The kid will get more fun doing simple web pages that he can see results in right away (important to get that positive feedback going, or he'll go back to his psp or wii or xbox or whatever). html+javascript gives him that, plus you don't need anything to start except a web browser and a text editor, - not even a web server.

  5. Python+pygame by sammyF70 · · Score: 5, Insightful

    If he has any interest in programming, then Python in combination with pygame is probably the way to go. Python is easy to learn, and pygame will give him instant visual (and audio) gratification. The instant gratification part is the really important bit if you want to keep his interest up.

    --
    "DRM is like the Ford Pinto: it's a smooth ride, right up the point at which it explodes and ruins your day."-C.Doctorow
    1. Re:Python+pygame by cibyr · · Score: 3, Insightful

      This is the answer. In starting off with pretty much any programming language, you screw around with strings, do some match, maybe make a GUI with some buttons and stuff... With PyGame, you can make games! Or at least, you can put graphics on the screen, move things around, make noises and it's easy... but not restrictive.

      Logo (and programs like GameMaker and its ilk) get the first bit right, but once you want to do something that isn't moving a turtle around you're somewhat stuck. But with Python, you can do pretty much anything. And it's portable too! You can write a script in Python on your computer and run it on your phone (if you've got a Nokia, at least).

      --
      It's not exactly rocket surgery.
  6. Parallax Propeller micro controller kit. by twisting_department · · Score: 2, Interesting

    Get him a Propeller micro controller kit from Parallax Inc http://www.parallax.com/tabid/407/Default.aspx A Propeller is a 32 bit micro-controller (well in fact 8 processors in a chip) with some RAM. Parallax have a number of ready made boards so that this thing is easy to program from USB. The IDE is dead easy to use. Starting out the first steps in programming with this is inspiring because one can immediately get things in the real world to happen. From flashing LEDs to controlling robots, to generating video. The high level language it uses, Spin, is sort of Pascal/Python/C like, very easy to begin programming with. When you get serious it's assembly language is about the easiest there is. The Propeller does VGA and TV video, there is even a games oriented kit. It's the closest thing we have to the C64 we have in this modern world. Wish I had one when I was 12.

  7. FreeBASIC by duke4e · · Score: 2, Interesting

    I whould go with FreeBASIC (+FB IDE) It's open source, it's fast, it's pretty close to QBasic, but has pointers, OOP and all other modern language stuff. Also, tons of libraries are supported (OpenGL, etc...)

  8. Cold, hard X86 Assembly. by Rod+Beauvex · · Score: 5, Funny

    You don't want to raise a sissy, do you? DO YOU?!

    :D

  9. Perl by metlin · · Score: 5, Funny

    It has to be Perl, of course.

    That way, he'll either write Haikus and become a rock star programmer, or write Haikus and go raving mad and prove the rest of Hilbert's unsolved problems.

    Either way, you'll have Haikus, either as errors or from your brother. You can't go wrong with that!

    1. Re:Perl by Anonymous Coward · · Score: 2, Insightful

      all trolling aside...

      Perl is designed to be a 'natural' language, kind of like the ones we speak. A 4 year old can speak English, and senior scientists use the same language to discuss very advanced topics. Perl is like that. He can learn it very fast and do neat things and not have to worry about the lower level constructs. But when he's ready for those, they are there. And the transition into C from that point will be very smooth.

    2. Re:Perl by Eravnrekaree · · Score: 3, Insightful

      Seriously, perl is the first language i really learned well and would be a great choice.

      I would also recommend seriously just HTML and then later throw in javascript to build on that. it can lead to really fast results to catch interest and has a lot of immediate application in the trendy werb page design/myspace kind of development.

      Perl, it is actually easy to learn and well documented. There are few quirks but it is easy and more powerful than other languages. One just needs to remember to start off each program with $|=1; to turn on autoflush on stdio and to remember that when doing $var=func(); the return argument will always be the last returned. A few rules but nothing really that difficult to remember.

      C/C++ might be better avoided witha newcomer. It could exceed the attention span with those younger programmers. A good GUI builder which can be used in a simple manner is also a good idea. TK is relatively simple but there may be simpler toolkits to use.

      To really capture interest, the programming has to be straightforward and lead to instant tangible resutls so lots of additional code and formalities and having to type lots of intitialisation and set up code, can blow them out.

  10. 6502 was good enough for Woz! by theodp · · Score: 2, Funny

    Paper tape reader sold separately... :-)

  11. Re:I wouldn't recommend BASIC by Shaiku · · Score: 4, Insightful

    Who gives a fuck what Dijkstra says? Modern variants of BASIC are nothing like the '70's and '80's BASICs he was complaining about. A lot of programmers made and still make a good living in VB. I'll bet a significant fraction of /.ers started off in QBASIC, GW-BASIC, PowerBASIC, or VB. The rest of us probably started with the BASIC interpreters built into our "Home Computers."

    You have to learn to walk before you can run. I know a lot of first-time programmers who gave up on Python as a first programming language. It's just too complex and the concepts are too abstract for a lot of people with no prior experience. And you can argue me until you're blue in the face about how you don't think it should be so, but that ain't gonna change the way it is.

  12. Python + a Logo-inspired module = cool! by YA_Python_dev · · Score: 3, Informative

    Python is a very good suggestion. Be sure to check out the turtle module (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.

    --
    There's a hidden treasure in Python 3.x: __prepare__()
  13. Free Pascal and Lazarus by WolphFang · · Score: 2, Informative

    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

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

    --
    leather-dog muksihs
    Blog: @muksihs
  14. Lego Mindstorms by ebbe11 · · Score: 3, Interesting

    It must be fun, otherwise he won't continue doing it. And building robots and making them do things is fun. But there is of course a price to pay - literally.

    --

    My opinion? See above.
  15. Stagecast and Alice by VeryLargeNumber · · Score: 2, Informative

    I know two programming environments, designed specially for children. One is Stagecast Creator http://en.wikipedia.org/wiki/Stagecast_Creator, 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), 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.

  16. ALICE from CMU by Proudrooster · · Score: 4, Informative

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

    1. Re:ALICE from CMU by rrossman2 · · Score: 2, Informative

      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

      There's a lot more demos of Alice projects on youtube as well

  17. Re:at 12 I learned HTML by Dogtanian · · Score: 3, Insightful

    HTML fascinated the hell out of me, so i tried it

    HTML hardly constitutes "programming" in any reasonable sense. That's not to disparage knowing it as a skill, but regardless of what some people think, it's not programming.

    made some Pokemon websites

    Okay, now you've definitely blown your case. ;-)

    --
    "Slashdot - News and Chat Sites Deviant". (Click "homepage" link above for details).
  18. Go with ActionScript 3.0 by CrazyJim1 · · Score: 3, Insightful

    Actionscript is like C/C++, but with protection from some of the nastier stuff. Also, if you want to get straight to displaying graphics, I haven't found a language as easy to do that with. The most important thing is that Flash games are actually pretty cool so if you become a master in Flash over the years, you can crank out some games. I coded Basic since the Ti-99 in 82, through C64 basic in 85 to GW basic in 91 to quick basic in 92. C/C++ from 95-2009, and now I'm on Flash which I picked up in a week.

    I think the secret to any object oriented language is to avoid complex memory references as much as possible, and just stick with dumb arrays and procedural programming as much as possible. I'd say it is possible for a person to code in Flash without knowing any OO concepts at all as long as they have someone to spoon feed them the basics. Another tip: If you code small chunks at a time, you almost never get caught blinded by where the bugs could be... They're most likely in the new code you wrote!

  19. HTML and Javascript by Eravnrekaree · · Score: 2, Interesting

    Seriously, start with HTML. It gets you instant results right away and he can see his work coming to fruition quickly in designing his own web pages. To really capture interest it can help to show the practical purposes of programming rather than making iot all so abstract. Lots of set up and initialisation just to do something can really blow out many new programmers, if there is a lot of tricky work to do simple things. HTML and javascript allow you to see results fast with little initialisation crap. Instant gratification can help capture their interest and the web page thing allows them to quickly realise the value of what they are doing. Write some HTML and publish it on myspace or on fortunecity for the world to see, tis instant payback.

    Start to teach javascript and you get instant feedback. Javascript happens to be a very simple, clean, dynamic typed language perfect for a newbie. Show them how to use the javascript and debug console in firefox to debug their code. More instant gratification from making their own little web applets that can be made instantly available to world .

  20. Re:C# Surely. by A+Friendly+Troll · · Score: 3, Insightful

    For one thing, it uses words instead of symbols ;)

    "if x and not y then foo" is much easier for a beginner to understand than "if x && !y foo".

    Having endured some programming classes at the university with people who never had any programming experience, two things could immediately be observed as problems: people kept forgetting which symbols are used for what and few could grasp pointers (one of the reasons why C sucks for beginners).

  21. Javascript IS very good by Nicolas+MONNET · · Score: 2, Insightful

    - It's the fastest scripting language around.
    - There's plenty of doc and examples
    - It's on every computer
    - It's useful right away
    - It has some very interesting constructs such as closures
    - The OP mentioned Basic -- even if you take those tired old cliches about JS at face value, it can't possibly be worse than Basic. No fucking way.

  22. Interactive interpreted languages by Nitewing98 · · Score: 2, Informative

    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.

    --

    Nitewing '98

    Everything works...in theory.

  23. Game Programming with Blitz MAX by kervin · · Score: 3, Informative

    Game programming with Blitz Max was the way we went. There is actually a book called Game Programming for Teens 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.

  24. Re:small asm, C, C++, python - in that order. by squidfood · · Score: 2, Interesting


    Followup to my last post: another suggestion in asm-type space (if you don't want to start with electronics) is to download a corewars emulator (or perhaps a similar Robowars type game) and beat each other up in core/logic space for a while. I remember a real "aha" when I learned about Imps, Dwarves, and self-modifying code in general that way.

  25. Greenfoot by brainburp · · Score: 2, Informative

    Greenfoot: http://www.greenfoot.org/about/ 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

  26. First place to start isn't even near a computer... by macraig · · Score: 3, Insightful

    If you want to teach a kid programming, the lessons shouldn't start anywhere near a computer at all. Start with visual problem-solving "toys" like LEGO, Tinketoy, ErectorSet, ConneX, and the like. This will be an opportunity to observe and find out whether the kid takes well to the activity or even has a mind well suited to it (I have known people who simply cannot program no matter how hard they try). If the kid isn't well suited for it or doesn't like it, then you can move along to something else; if the kid is a natural or takes a real shine to it, give them a few years' time with that to build up a suitable problem-solving framework upstairs, and THEN introduce them to computers and programming. At that point I would suggest a strongly typed and structured language, like Pascal/Delphi.

  27. Does no one get it? by fractalboy · · Score: 2, Interesting

    Poll a few hundred English lit professors about which one novel you should start with to get a kid into the classics and you are going to get a few hundred very different and extremely opinionated answers. Put them all in the same room, and you'll get a lot of interesting arguments about it too.

    My opinion? I've taught kids aged about 8-17 programming languages at summer computer camps for over 10 years, and I have otherwise been an educator for a while. Despite my own preferences and opinions, the truth is that unless you try to start someone out on INTERCAL, language doesn't matter. It's not like Bobby would have become a phenomenal programmer, except you erroneously chose Language X to start him off with, and he hated it, so he became a hair stylist instead.

    If someone doesn't do well at all with C++, while BASIC for example might be less scary, in my experience it makes no difference to reapproach programming with the different language. At least as far as making a difference between having a real interest/performance, and the distinct lack thereof. If someone is going to "get" programming, they'll be able to get it with any common programming language. Period.

    Furthermore, a kid's understanding of a programming language is going to depend much more on the quality of the tutoring/teaching/etc. methodologies, but that's another topic for another time.

  28. I've built an 80s era 'lab' to teach my son by RonMcMahon · · Score: 2, Interesting

    I hate the fact that there is SO much intermediation between the keyboard and the actual machine in our current computing environment (when it comes to teaching the fundamentals of computer programming). I doubt that our programming models will ever actually return to the intimate connection to hardware of the 80s, which is fine, but when it comes to teaching the fundamentals of the interaction between the instructions and the actual machine / chips there is a lot less between you and the machine when developing in an 8-bit world. A single wrong character can bring the whole system to a halt, or cause really unexpected behaviours that are often not seen in our compiled / checked / verified modern programming environments. There is also a lot less help from the system in developing, so if you do take to it, it is because you enjoy the challenge despite the obsticles and clear limitations of 20-year-old hardware.

    I've built up a 'lab' with old Atari, and Commodore 8-bit machines. My son is learning Atari and Commodore Basic and Atari LOGO. For Christmas he wrote a Christmas greeting in Atari LOGO, which really required him to dig in to recursion and integrating the application's behaviour in to an internal mental model, so I'd call this approach a success.

    I find it interesting to see the comments on PYGAME here...I'll have to investigate as eventually I'll want him to move to the next level where he is using 'modern' languages once he groks the basics and wants to do something that he can share with his peers via email.

  29. Re:small asm, C, C++, python - in that order. by hedronist · · Score: 4, Insightful

    I've been fortunate enough to mentor a couple of prodigies. The key is not to Go Big, or Go Small, or Go Bare Metal, it is to go where their interest lies. If they really want to know about electron migration through a solid state material, Hell, go for it. But if they are interested in how to generate a web page, that's where you start.

    If they get hooked and you start to work together on really interesting problems, you will eventually get into all of the classic core problems of program development: design, platform choice, networking, deployment, security -- you'll get to all of these eventually.

    My vote for a first language is Python. I also suggest starting with Guido van Robot as an interesting starting point. Even older kids will understand that this is just a starting point and they may zip through the problems in a matter of days or even hours. You will encounter limitations in terms of functions, looping, etc., but that can be a springboard to how you do it in real Python.

    For Windows I found the Aptana environment (Eclipse + PyDev plugin) to be easy for kids to understand.

  30. Re:small asm, C, C++, python - in that order. by squidfood · · Score: 2, Insightful

    Woah, skipping a few steps, are we? I hope he built an ALU and then a microprocessor before that!

    You jest, but (also in answer to other replies) I was more suggesting interesting parallel tracks rather than something proscriptive - a 12-year old can get it.
    If your 12-year old likes learning things by reading, a really really good resource is A.K. Dewdney's Turing Omnibus - a non-major comp-101 level text that's really REALLY good at describing everything from electrons and bare metal to theory and practical coding. Puzzle-oriented and v. accessible to pre-high school nerds.

  31. Re:I wouldn't recommend BASIC by ElectricTurtle · · Score: 2, Funny

    When I was 12 decided I wanted to learn how to program. (Nobody came to me and asked, I just had my parents take me to a library and I picked up some books.) The only thing available to me was QBASIC (Version 1.0 on MS-DOS 5.0), and I taught myself by reverse engineering programming examples (I didn't really want to read the books cover to cover, and I didn't know any programmers). This was in the days before I had any real access to the internet, and so I essentially 'doodled' programs based off my rough, 12-year-old self-taught understanding for 2 years. When I did get regular internet access, I found more programs and reverse engineered them too. After a year of that, I decided to try to take all my self-taught bad habits and learn a 'real' language like C++.

    It kicked my ass.

    At that point being a programmer was what I 'wanted' to do. I had already spent years on my own, and really enjoyed programming, but I had developed so many bad habits, such an incompatibly warped way of thinking vs. programming for real applications, I couldn't hack it. I was, not for lack of trying, a miserable programmer who could never become a professional. I gave up, threw it all away, and have spent my professional life over the last decade in support, and I likely will never dev again.

    --
    I support the Slashcott and will not be reading or commenting from 2/10/14 to 2/17/14. Beta is steaming pile of dog shit
  32. Getting their interst with simple fun by darthlupi · · Score: 2, Interesting

    If you don't mind giving the youngster a somewhat graphical and simple approach to programming, I highly suggest using Game Maker. It is a graphical game creation tool that also includes it's own scripting language that is very easy to get a hang of.

    One of the more interesting aspects is that anything that is done with the icons or Drag and Drop items can be done through scripting creating a nice staged approach to learning programming.

    It was created by a professor named Mark Overmars as a teaching tool to get children interested in programming.

    http://www.yoyogames.com/gamemaker/

    It has very basic OOP functionality built in with child and parent objects, and you can actually create some pretty interesting applications with it. The problem is that is a bit too fun and you will need to encourage your child to use this solely as a launching pad and not a final destination.

  33. GNU Robots is a great start by Jim+Hall · · Score: 3, Informative

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

    1. Re:GNU Robots is a great start by Jim+Hall · · Score: 2, Interesting

      Thanks!

      Actually, the original plan was to use a simplified version of assembly (based on 6502 assembly) to construct your robot. But I quickly realized two things:

      1. I was spending way too much time writing and debugging my interpreter
      2. It was becoming much too complex to write a simple robot program

      I think you'd have the same problem with C or C++.

      So I looked around for another way to do it, and found the Scheme interpreter (GNU Guile). Since my Robots program was already being written under the GNU GPL, GNU Guile seemed a perfect fit. It had all the hooks to make writing the rest of the Robots game easy, and users would be able to write programs in a language that already existed. From there, RMS accepted my Robots game as "GNU Robots".

      The down-side was that I know nothing about writing LISP or Scheme programs, so when I was done writing GNU Robots, I couldn't create any robot programs with sophisticated algorithms. Bummer. That's why my demo robot programs in GNU Robots 1.0 were so simple.

      I envisioned that someone would help me create a tile-based programming concept, where "actions" were represented by "tiles" (for example: "move forward", "turn right/left", "pick up object", "fire gun", ...). The programming GUI (basically an "IDE" for a GNU Robots program) would let you connect tiles to each other using "wires" (in the resulting Scheme program, it would be tail-recursion, similar to a "GOTO".) There'd be certain "if" tiles that would let you branch to other tiles (probably a combo tile like "look ahead, if enemy less than _ squares away..").

      Alas, I wasn't able to pull that together. It's still not there, AFAIK, so if anyone wants to write such a thing, I'm sure the current maintainer would thank you.

  34. How to teach the love of programming by Walkey · · Score: 2, Insightful

    First, does your brother show any interest or at least curiosity in computers? This is a pre-requisite.
    If he does show curiosity then you must first try and understand what motivates this curiosity.

    Is he interested by the looks of an application, is he interested with the creativity, is he interested with how things work?
    The answer to this question will entirely change how you should approach your self-given task of teaching him to program.

    When you have found out his main motivation, then you need to tease his curiosity further by giving him simple examples of things to do and helping him to achieve this. Onl then can you start figuring out which language might be best.

    Personally I started with Logo (http://en.wikipedia.org/wiki/Logo_%28programming_language%29) - in my opinion the best language ever to get started with great ease with a key advanced programming concept: recursion. Then I went on with Basic (eek) and Pascal (great). Pascal (non-OO) was indeed very educational in that it allowed for great creativity and helped understand how a simple language actually worked (including insight into how compilers function).

    But soon, like you suggest, you need to get to a full blown language for a wholesome experience. Nowadays the choice is wide. Personally I would veer towards an interpreted language with an easy GUI toolkit. Python + Qt sounds like right the thing to me - but then again I'm sure you can make it happen with pretty much anything available.

    The key to teaching is not so much what is being taught but how it is being taught. If your brother is having fun, he'll learn anything. If he sees you having fun, he'll learn it quicker again. So you both need to be enjoying what you teach him (you must be familiar with whatever language you choose to teach him) and you must find ways to make it enjoyable for him too (with pragmatic and quick results to begin with and gradually increasing difficulty - it is essential that you teach him the basic problems: sorting, recursion, human-machine interfaces, how memory allocation works, you'll soon talk about multiple threads or tasks and dead-locks, live-locks...).

    Enjoy.