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

799 comments

  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 thoughtfulbloke · · Score: 1

      Python works very well where the child wants to solve a problem (my 11 year daughter learned it for doing image analysis for a science fair project).
      1) Explain general data types: string, number, file, etc
      2) Explain syntax: make something equal to everything after the equals sign
      3) Explain control flows: 2 equals is the comparison
      4) Explain objects: heyYou.doThis(withThis)

      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.

    4. Re:Python by Anonymous Coward · · Score: 0

      Whether you choose python or something else, you could start fiddling around here before going through the hassle of installing a development environment.

    5. Re:Python by Anonymous Coward · · Score: 0

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

    6. Re:Python by Anonymous Coward · · Score: 1, Interesting

      Get LabVIEW
      www.ni.com
      It's used alot for test engineering. Very useful programming language can do a lot of things with it. It;s a GUI programming interface, easily to learn. Like all programming languages hard to master.
      Get a lego mindsotrm kit. It has it a GUI interface. You can get labview kit to program your mindstorm too.
      Also Matlab is very good too. It like C, but more engineering focus. You can do alot of cool educational thing with it like slowing down sounds and stuff and do FFT on the data.

    7. Re:Python by Anonymous Coward · · Score: 0

      I seriously +1 for python.
      easiest language ever invented and yet powerful enough to make lots of things
      lots of libraries available etc.etc...

    8. Re:Python by Anonymous Coward · · Score: 0

      I started with Visual Basic 5 in my 10th year or something.
      after around a year of playing with it my programs got bigger and bigger and some "simple things" took like ages to happens.
      I then decided to move to C and here I am after 12 years, I still code everything in C because it's just faster/more flexible/more portable than anything else I tried.

      learning a simple language such as python will provide him a good grip of "practical algorythm" while avoiding the pitfalls of the complex C language.

    9. Re:Python by bradt · · Score: 1
    10. Re:Python by digitalunity · · Score: 1

      My first language was BASIC on a Commodore 64. After that was Fortran and then eventually C and C++ on Windows, and then C and then C++ on Linux.

      BASIC was a good stepping stone, but I really wish I would have started with Fortran as it was much easier to learn concepts with. I found the peek/poke memory concepts of the commodore 64 very frustrating.

      --
      You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
    11. 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.

    12. Re:Python by Anonymous Coward · · Score: 0

      Yes. I wrote a python version of scrabble in 9th grade, (a little older than your brother). Alternatively, PHP. Teach him HTML to start out with, and then ramp up to PHP. PHP is dead simple to learn, and can do cool stuff.

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

    14. Re:Python by Anonymous Coward · · Score: 0

      So don't teach him to program, or he'll grow up to be a major douchebag?

    15. Re:Python by Brickwall · · Score: 1
      I was going to suggest Visual Basic as well. It's pretty easy to understand the code, and you can do useful things with it. I'm not suggesting VB is as powerful as other languages; it isn't. But it introduces the idea of objects, and YOU CAN READ THE CODE.

      My biggest complaint about languages like C++ is they were designed by engineers who don't like to type. So they created lots of cryptic acronyms that make sense to them and don't require good keyboarding skills. I don't think a 10-year old would ever understand "grep" or "awk", for example, no matter how patiently you explained it. I think it's way too hard to get a young child to understand the condensed code AND learn the programming concepts. Let him work in something closer to natural language first, and then when he has a basic understanding of programming, move him up to something more sophisticated.

      Or, you could be extraordinarily cruel, and try to teach him Lisp.

      --
      What was once true, is no longer so
    16. Re:Python by Surt · · Score: 0

      A najor douchebag that wasn't evolved against.

      --
      "Who is the Journal of Quantum Physics going to believe?" --Stephen Hawking
    17. Re:Python by tbmoore · · Score: 1

      You might look at Snake Wrangling for Kids or perhaps at How to Think Like a Computer Scientist.

      I second Snake Wrangling for Kids. I've been working through it with my 8 year-old son and think it's great, especially for a free download.

    18. Re:Python by thetoadwarrior · · Score: 1

      If it's a pre-built machine some do come with Python installed as the OEM uses it for their own bundled software.

    19. Re:Python by Anonymous Coward · · Score: 0

      If you try python I'd suggest you to skim the pygame tutorial, then teach him the basics of python, let him learn the details and more obscure features while writing his own games.

    20. Re:Python by thetoadwarrior · · Score: 1

      That would be awful for Python. Python doesn't use curly brackets but instead uses whitespace. You can't tab in ideone because it's a textarea in the browser.

      Sure you can C&P into ideone but what's the point? I'm not sure if the standard Python distro comes with it but installing the active state python distor which has Python Win. http://www.activestate.com/activepython/

      It's basically Notepad with the interactive Python shell so you can open it and just type code and watch what it would do (same as typing python in a command prompt) or write a whole script, save and run it. It's very lightweight and doesn't really hold you hand.

    21. Re:Python by mwvdlee · · Score: 1

      I went from BASIC on the C64 to assembler on the same computer. I think assembler is a great way to actually learn what a computer is, the only trouble is that it isn't easy to get something fun on screen.
      What you probably need is a language which lets you get to fun visuals the quickest.

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    22. Re:Python by Caesar+Tjalbo · · Score: 0

      I didn't use peek and poke, my BASIC was gw-basic on ap PC, but I found interpreter BASIC frustrating in general. It didn't bother me (at least not until I got QuickBasic, Turbo Pascal and Turbo C) because it was wonderfull how I could move sprites across the screen, build my own menu system (this is Windows v2 era) and make other kids envious of my EGA graphics adapter by switching the screen to 640 by 300-something and display all 16 colors and then change the palette to show the other 48 in a loop.

      That's what is was about to me, what I could do with it. Pointers in C were frustrating too at first, just like setting up the Turbo Pascal editor, but ultimately it didn't matter.

      I wish I could have started with Python and be exposed to all those concepts like 'structured programming' and 'object orientation' from the beginning, although linenumbers and nifty jumps through the code had their charm aswell.

      --
      "I'm not much interested in interoperability. I want substitutability. I want to be able to throw your software out."
    23. Re:Python by zippthorne · · Score: 1

      Matlab is like fortran.

      --
      Can you be Even More Awesome?!
    24. Re:Python by Anonymous Coward · · Score: 0

      I highly recommend Python (freshman in a CS program here and loving using Python over Java or C++ right now) and I'd recommend this book - it's free!

      Python for Software Design: How to Think Like a Computer Scientist - http://www.greenteapress.com/thinkpython/

    25. Re:Python by spintriae · · Score: 1

      You, sir, are a gentleman and a scholar.

    26. Re:Python by oliderid · · Score: 1

      When I was 12, all I wanted to do was cool 2D animated stuffs. I fear that Python as such may be a bit too dry for a kid (I'm far from being a python expert ;-)) Why not Lingo? (Macromedia Director) http://www.deansdirectortutorials.com/Lingo/programming.htm (I don't know this language, but it seems to me that the syntax is pretty straightforward)

    27. Re:Python by thetoadwarrior · · Score: 1

      Python is an excellent choice. It's very easy to learn and you can do a lot with it.

      The down side is it's very easy to do a lot without writing a load of code (not that you're going to get a kid to love programming by writing his own code to parse xml).

      It depends on the person but as dumb as it may seem I've seen people w ho dislike Python because of its lack of curly braces. Some people learn one way of doing things and get stuck in what they've learned (even university based learners) so it may be worth introducing him to something like JavaScript too. JavaScript can allow him to do things on the web quickly, has curly braces, is popular and is (in some ways) pretty awful which will make him appreciate Python even more.

    28. Re:Python by Fascist · · Score: 1

      I started with BASIC on a 1980's era Amstrad CPC. It is a fine language for learning on, but if the goal is to move to a more structured language like C, then BASIC is possibly a little sloppy. I got frustrated with the line numbering, as any subroutine calls had to be made via gosub which made it tedious when editing and adding lines. Sure renum renumbered and took gosubs into account, but something like pascal or C just felt more intuitive in that area to me.

      I'm not sure if pascal is taught as a beginners language anymore either. I did pascal in high school, but the first thing my programming lecturer said to those that had done pascal programming before, was to forget everything we'd ever learnt before learning C.

    29. Re:Python by onepoint · · Score: 1

      I also went from basic to 6502 assembler on the c-64. I was lucky ( i think ) I liked numbers and was able to incorporate the graphics of the c-64 and then went on to speed the dam programs up with assembler ( I guess I was a natural optimizer )

      I think back, if I wanted to do it over again, I would want to see graphic results and easy graphic routines, it inspired me to do a lot of wacky fun things. hell I can recall that I spent somewhere in the range of $140ish for a basic compiler in 1983 ( i think ).

      so at the end of this, ask your child what would be of interest to them about the results of working on the computer, it might just be that he (she) wants math answers LOL

      --
      if you see me, smile and say hello.
    30. Re:Python by 0BoDy · · Score: 1

      someone else has already seconded this -- so I'll just add My $0.02us. I like that python has strict rules on coding style. Also -- while python has a lot of good features, I'd definitely suggest (to you student) that C be next, so that he'll appreciate python better, and know a classical language as well.

      --
      Can I be a Luddite too?
    31. Re:Python by Atzanteol · · Score: 1

      I've never understood why people consider it a 'minor' complaint that white-space is important in a language syntax for scoping. Proper indenting hasn't been a problem for *years* with decent editors and IDEs with curly-brace languages. Why somebody saw fit to 'solve' this problem with the language syntax is beyond me. It also makes copy/paste and other issues a real pain in the ass.

      --
      "Ignorance more frequently begets confidence than does knowledge"

      - Charles Darwin
    32. Re:Python by mattack2 · · Score: 1

      You call it dumb, but the indentation-based scoping is definitely something that has made me less likely to learn Python (though I will likely eventually use it for a work project). While I agree that code should be indented (consistently, though exact rules are a matter of opinion) for human readability, I don't like that it is forced on me and would require re-indenting things to add a quick test change for example.

    33. 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
    34. Re:Python by mikael_j · · Score: 1

      I don't think a 10-year old would ever understand "grep" or "awk", for example...

      I'd have to disagree, while I wasn't a *nix user at age ten I was at that age coding SV-BASIC and Z80 asm as well as having little trouble editing autoexec.bat and config.sys on various custom boot floppies for different games (No sound card required? No need to waste memory on that then!) and I'm pretty sure I'm not unique in having picked up such things at that age.

      If the kid is actually motivated to learn it then he/she will.

      /Mikael

      --
      Greylisting is to SMTP as NAT is to IPv4
    35. Re:Python by Corporate+Troll · · Score: 1

      I don't think a 10-year old would ever understand "grep" or "awk", for example, no matter how patiently you explained it. I think it's way too hard to get a young child to understand the condensed code AND learn the programming concepts.

      And yet, 20 years ago we did exactly that.... What has changed is what we aspired to... I was happy to be able to write a "Donkey" clone in a higher level language (not BASIC). Kids these days see GTA4 and want to code that and that's simply not going to happen.

      I guess your sig is all too true in this context.

    36. Re:Python by JBdH · · Score: 1

      Unless he owns a mac and learns to program with NodeBox. Instant gratification, jeez, I wish I was 12 again, if only to be able to use this stuff.

    37. Re:Python by Bigjeff5 · · Score: 1

      There isn't much you can't do with VB, and you don't need the hacks with anything newer than VB6 (which was released in 98).

      C# is virtually identical to VB, but it might be better to use if you want to transition into C/C++ as it has the same general syntax rules. Curley braces and all that jazz. The IDE gives a lot of help, which makes it easier to remember what you've taught them. Eventually you can turn the little squirt into a hard-core text-only programmer if you want, and he'll definitely have a leg up in the job market if he ends up going that way when he grows up.

      --
      Security is mostly a superstition... Avoiding danger is no safer in the long run than outright exposure. - Helen Keller
    38. 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.

    39. Re:Python by somersault · · Score: 1

      the first thing my programming lecturer said to those that had done pascal programming before, was to forget everything we'd ever learnt before learning C.

      That seems rather extreme. The control structures and basic syntax are very very similar (just there are often words in pascal where you would find a punctuation mark in C).. and most of the variable types are similar, with the exception of strings. I think the main problem I've had in the past when switching between the two is simply to remember to use := instead of = for assignments.

      I started off on Amos BASIC on the Amiga (and some BASIC on the Commodore 100, BBCs and Macs before that, but the Amiga was when I got really interested at around the age of 11), and since then have done various projects with a some C/C++, a fair amount of Delphi, and more recently I've mostly been doing PERL generated web apps which I've started to spruce up via JavaScript.

      --
      which is totally what she said
    40. Re:Python by davester666 · · Score: 1

      Are there still Logo implementations around?

      --
      Sleep your way to a whiter smile...date a dentist!
    41. Re:Python by Toonol · · Score: 1

      Having significant whitespace formatting is enough of a problem in my eyes to keep me away from the language. It seems like an absolutely ludicrous design decision. That is obviously a personal preference, since many excellent programmers don't mind it... but it's a personal preference that I have NO desire to overcome.

    42. Re:Python by Anonymous Coward · · Score: 0

      Microsoft QuickBasic with mac System 7.1 on a Macintosh LC. That's how I taught myself anyway. And yes - I just happened to be 12. Self taught with an old 1970's ish BASIC programming manual and using the included examples on floppy disk. Yes I said Floppy Disk!

    43. Re:Python by icebraining · · Score: 1

      Proper indenting hasn't been a problem for *years* with decent editors and IDEs with curly-brace languages.

      Many people still don't indent, despite having decent editors, and you can't/shouldn't change their indentation if you're working with them, or for them. Maintaining code style consistency is more important, so if they're not going to change, you have to code it their way too.

      As for copy-pasting, I have no problems with it; if it's code from the same project, it's indented the same way, so it just works. If it's a snippet from the web or so, my editor converts tabs to spaces on its own (it's not like I'm redistributing patches to upstream in those cases, so I can safely change it).

    44. Re:Python by mechsoph · · Score: 1

      LabVIEW makes easy things easy and hard things impossible. Those responsible should be drawn and quartered. Matlab sucks too.

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

    46. Re:Python by stoolpigeon · · Score: 1

      Both books I mentioned above rely pretty heavily on Pygame. I think it provides the fun factor you are thinking about. I think there are a lot of good options, but that is one more that makes Python my preferred choice. I really like that it is a language I use myself pretty regularly, which makes it that much more valuable as a teaching tool.
       
      This week-end I busted out a little Python to figure out some information my wife couldn't get from the lame software that came with her GPS watch. Fortunately it had an option to export the data and I took it from there.
       
      Then I can turn and use those same tools to teach programming to my daughter. Very cool.

      --
      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?
    47. Re:Python by newtown1100 · · Score: 0

      seconded.
      Python is a great beginner's language and when you use NodeBox it brings in a rather fun component into the mix.

      --
      nonexistent sig
    48. Re:Python by Anonymous Coward · · Score: 0

      Agree with python as a great teaching language.
      It's also a great "glue" language, allowing you to control lots of other things. (From remote control hardware to Maya, Blender, etc.)

      For instant visual gratification, you can also jump into OpenGL with python without too much difficulty.
      Great for teaching fundamentals of geometry, and figuring out why math can be useful.

      It's good at teaching OO programming without being too "pure".

    49. Re:Python by Joe+Mucchiello · · Score: 1

      I felt the same way before I tried Python. The whitespace requirements really are not such a big deal. My only remaining issue with is it is terrible for posting code snippets to the web since not all sites allow you to use the PRE tag.

    50. Re:Python by Mista2 · · Score: 1

      For me, i started with BASIC on my Sinclair Spectrum, but what really heled were some good books with samples and an old Usborne book on how to write dventure games. I think for my kids, the issue will be setting the expectations lower. They want to crank out 3D first person shooters on the first day. I also thought maybe doing scripted objects for something like the Sims, but hard to get started on at a basic level. Logo is good as a basic starting instrution set, but maybe Applescrip is the closest you get to the easiest Basic script and run system now. Maybe a good use for an old second hand G4 Mac mini - their own real computer to just hack around on.

    51. Re:Python by gander666 · · Score: 1

      I have to jump in here. Both have uses, (labview really does suck, and make shit MUCH harder than it needs to be) I use Matlab still, a LOT. It is great for data visualization, and to emulate simple systems, as well as complex control systems with its add on packages...

      But for an environment to teach some one not yet in their 'teens? nuh uh. Nope, not going to go there...

      Get an old Atari 8 bit system, get a floppy drive, get the logo cartridge. And be happy. Then you can add Atari Basic (not too great, but it does the job) and then Basic XL (all this stuff is pretty darned cheap, just avoid E-Bay) and you can really get a good programming foundation.

      I was looking not too long ago for a good Pascal environment for either the mac or a PC. Never found it, Really bummed. If anyone knows of one, please let me know...

      --
      Suppose you were an idiot and suppose you were a member of Congress ... but I repeat myself. - Mark T
    52. Re:Python by Mike610544 · · Score: 1

      I'd say show the kid assembly and C first (briefly.) Explain how the CPU registers work and how C abstracts some of that away. Then move on to Python and point out some of the additional things that happen automatically. Write some programs together that do interesting things in Python. It might be more appealing with some perspective into just how powerful high level languages are.

      --
      ... also, I can kill you with my brain.
    53. Re:Python by Anonymous Coward · · Score: 0

      Stay as far away from python/php/ruby as you possible can. Python has ruined far to many students to even be considered. The CS department where I teach shifted away from C/C++/Pascal/Fortran to python. The physics/chemistry/biology/mathematics found that there students were unable to do simple programming tasks, which students were able to do previously. Previously you could ask a student to write a simple program to test Runge-Kutta methods for solving ordinary Differential Equations or to write a simple program to determine the optimal ratio of space to time step for a wave equation solution. For both these examples student who learned C/C++/Forrtran could write a 30 line program that rarely had programming mistakes, but did have the expected mathematical conceptual errors., the students who had learned python did even know where to start let alone get working code over the two weeks given for the assignment.

    54. Re:Python by voltore · · Score: 1

      I agree completely. VB is a perfect learning tool, and step to C++ (etc). The concepts are all there, and there's plenty you can do that will give an instant, visual result - exactly what a child wants to see as a result of his/her work - then they'll want to learn more.

    55. Re:Python by Anonymous Coward · · Score: 0

      http://www.diveintopython.org/ - awesome book for learning Python, IMO.

      Having said that, at 12 years old I learned Pascal. Syntax aside, it's close enough to C in most aspects that I don't see why he can't learn C, if that's where you think he should end up.

    56. Re:Python by Anonymous Coward · · Score: 0

      Python is unfortunately fundamentally broken in certain ways. It will be difficult for anyone whose initial exposure is to Python to grasp concepts like lexical scope, for example. And it is built on a lot of ad-hoc rules all of which have arbitrary and unpredictable exceptions. Don't get me wrong; it's a good language for developing software in, but it's not so great for learning programming.

      A better option, if you are serious about teaching programming rather than a specific language, would be something that was actually designed for teaching programming. Scheme is a good choice; specifically the PLT variety, which is widely ported, has a large library, and comes with an excellent IDE that was specifically designed for educational use.

      Unlike Python, Scheme was designed with a formal specification, not cobbled together according to a single person's whims. It is based on a very small number of rules that are put together in predictable and consistent ways to produce a complete language.

    57. Re:Python by AigariusDebian · · Score: 0, Troll

      Yeah, right. Sell him to the slave drivers early on. While QuickBasic was a useful educational tool, VB is nothing more than a dead old factory for producing business software in Windows, for Windows. There is no fun in it.

      Follow the original posters suggestion - Python all the way. It is much more readable and much more flexible than any basic ever was. AND it does not tie you to the Microsoft universe with a rusty ball and chain.

    58. Re:Python by JetTredmont · · Score: 1

      I have a 13-year-old daughter who has expressed an interest in learning how to program. I'm starting her off with Alice, which avoids the syntax problems and frustrations. Right now she's just playing around with it, but we have "Alice in Action with Java" to transition from Alice to Java as she hits the limits of that system.

      We debated between the "Hello World" book and Python, and the Alice route, but decided that Alice would more likely keep her interested in the near term while exposing her to basic logical constructs (looping, event-driven programming, object orientation). From there, we'll either let her continue in Java or bring in the Hello World book and introduce Python.

      That's our plan, anyways.

    59. Re:Python by meiao · · Score: 1

      I learnt C++ as my first language. I read a book and got it all wrong (writing code in .h files for instance).
      By the time, information was scarce and the internet was just a sea of porn (wait, it still is, but you wouldn't find anything else useful).
      Now I wish I learnt to program in Ruby.

      My cousin was trying to program in Python. I answered a lot of his questions by IM. Thing is, he got confused by Python's identation.
      I think it is a bad thing to new programmers. Also he doesn't speak english (we're brazilian) so there is few free material for him.
      Ruby wouldn't solve this problem. But I think it is easier to understand the code in ruby.

    60. Re:Python by Khyber · · Score: 1

      practically everything is a fourier transformation anyways, what's the big deal?

      --
      Still waiting on Serviscope_minor to wake up to fucking reality and realize that Jessica Price isn't going to fuck him.
    61. Re:Python by mrtwice99 · · Score: 1

      +10 for python. Here is a great python tutorial for kids his age: http://www.briggs.net.nz/log/writing/snake-wrangling-for-kids/

    62. Re:Python by geminidomino · · Score: 1

      My 11 year old nephew is the same way. He called me up last week asking if I could "show [him] how to make a Guitar Hero game". In typical geek fashion, I went into a long, dry explanation about the reasons you can't just dive into those things, blah blah blah. I got the impression I was disheartening the kid tho, so I sent him a link to a Python book for kids and didn't tell him I'd gotten him the UCreate games thing for Xmas (I was on the phone when he opened it. I simulatenously won best present of the year and best uncle of the year. ;) )

      If he gets frustrated because of not being able to do the blockbuster 50-million-dollar type games, then it's probably better for him to not get into it.

    63. Re:Python by Pikoro · · Score: 1

      If you are looking for teaching general programming whilst not being entirely language specific, check out CeeBot

      From the page: CeeBot is a brand new concept with which you will learn programming while having fun. The programming language you'll use is very similar to those used by professional programmers to develop their products. CeeBot introduces many modern concepts found in today's most popular environments like C++, C# or Java. After teaching you the syntax of CeeBot, progressive exercises will lead you to use important concepts such as variables, loops, conditional branching, functions, classes, objects, etc.

      Basically, it's a programming learning environment masquerading as a game. They also seem to have different versions based on age and/or skill level.

      --
      "Freedom in the USA is not the ability to do what you want. It is the ability to stop others from doing what THEY want"
    64. Re:Python by TakeyMcTaker · · Score: 1

      stoolpigeon is exactly right. The only thing I have to add, just to reinforce that Python is the right teaching language, is that it was first developed based on a language (ABC) that was designed specifically for teaching kids how to program.

      http://www.linuxjournal.com/article/5028

      "Guido: Yeah! So a language like Python, which actually has roots in educational languages, will do better. Python is very strongly inspired by a language called ABC; I worked on the ABC implementation designed by colleagues of mine in the early '80s. It was a wonderful language for teaching. The history of Python comes out of the frustration I had with that language when it wasn't being used for teaching, but for day-to-day ad hoc programming—but that's a different story. Python inherits a lot of that focus to make it very simple, easy to understand, easy to remember and easy to learn. It's a very good language to start teaching. We are very hopeful about that side of the CP4E effort."

      Also, instead of jumping straight from Python to C, you could use Cython as a bridge, and use it to teach variable typing basics.

      http://www.cython.org/

      If I were teaching programming today, this is the order I would use: HTML, Python Scripts, Python Modules, Python GUI, pygame, Cython, C, C macros, C libraries, C compiler optimization, assembler... and maybe yacc, or just general compiler design. Tangential languages like Perl, Java, Ruby, and C++ can be introduced at any point, to show different implementations of concepts first learned in Python, but they are all optional. If anyone gets stuck somewhere before compiler design, let them stay there as long as they want. Everyone has their own pace.

    65. Re:Python by roto3 · · Score: 1

      If a high-level language like Python works for what he wants to do, then there isn't any reason to ever give it up. Code doesn't become magically better when it's written in C. Good, fast, and stable code for many applications can be written in high-level languages too.

      If he goes on to become a proficient programmer, he will recognize that sometimes it is necessary to go to a lower-level language, whether it be for performance, linking against C libraries, or writing system code or plugins that must be directly executable. When that time comes, he'll learn C or something else. If he never gets to that point because he's satisfied staying at a higher level, then what's the problem? He'll have developed some great high-level programming skills he'd never have if he lost interest because the learning curve of a lower-level language was too steep.

      The most important thing is that he learns stuff that keeps him interested. There is no perfect way to learn everything there is to know about computer science, so let him explore in the directions he wants to go. If he gets "corrupted" by a particular approach, then he probably didn't really have the interest to become a computer scientist in the first place.

    66. Re:Python by kafka.fr · · Score: 1

      Are there still Logo implementations around?

      KTurtle : http://edu.kde.org/kturtle/ My 8-years old son really enjoyed playing with it, after giving him a few basic informations. Amazing how children can try and discover by themselves.

    67. Re:Python by While1Smile · · Score: 1

      Hello All, I fully agree about Python as "first" programming language for a primer: with this aim if you like browse here “Snake Wrangling for Kids” is a printable electronic book, for children 8 years and older, who would like to learn computer programming. It covers the very basics of programming, and uses the Python 3 programming language to teach the concepts. http://www.briggs.net.nz/log/writing/snake-wrangling-for-kids/ Happy New Year to Everyone:-)

    68. Re:Python by emilper · · Score: 1

      Javascript + Greasemonkey ... at 12 years, I suspect it will be a lot more fun to mess with web pages than to mess with registers. Otherwise, Perl + Moose + WWW::Mechanize, just tell him about robots.txt

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

    70. Re:Python by Anonymous Coward · · Score: 0

      mod parent +1 funny

    71. Re:Python by Anonymous Coward · · Score: 0

      Those two resources are great introductions. Nodebox is a good way to get kids interested, as noted here: http://dailypython.blogspot.com/2009/12/in-case-your-kids-didnt-get-everything.html

    72. Re:Python by mwvdlee · · Score: 1

      Basically, find out what the kid would WANT to program, then find the easiest language to get there.

      I remember doing Logo turtle graphics at school before I had my first computer. It may not be real programming, but it was just fun to see that repeating "draw 1 unit, rotate 1 degree" 360x would create a circle. And from there on to more complex things.

      I "drew" pictures by scripting out all the Logo instructions on paper at home, which was about the time my parents realized that computers might be something I'd like. 20 years later and I'm a professional programmer.

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    73. Re:Python by geminidomino · · Score: 1

      Thirded. Sent it to my nephew last week.

    74. Re:Python by RKThoadan · · Score: 1

      I gotta say that in many ways I never truly grokked Object Oriented Programming until I tried some Ruby. I could do it, but somehow it never really clicked and felt natural. It wasn't until I saw Ruby turn an integer into an iterator with 5.times.do that OO suddenly just clicked for me.

      As a bonus, if you want to teach Ruby you call always use the famous Why's (Poignant) Guide to Ruby. I have a feeling a kid would love it. It's too bad _why has disappeared, but the Guide is still around.

    75. Re:Python by AlphaBit · · Score: 1

      I absolutely hate that python enforces whitespace as part of it's syntax. I'm myself am a stickler for readable formatting, but I'd rather not have my language tell me how to do it.

      Still, lets not pretend that, "Proper indenting hasn't been a problem for *years*". I know (and work with) plenty of people who work in IDE's that somehow manage to totally mangle whitespace.

    76. Re:Python by DuckDodgers · · Score: 1

      I don't think the analogy you chose illustrates the problem. I've found my software development skills, such as they are, improved in all of the programming languages I know when I learn a new language. Even if I never use Haskell or Python at work, learning bits of them helps me to be better with C and Java.

      Sadly, the same analogy does not apply to dating. ("Natalie, I only went on those dates with Rachel McAdams and Anna Faris in order to become a better partner for you. Really.")

      Now maybe you can argue that if I learned Python (or Ruby, or Lisp, or whatever languages you think are 'best') first, I would have no benefit from learning C, Java, or Pascal later. I don't know, in my own case I did not learn those languages first.

    77. Re:Python by Phred+T.+Magnificent · · Score: 1

      Python isn't a favorite language of mine, and I'd much rather start with Ruby or even Perl. But. Take a look at Snake Wrangling for Kids, and Python may well turn out to be your best starting point.

      --
      Where is the wisdom we have lost in knowledge?
      Where is the knowledge we have lost in information?
    78. Re:Python by felixhummel · · Score: 1

      I agree. http://www.pygame.org/ is a cool lib to create games (which could be a huge motivation for a 12 YO).

    79. Re:Python by ElizabethGreene · · Score: 1

      It depends on what he wants to do. The first programming language a person learns really isn't that important. The big thing is to get them into the idea of making computers do what they want.

      How about starting with Alice http://www.alice.org/ for a while, and then a step up to Java? Stanford has an intro to Java class on Youtube that is pretty easy to follow, especially if you have the basic ideas down.

      -ellie

    80. Re:Python by AlSweigart · · Score: 1

      Hi, I'm the author of "Invent with Python". I'd like to go into some more details about the book.

      I wrote this book because I noticed there was a lack of "by example" programming tutorials for Python that young adults could follow along. I first learned BASIC from a book which presented the complete source code for games (think Byte magazine or those books on http://atariarchives.org/ )

      It seems that most "4 kidz" programming books were focused at too high of an abstracted level (RPG Maker, game creation kits, etc.) and didn't go into actual code. I wanted something at the level of BASIC (but without BASIC's hang ups). Each chapter of the book focuses on the complete source code for a small game and explains the concepts from there. The first several chapters of the book use ASCII graphics for their games (tic tac toe, othello, hangman, etc.) and the later chapters go into graphics and sound (Pygame makes it very easy). The book skips some topics that aren't necessary for these basic programs (OOP, recursion, most of the standard library's modules, even file I/O). The book is meant to be an introduction that gets the reader creating programs as soon as possible.

      What I noticed was that Python makes writing these games much easier than BASIC ever was and Python really should become the modern replacement for the niche that BASIC had. Also, Python is a real language (unlike game creation kits) and can scale up to the professional level (unlike BASIC).

      Oh yeah, and if you check out the book ( http://inventwithpython.com/ ) the web version is always more up to date than the PDF version. Thanks for the traffic Slashdot!

    81. Re:Python by Alpha830RulZ · · Score: 1

      I'm pretty sure I'm not unique in having picked up such things at that age.

      You're not unique, but you are unusual. I helped in my son's 5th grade class when they used NQC (not quite C) for programming lego style robots, and most of the kids struggled a bit, despite this being a class of brighter kids. One of the kids picked it up immediately, but he is certifiably genius material (5th grade at 8 years old). My son, who is just your average run of the mill 99th percentile student, was able to accomplish the robot tasks, but didn't really grok the larger 'program' thang.

      On the larger topic, I think python is a pretty good choice for teaching kids. The NetBeans IDE will likely be a good choice when they get the python addons stable (don't know if they are yet, a few months ago they were rocky. If you're not scared of spending a little money, the Komodo IDE from activestate is a good IDE for Python/Perl.

      I also think VB would be a good choice, again if you're not afraid of spending money, but anyone trying to teach a 12 year old programming is likely to be teaching them Linux soon as well, and VB won't be portable.

      --
      I was taught to respect my elders. The trouble is, it's getting harder and harder to find some.
    82. Re:Python by jocknerd · · Score: 1

      Was your daughter featured in Python Magazine recently? I just read an article about a girl who used Python to analyze the colors of leaves of some kind.

    83. Re:Python by Mike+Buddha · · Score: 1

      It also makes copy/paste and other issues a real pain in the ass.

      Ctrl-V, TAB or Shift-TAB.

      Wow, that's a huge inconvenience. You're right. What other minor nuisances would you like to inflate?

      --
      by Mike Buddha -- Someday the mountain might get him, but the law never will.
    84. Re:Python by Anonymous Coward · · Score: 0

      Sounds like a few of you little girls don't know how to use :set listchars and :set list properly

    85. Re:Python by Atzanteol · · Score: 1

      It's easy to tab - but not quite so easy to ensure things are at the *right* tab depth. With curly braces it's always right. Copy/paste then "ctrl+shift+f" corrects everything... It would seem the Python (and ruby) developers are inflating the "problem" of poorly indented code.

      --
      "Ignorance more frequently begets confidence than does knowledge"

      - Charles Darwin
    86. Re:Python by Atzanteol · · Score: 1
      *Who* in this day and age doesn't indent? That's gotta be such a small percentage of morons. All major IDEs have default indenting. These idiots would need to work *around* that and if they're that stupid to try then they're unlikely to succeed.

      I'm sure there are ways to work around the problem of using white space for scoping. But why the developers saw fit to *create* this problem is well beyond my comprehension. Curly braces solve the scoping problem very nicely. Better than "begin/end", white space, etc. Frankly making a developer worry about white space is just plain stupid.

      --
      "Ignorance more frequently begets confidence than does knowledge"

      - Charles Darwin
    87. Re:Python by mfnickster · · Score: 1

      I recommend Hello World! which uses Python.

      Also recommended: How to Think Like a Computer Scientist

      --
      "Slow down, Cowboy! It has been 3 years, 7 months and 26 days since you last successfully posted a comment."
    88. Re:Python by wzzzzrd · · Score: 1

      Well, from today's point of view python seems like the right choice. This question just reminds me of when I started hacking, I was about the same age (11 I think). All I had was a kc 85/4 (picture of a kc 85/4; about the kc 85 series,) which was, much like the c64, programmable in basic (yes, you could use the OS of a kc 85/4 to write in machine language, but hey, I was 11). And no, I'm not dead, I just smell funny (my way of saying I'm OLD). Anyhow, I gather from my own experience, that the language you start coding in doesn't matter at all. All that matters is the desire to program that darn computer after you saw (mostly through games) what is possible if you only knew how to write code.

      And hi to any of you other LKCC guys out there, just in case any of you reads /.

      --
      On second thought, let's not go to Camelot. It is a silly place.
    89. Re:Python by thetoadwarrior · · Score: 1

      Many don't indent and they're generally the sort that shouldn't be programming either.

    90. Re:Python by Hognoxious · · Score: 1

      Call me old fashioned, but if something is syntactically relevant I'd prefer it to be visible.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    91. Re:Python by 0BoDy · · Score: 1

      you're old-fashioned!

      --
      Can I be a Luddite too?
  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 originofstorms · · Score: 1

      Enter: logo! http://en.wikipedia.org/wiki/Logo_(programming_language) Instant gratification language! One who begins to program with logo immediately sees interesting results, so I think this would be a good litmus test to see if the kid gives a damn at all. Worked for me!

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

    3. 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.
    4. Re:Programming by SoTuA · · Score: 1

      Logo FTW! I started on Logo when I was 10 or 11, at the new computer labs in my school. Then my father got us an Atari computer and we started doing basic (in between Montezuma marathons :) and... flash forward twenty-odd years, and I'm coding for a living.

    5. 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
    6. 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. :)

    7. Re:Programming by stimpleton · · Score: 1

      "You didn't tell if he actually is interested in programming at all

      Expanding on that a little, the period of discovery might be over with computers and hence programming. When I was 15 my school got 4 CP/M based machines and 2 apple IIe's. It was a time wonderous discovery of new things, and to get there students did it themselves.

      With all this stuff being a natural part of a kids life now, I do wonder if that desire to discover is not there so much.

      --

      In post Patriot Act America, the library books scan you.
    8. Re:Programming by Anonymous Coward · · Score: 0

      If you want him to be hooked on programming, them pick DarkBasicPro - it's free, and it's 3D......

    9. Re:Programming by Anonymous Coward · · Score: 0

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

      That's not true at all. A lot of it comes down to how it's presented, and how the kid thinks.

      I used to be a math major and eventually I switched to CS. I started finding the math classes to be so abstract and pointless, around the time of multivariable calculus and linear algebra. Now, nine years later, I'm reading two linear algebra books because I already have my reasons -- I'm going to be taking a course on parallel computing and there are applications for linear algebra in audio that I never knew of before.

      One of the two linear algebra books is an old school math book, very dense in topics covered but loath to present examples much less applications of the subjects. The other book is a little too friendly (and has that awkward transitional trying-to-include-the-internet thing), but it explains things well and by the end of the first chapter it had already shown me practical applications of linear algebra that I'd never heard of -- despite not even getting to the point of talking about matrices. The first book is exactly why I lost interest in being a math major, though I do have more appreciation for the story-like quality of how the various abstract things intertwine.

      Few people become interested in writing software simply for the sake of writing software -- they go into it because they imagine all the things they can make with it. If you teach someone a programming language by having them work on things that don't do anything they care about, they most likely will not develop an interest in software.
       
      Another option -- an underrated option, I think -- is to find fields of logic that they'd think are interesting, which most likely would be under the heading of discrete math. Starting them off with things like riddles that are really logic puzzles is a great way to get someone interested in thinking about logic, which leads to specific issues of data and algorithms. Those puzzles may have more appeal than "Hello world", and the kid would come to software (assuming he does) with a much better understanding of the basics than most professionals have.

    10. Re:Programming by fermion · · Score: 1
      In addition to the languages, it is also a question of what one wishes to teach. For instance, the current fad in programming is object oriented, so teaching these concepts can be very important. Alice out of carnegie mellon teaches kids to solve problems from such a perspective. It is actually quite similar to Visual Basic. In both cases, if a child can be taught to abstract physical concepts, for example that one can develop a basic leg that can be used for all animals with legs, then an important skill has been rendered. The thing with Alice is that the abstraction is age appropriate.

      Another concept that is important when teaching the 12-14 year old to program is that of a variable. I saw my classmates in college struggle with this concept and I felt lucky to have learned it a young age through programming. For this more traditional languages, such as BASIC, C, and FORTRAN are useful. The control loop with variables are very instructive. Even simple a simple swap is can teach a person important skills

      --
      "She's a scientist and a lesbian. She's not going to let it slide." Orphan Black
    11. Re:Programming by Hurricane78 · · Score: 1

      Because if he isn”t, he will never be.

      Sorry, but I know a bit about the topic, and that is just not true.
      Because you can make people be interested about something. Marketing for example is all about this. Leadership even more.

      There are some things that you have to know, to get someone motivated though.
      And there is the moral question if you actually want to manipulate someone that way.
      (Well, in reality, we do it all the time. Everyone you ever looked up to, did this. Not out of evilness. But it’s just natural. Everyone tries to dominate a bit. Men more than women. And nearly everyone does it in a good way.)

      But I already explained, how to motivate, in my earlier comment.

      Protip: If you push like a waste press, you instantly lose the game. Instead, be the light that pulls others in. :)

      --
      Any sufficiently advanced intelligence is indistinguishable from stupidity.
    12. 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
    13. Re:Programming by cjonslashdot · · Score: 0, Troll

      If you want him to grow up to be a hacker with little system design discipline, teach him C.

      If you want him to grow up with trade skills for writing corporate business code, teach him an OO language such as Java or Ruby, as these are the Cobol of tomorrow.

      If you want him to grow up to be a designer of rock solid systems, teach him scala or another functional language, and encourage him to think in terms of algorithms and patterns instead of code.

    14. 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.
    15. Re:Programming by tempest69 · · Score: 1, Interesting
      Microsoft has a project "small basic" which is of a similar niche. I enjoyed the environment. http://msdn.microsoft.com/en-us/devlabs/cc950524.aspx

      Storm

    16. Re:Programming by lastchance_000 · · Score: 4, Funny

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

      +1 for unintentional irony.

    17. Re:Programming by anorlunda · · Score: 1

      sopssa hit the nail on the head. Before teaching the boy *how* to program you need to pique his interest and motivate him.

      I have experience teaching introductory experience to adults. I always started with Visual Basic. In a single 2 hour session I taught them how to make a primitive Pong game that really worked. That gave the students enlightment that they could create something real and substantial. It built self confidence.

      VB was the best choice for the session. It allowed the students to succeed at something fun *before* they got discouraged or bored.

      A few of the students decided to go further in study of programming. For them, the next course could worry about the suitable learning language.

      The rest of the students didn't go the next step. Still, they enjoyed the experience and gained a little understanding of what programmers do. What more could a teacher hope for?

    18. Re:Programming by joshuao3 · · Score: 1

      I agree that the interest needs to be there. When I was 10 I taught myself BASIC, moved on to Pascal by 12, Assembly at 14, over to C, back to Java, etc, etc, etc. Once a programmer gets their feet wet with a couple different types of languages the sky is the limit, but something has got to "click" early on or it's just not going to work.

      I wish Logo were still available, because that would be perfect--instant gratification is what kids at that age like. You may even want to look at Macro programming in some of the MS Office apps since it provides fairly instant feedback in a controlled environment.

      --
      Monitor bandwidth usage on IIS6 in real-time: http://www.waetech.com/services/iisbm/
    19. Re:Programming by Gorobei · · Score: 1

      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.

      Damn straight - avoid C++ like the plague. It's a 20 year old POS mess that teaches bad habits from the get-go. Sort of like Fortran for the new generation.

      Half of software engineering is concerned with trying to fix the poison that is C++: design patterns? pointers? header files? linkers? partial template instantiation? raw datatypes?

      Sheesh, if fucking space aliens wanted to destroy our planet, lacking an FTL drive, they would have just sent us the C++ spec via radio.

      Yeah, Bjarne, I'm talking about you, you fucking traitor to the entire human race.

    20. Re:Programming by omb · · Score: 1

      VERY, very true, programmers are born, not taught, when I was teaching Computer Science I think we had about a 1% success ratio since unlike many subjects including Mathematical Computer Science, programming can not really be taught, yes you can help a programmer to become much better, teaching methods, models, tools, patterns, reviewing very good code, read Knuth's Web and TeX for example.

      You can lead a horse to water, but you can not make a programmer out of a non-programmer, their brain is wired differently!

    21. Re:Programming by westyvw · · Score: 1

      If you are going to recommend BASIC at least keep it modern: http://en.wikipedia.org/wiki/Gambas

    22. Re:Programming by omb · · Score: 0, Offtopic

      "before you get into heavy stuff like operator overloading or inheritance."

      Never get deeply into either, operator overloading just obfusticates function calls, and in C++ is simply a twee excuse for not making strings a first class type, huge design error in C++, every idiot I see is writing a new string package, since it took years(decades) to get StdLib standardised, so the idiots read that and think they should do it too. When I do a code review I read the code first and mark up all the re-invented wheels and demand an explanation for them, it is all NEW code that needs to be DEBUGGED.

      Inheritance is not the be all and end all of OO design, problem decomposition is. Mutual inheritance is (almost) always wrong and class heirarchies need to be simple and naturally follow the problem.

      If I tell a developer to analyse a situation and I get the response "I will go and write a class" I know I have a looser.

      Another word about tools, if confronted with a huge mass of incomprehensible C++, SourceNavigator, originally from Cygnus Solutions but OS'd bt Red Hat is really useful.

    23. Re:Programming by shentino · · Score: 1

      I think it's a mistake to call it computer science, when it really is more of an art.

      Software engineering is more apt in that it at least captures the essence of both.

    24. Re:Programming by adamziegler · · Score: 1
    25. Re:Programming by poopdeville · · Score: 1

      This is good advice. If you want a kid to get rid of sloppy thinking, teach him how to write proofs. Either use a fun math text book (like "How to Solve It"), or a functional programming language for this purpose. Functional programming strongly brings out the relationship between computation and proof -- every language is a constructive logic, and every program is a constructive proof (and vice-versa, basically).

      OO languages often obscure that relationship, since they often use the "wrong" evaluation model for a given type of proof. This leads to ridiculous things like "the factory pattern", when all you really need is to map over a collection. (That is, the factory implements a functor. You can do the same thing with 'map') Things that ought to be extremely easy become conceptually difficult. (Basically, the factory pattern abuses the class system monad to create a functor on classes. Try explaining this to a kid... you can do it, but you're going to have to give a crash course in FP or basic mathematics. Anything less is wishy washy BS)

      Functional monadism bridges the gap. Indeed, implementing a monad indirectly implements an "eval" function for the monadic type, in terms of bind and return. Every monad automatically comes with a join operation, and a map function too.

      In my experience, developers tend to prefer these ambiguous patterns over clear functional constructs. Until they see me get my work done in a quarter of the time, with fewer bugs, and greater clarity.

      You don't need to use a statically typed language to use monads effectively. Or even a functional language. But a functional language helps distill the idea. This is called "conceptual monadism", and is become an extremely common pattern in OO programming.

      --
      After all, I am strangely colored.
    26. Re:Programming by Bigjeff5 · · Score: 1

      Quite the contrary, now days it's "Wait, I can do that too? ZOMGWTFBBQ!!". It's still there, it's just different.

      --
      Security is mostly a superstition... Avoiding danger is no safer in the long run than outright exposure. - Helen Keller
    27. Re:Programming by thermal_7 · · Score: 1

      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.

      Or you could find something he is interested in and let him do that. I love programming, but I see a lot of people who do it and don't like it at all and they suck.

      It's not something you should choose as a career unless you really get into it IMO.

    28. Re:Programming by electrosoccertux · · Score: 1, Interesting

      I found my TI-83+ plenty motivating during my boring math classes (boring because I already knew, or was able to pick up very quickly, the new stuff we were learning).
      So I created a bunch of programs to solve all the things we were going to cover on the test. My teacher said if I had programmed them, I could use them.
      So I got to finish my test in 5 minutes and twiddle my thumbs while everybody else worked :). I wrote exhaustive programs that covered every single possible option or method that I would need to use for solving various stuffs. So it was just a matter of navigating through the menu, punching in the correct values, and writing down the answer. That was fun, also hats off to the teacher for not penalizing (but rather rewarding) creativity.
      I wouldn't worry about the fact that basic can be a mess-- he won't be creating anything large enough that matters. I usually knew what I wanted to program and could get it out pretty quick-- didn't need to bother with organization or "good coding practices". The important thing was that I began performing the mental exercise of having a nebulous need, and translating that into code, given the available options (IF, THEN, ELSE, STORE, etc). I tried picking up C++ when I was 12 but the syntax requirements were just far too much detail for me and were a huge barrier to entry. Basic didn't have any of that.

      Then of course your kid can sell the programs to other students for whatever they're willing to pay.
      It will be an important lesson for him-- he will find, at a very young age, what I did-- that people expect your computer skills and work and coding for free, and get frustrated when you tell them they have to pay (even just $5, in my case) for it.

    29. Re:Programming by Anonymous Coward · · Score: 0

      I'm pretty sure that was intentional/the joke.

    30. Re:Programming by phasmal · · Score: 1

      The advantage of Logo is that it teaches the abstract concept of "Programming" (instructing the machine what to do, using particular sets of words) and it does it in a way that gives the student an easy payoff (they get to see a turtle moving). It also gives a good grounding in understanding the construction of logic (I want it to do this, then that), so I think it's a great first language.

      That said, the interest is very geometrical/mathematical, and if that's not where your child's interest is, then you might miss the mark when they'd be possibly more interested if it involved a different subject matter.

    31. Re:Programming by Suzuran · · Score: 1

      > flash forward twenty-odd years, and I'm coding for a living

      So has your father apologized yet, or are you still not speaking?

    32. Re:Programming by Anonymous Coward · · Score: 0

      Bah. Steve Jobs gets all the female action he wants, and always has.

    33. Re:Programming by mysidia · · Score: 1

      Never get deeply into either, operator overloading just obfusticates function calls, and in C++ is simply a twee excuse for not making strings a first class type, huge design error in C++, every idiot I see is writing a new string package, since it took years(decades) to get StdLib standardised

      Overloading has useful applications for custom datatypes that have nothing to do with strings. I would agree beginners have no business worrying about it though. It's more like a thing you use if you are developing libraries for use by other programmers.

      Examples: arbitrary precision math libraries, arbitrary length 'bitvector' classes.

      I'm sorry you feel it inadequate about C++ not having a native string type, but this is by design.

      C/C++ is widely deployed, and standardization for new versions takes a long time, as industry players get to duke it out.

      Rolling your own string class or 'string wrapper' in C++ is very doable, sensible, and a better choice than using standard string, usually, as the StdLib string classes are fairly limited, have issues, and won't provide you with certain niceties, such as proper Unicode support.

      It's just a fact that C++ standard classes are feeble, and you need to do something like this for almost every program (unless you re-use your same custom String class for every one, or use one provided by your standard framework such as QString (QT), which is recommended).

      And the STL (Standard Template Library) is an even bigger embarrasment.

      In addition, no pattern matching, case-insensitive search operations, no equivalent to Java String class options such as equalsIgnoreCase, regionMatches, etc. You can't do a basic case-insensitive compare with a straight-forward method name in C++.

      The C++ string class is pretty much a feeble datatype with limited capabilities, and useless for real-world applications: it deserves to be re-invented, frequently.

      I'd be surprised to see some programmer get along with just 'string' and no use of the c_str() method, or [] element accesses, for quick and dirty comparisons, using standard C functions, or using STL-inspired hacks and iterators on their string class.

      Don't dare try to bring <algorithm> or <functor> into this. That's also a bad answer that C++ STL adds.

      Needing to get at individual character elements to do such simple things as case-insensitive comparison, matching, search, OR common transformations (turn a string into all uppercase), is a very bad answer, C++ StdLib string class sucks: in fact, it makes C's StdLib string functions look supreme by comparison.

      A little new simple code that might need to be debugged, is better than complex code bringing template specializations and elaborate STL algorithms, custom loops, too.

      I'd rather debug a custom string class with a few added methods for case-insensitive compares, then compare thousands of places throughout code, where a standard string class was used with a tight loop, eg

      string a, b="blah";
      ...
      for(it j = 0; j < a.length; j++)
      if (j >= b.length || a[j]!=tolower(b[j]))
      goto they_dont_match;
      ....

    34. Re:Programming by heironymous · · Score: 0, Redundant

      unintentional irony

      -1 for redundancy

    35. Re:Programming by Waldeinburg · · Score: 1

      Use the project to select the language, not the other way around.

      I agree! Every programming language I have ever learned started with a project as motivation: I wanted to make computergames - I learned C64 BASIC; C64 turned out to be hard to program but I still wanted to make games - I learned QBASIC; I wanted to make a website - I learned HTML; I wanted to make my computer collect information from some homebuild electronic device - I learned C... and so on.
      So: Instead of asking your brother if he wants to learn programming, ask him: "Wouldn't it be cool if <insert really cool idea>?"

    36. Re:Programming by Aokisensei · · Score: 1

      Bah. Steve Jobs gets all the female action he wants, and always has.

      And just look at OS X. Sigh.

    37. Re:Programming by nabsltd · · Score: 1

      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

      For most of us older people, it was much easier to "get interested" in programming, since many games/utilities/whatever came in the form of source code in a magazine that you had to type into the machine.

      After that, it was a small step to change the existing code (to add features, fix a bug, or whatever), and then on to creating your own programs from scratch. Today, when programs generally only arrive in executable format, it's tougher to make the transition.

      So, maybe the best place to start is with a game that can be modded easily, but isn't just a point-and-click to make the change.

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

    39. Re:Programming by Anonymous Coward · · Score: 0

      Yeah but he can't program.

    40. Re:Programming by Brad+Mace · · Score: 1

      I agree completely, glad to see a voice of reason in here. Submitter sounds a bit too eager to turn his brother into his little nerd minion. Kid is 12 and submitter is already dragging him into the c++ uber alles wars. It's not about this vs that language or platform or what *submitter* considers the One True Path. Just give him something where he can see results.

      The first things I played with were Logo and Hypercard, which I think used a variant of AppleScript. Neither is at all relevant to the real world, but they were good starting points. No fancy editors or tool chains, just a little coding for quick results. The only special feature I'd consider useful is syntax highlighting to help them spot mistakes. He's not going to be creating big enough programs that he'll need anything else, and he certainly doesn't need to be bogged down learning obscure vi or emacs commands or complex tool chains. At most an editor like jEdit or Notepad++ would be just right, probably with a lot of features disabled or just ignored.

      Next steps were javascript (again quick results) and programming my TI-82 (first programs that were actually useful, for math class). Then C++ in highschool, followed shortly by Perl. Learned PHP the summer after highschool, took classes on Scheme, Java, Haskell and Python in college. Of course I don't remember a lot of those now, and this kid probably won't either. So don't try and railroad him cause it won't work anyway.

    41. Re:Programming by afidel · · Score: 1

      Your comment sort of hits on why I dropped out of a CS program, I loved programming too much to ruin it by making it a job =) I first programmed in BASIC, then LOGO, then C and early C++ versions (my first C++ compiler was really a pre-processor for a C compiler if that gives you a clue) then onto a whole host of languages like JAVA, Eiffel, vbscript, shell, and a ton of others I'm sure I'm forgetting.

      --
      There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
    42. Re:Programming by Monsuco · · Score: 1

      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.

      A thinkgeek shirt had the reason geeks don't understand women

      $> man woman
      $> Segmentation fault (core dumped)

    43. Re:Programming by Anonymous Coward · · Score: 0

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

      Funny thing -- I got started in graphics programming from a BASIC program that appeared in Mad Magazine. Really.

      They published a program that would draw a picture of Alfred E. Neuman on the screen, with MAD (in the same font as the front cover of the mag) above it.

      Kinda clever. As I recall, there was a single set of DATA statements, plus a series of short BASIC programs for various OSes (DOS, Apple, Atari, etc.). The differences among them were to handle the various screen addressing schemes. You keyed up the version of the program that worked on your computer, then added on the common DATA statements that formed the picture.

      It was short and easy to follow and learn from. The one thing that puzzled me was that each line was painted twice -- once in one position, then a second time one pixel to the right. I saw no point in that.

      Some time later, I found the explanation in a graphics programming tutorial book. It turned out that, at that time, some people were using an RF modulator which let them use a TV as a display. Since the TV had a much lower resolution than even the most basic computer monitors of the day, it was possible that, e.g., a single vertical line might or might not show on a TV screen. So, by drawing the line twice, one pixel apart, you could guarantee that at least one of the two would appear on the TV screen.

      Not too shabby a design feature, considering the source was MAD.

    44. Re:Programming by JetTredmont · · Score: 1

      I never got into Logo myself (no computers at all until college, and then it was shell scripts to self-taught C to whatever else). However, I think that today the "turtle graphics" system is a bit too primitive to capture the interest of a middle-school-age kid. I mean, making a turtle draw a line on the screen is no longer something magical.

      IMHO, something like Alice or Scratch would be a much more promising introduction to programming concepts, with more "interesting" results (making 3D characters interact with each other and the user on-screen is a bit more likely to draw the attention of an average mid-schooler than recreating Spirographs on the screen).

      What do you think?

    45. Re:Programming by smitty97 · · Score: 1

      +1 for just get a RC car

      --
      mod me funny
    46. Re:Programming by Tesen · · Score: 1

      My first low-entry-barrier BASIC program was in QBasic. I wrote a war-dialer (hey, I was 11 and had just discovered my first BBS and wondered what else was out there).

      Logged connectable devices to a txt file, came back in the morning with my mum pissed as hell at me for tying up the phone all night and part of the morning. Didn't discover a lot, oh well. It was fun, taught me some stuff.

      Tes

    47. Re:Programming by Anonymous Coward · · Score: 0

      Where do girls who talk to themselves fall on this spectrum?

      Good programmer or lousy programmer?

    48. Re:Programming by Anonymous Coward · · Score: 0

      Visual Basic is the easiest compiled language I have ever seen. He can do many types of programs in mere seconds and do them in what used to take hours 30 years ago. It is the world's most popular RAD (rapid app development) language and what most schools who know anything will start a person on. You don't have to know how to do complex references but when you do that too is very simple. As a person who has taught 7 different programming languages to students I can safely tell you VB is the easiest.
      Another thing I like about VB is the cool phenomenon of people who have no interest in programming at all but once you show them a few things and how easy it is to do ~ catching fire with it and programming like crazy. If there were ever to come a day when they would tell me I could no longer teach VB as an introductory language I would say "Adios!"

    49. Re:Programming by plasticpixel · · Score: 1

      Teach BASIC to a child, go to jail. It's the law.

      I learned on BASIC in the 70's but looking at what's available now, teach something with some OO in it. Java, PHP would qualify in my book and comes with some great documentation/forums and other help resources.

    50. Re:Programming by antant007 · · Score: 1

      Im 16 and I would have loved to have been introduced to any kind of programming language at that age.

      --
      GENERATION 9882463: The first time you see this, copy it into your sig & add a random number to the generation.
    51. Re:Programming by Anonymous Coward · · Score: 0

      -1 for unintentional missing of intentional irony

    52. Re:Programming by cp.tar · · Score: 1

      Curiosity is always there, and therefore so is the incentive to learn.
      You just have to find what it is that the kid wants to do. It's motivation that's important; the rest will come of its own, and all you have to do is point at the right tools.

      BTW I consider Python a good choice for a programming language because its syntax is basically pseudocode; as of yet, there is nothing more legible that I know of.

      --
      Ignore this signature. By order.
    53. Re:Programming by cp.tar · · Score: 1

      Teaching the basic concepts is more important than anything else. The mere fact that computers can be programmed to do what you want them to do is the most fundamental fact most people never learn.
      Teach him to understand the basics and everything else, including the language choice, will come on its own.

      --
      Ignore this signature. By order.
    54. Re:Programming by definate · · Score: 1

      Thank you, the first sensible response yet.

      I think, most people, but especially the nerd crowd, have way too high a locus of control and perhaps too little an understanding of personality and psychology.

      The amount of parents who I have known in IT or similar engineering fields, who attempted to control/engineer their childs future which ended in disaster is staggering. When you attempt to control and force your children into doing something, they don't want to do, over time, you're likely to see them act out more.

      These people need to become a lot more zen, and realize there is no good or bad (within reasonable limits), and that they actually have little control. Instead by exercising less control, they are more likely to attain the results they were hoping to achieve in the first place.

      This doesn't mean you shouldn't guide, just that it should not be with a heavy hand, and instead perhaps you should let them guide you.

      --
      This is my footer. There are many like it, but this one is mine.
    55. Re:Programming by Angostura · · Score: 1

      My 7 year old daughter was quite interested in good old fashioned Logo. She worked out how to drive the turtle around the screen with the basic commands. Then I showed her how to use the basic loops and recursion to make fancier patterns. No idea if she will ever want to take programming further but she enjoys what she is doing and understands the basic 'a program is a series of commands' concept - so that's good enough for me.

    56. Re:Programming by NailerNforce · · Score: 1

      "You didn't tell if he actually is interested in programming at all. Because if he isn't, he will never be." This is a lie. I wasn't interested at age 12. I became interested after I started studying it at age 19.

    57. Re:Programming by Jedi+Alec · · Score: 1

      Heh, I remember doing that for the first time in a game called Zeliard. What's amazing is that there are apparently still people actualling playing it....now where did i leave my copy of dosbox?

      --

      People replying to my sig annoy me. That's why I change it all the time.
    58. Re:Programming by volpe · · Score: 1

      A mod point! A mod point! My kingdom for a mod point!

    59. Re:Programming by BobMcD · · Score: 1

      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.

      First, call your mom and your dad and tell them each that you love them. Next, call your therapist and reschedule that appointment you blew off.

      Finally, try and grasp that people posting to slashdot might actually find programming to be an excellent life skill to have. Sort of like teaching your child to properly wield a hammer, stalk game, catch fish, play sports, change oil, and any number of other things they probably won't actually like to do. A breadth of exposure to these sorts of things makes for a well-rounded person, which is part of a parent's job. Actually being good at the thing you're trying to teach your child is just a bonus. Even if the child grows up to be a PHB, this sort of exposure would mean he has some hint of a clue when dealing with software-related issues.

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

    61. Re:Programming by Anonymous Coward · · Score: 0

      I did programming in College, and I enjoyed it for a while, but it's something that I could never stay interested in for long. Why not teach your younger brother how to solder pipe, or wire up a three way switch? There's lots of satisfaction from working with your hands, and it'll prepare him for doing work in his own house someday instead of having to call a plumber or electrician to do "simple" work.

    62. Re:Programming by Norwell+Bob · · Score: 1

      Having made the same mistake with my oldest, I wish I had mod points for this guy. He is correct. Nurture that which your child is interested in... don't force him into things he has no desire to do. Guess what, maybe you're a coding geek and your son is going to be a football hero. Maybe you're a nuclear physicist, and your son is going to be a used car salesman. There's nothing wrong with any of that, as long as you bring him up correctly... with ethics, morals, respect for others, and ambition.

    63. Re:Programming by Anonymous Coward · · Score: 0

      Basic is how I started. Why deny a kid the joy/surprise/fear of creating his/her first infinite loop?

      arf
      arf
      arf
      arf
      arf
      arf
      arf
      arf
      arf
      arf
      arf
      arf
      arf
      arf
      arf
      arf
      arf
      arf
      etc

    64. Re:Programming by DuckDodgers · · Score: 1

      To some degree I think that's an issue of natural aptitude, but I also think it has to do with the introduction to the material. An engaging tutor who picks interesting examples can foster genuine interest. A poor tutor with dry examples can take an enthusiastic student and burn them out.

      I think this applies to just about every field of study. My last mathematics course in high school was Calculus, and I learned the material but the presentation was dry and tedious. My first mathematics course in college was on discrete math, with some elementary set theory, number theory, and similar introductory material. The professor was very engaging and the problems were all unique and interesting. I went from "I am studying mathematics because I do well in mathematics exams" to "I am studying mathematics because I find it interesting and enjoyable".

    65. Re:Programming by DuckDodgers · · Score: 1

      You wrote your response as though the previous person wrote "I also tried to teach my son to program, but he wasn't interested. So I beat him and made him learn it anyway." Since that's not what they actually wrote, you wrote an obnoxious response for no reason.

      Secondly, believe it or not children don't know everything. If you take a kid with no interest in wrestling or playing piano and have him attend wrestling practice or piano practice, he may decide he dislikes both. But he may develop an enjoyment of one or both and want to continue by his own choice. There are plenty of interesting activities - technological or not - that the kid actually has to start doing before they decide if they like it. You can't just describe swimming, or origami, or debate, or playing guitar in general terms and believe your child has made an informed decision whether to participate.

    66. Re:Programming by 0xygen · · Score: 1

      The abstraction does not help the individual to learn how the machine works though.
      To breed a new generation of actual technically interested kids who understand the lower levels of the machine and how the high level OOP abstractions actually execute on the hardware, I honestly believe you have to start at the other end.

      I feel all of my knowledge of creating efficient solutions to problems stems from having learned BASIC, got dragged into assembler through that, back up into C, onto C++ and OOP, then into Java and dynamic languages like Lua.

      Doing it the other way around seems to feel somewhat backwards to me, although I would certainly take the point that today's optimizing compilers are incredible, and the ability of high-level languages to create very efficient code in a relatively small amount of code are incredible. Maybe my desire to understand what goes on underneath leads me to program in particular ways that are not always suitable to high level and functional languages?

    67. Re:Programming by LSD-OBS · · Score: 1

      whoosh.

      --
      Today's weirdness is tomorrow's reason why. -- Hunter S. Thompson
    68. Re:Programming by Anonymous Coward · · Score: 0

      Along the same lines, though in a less contradictory sense... Get him involved in modifications to existing interests, such as some basic changes to an open source game (the input files now, later maybe some of the control/logic structures), or toy around with an example within a game engine. I was toying around with Doom mods long before I was able to actually write C/C++.

    69. Re:Programming by Wodenedow · · Score: 1

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

      +1 for unintentional irony.

      So, what I really want to know is...did that +4 funny (at the time I post this) come from people laughing at you or with you?

    70. Re:Programming by Anonymous Coward · · Score: 0

      So the guy is an asshat because he was trying to introduce his son to something new?

      Lighten up, Francis.

    71. Re:Programming by plasticpixel · · Score: 1

      I still have to disaggree with that point. 30 years ago, operating systems were much less evolved or even non-existent on systems. So languages like BASIC were useful tools to help abstract the human from the gory details of banging registers and (for me at least) a welcome step up from assembly.

      But these days, the focus is on applications and even operating system level tools are abstracted from the hardware using APIs. Fewer people need to know how to bang on the registers. Low level bit-banging is now a specialty and something that a student might spend a few extra years of their education diving into. IMHO it's no longer the foundation for computer programming education.

    72. Re:Programming by Anonymous Coward · · Score: 0

      Maybe, while my child is learning, it will be useful for her to visit slashdot. But then she'll encounter people like you who talk by saying "asshat". In the real world, I would take her to a place where people talk like that. Why do you have to do it here?

    73. Re:Programming by Anonymous Coward · · Score: 0

      An introduction to programming for any(one) child will improve their thinking capability. I intend to convince my freshman daughter to try python just to widen her range of problem solving ability. Programming experience not only provides another way of looking at a situation but also improves mathmatics intuition.

      Of the two boys before her, the second son could not comprehend variables at the same age the first son was rushing through Learn To Program Basic(TM). The first son has a degree in film production and is finishing a degree in philosophy. The second son is majoring in computer science on a scholarship.

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

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

    1. Re:javascript by cathector · · Score: 1, Informative

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

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

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

    4. Re:javascript by Anonymous Coward · · Score: 0
      JavaScript is a perfectly good language, minus two or three grand blunders (addition versus concatenation with + being one of them). It's just not all that great a development environment.

      But why feed the imperative paradigm? LISP, I say! Mwuahahahaha!

    5. Re:javascript by tinytim · · Score: 1

      +1 javascript

      If you're not careful, you can learn a lot of bad habits in Javascript since it'll let you do some fairly messy stuff. This is more than made up for by the lack of a "compile" step, easy and pretty UI, etc. It's easy to do fun little projects with Javascript. Use it to set the hook, then branch into more "formal" languages. If he enjoys programming, he's going to learn Javascript eventually, so you might as well start out with it.

      I can take an HTML/Javascript file with a interactive button and a text box and easily explain every line to most anybody. I can't think of a more important criteria.

    6. 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.
    7. Re:javascript by sopssa · · Score: 1

      But if they're interested in web development, doing stuff with PHP would be a lot better. You get to do a lot more meaningful things, like browser based games. Some simple games are really easy to develop using cookies and sessions, and when you need to you'll move to mysql and learn database programming along the way too. That's how I did too, because I was making fun things that needed to use databases. A 12 year old isn't going to learn database programming because he thinks it would be useful to him even if it doesn't interest at all, he learns it if its something he wants to use in his fun project (game or whatever).

      Hell, along the way you probably will learn javascript too to make the client side working more nicely.

    8. 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)
    9. Re:javascript by Anonymous Coward · · Score: 0

      First of all, javascript is an awful language.

      No, it's not. JavaScript is a simple, elegant language with some really nifty features, with a horrible runtime environment (web browsers with varying degrees of standards compliance) and an awkward model for doing things in that environment (the Document Object Model) grafted onto it.

      I suggest you read some of Douglas Crockford's writings. JavaScript: The World's Most Misunderstood Programming Language would be a good start.

      That being said, I do not think JavaScript is a good first language either, due to the two reasons I mentioned. But those are not faults of the language as such.

    10. Re:javascript by Anonymous Coward · · Score: 0

      Completely agree. There are tons of libraries that do all sorts of cool things, it's free, you get rapid feedback in a browser without introducing the complexity of the whole compile/run/debug cycle etc. Despite the language snobs, it is a pretty useful language, syntactically very similar to C and has some fairly nifty OOP capabilities. It contains all the basic data types, loop types, if/then/else and switch statements, Even the comment forms /* xxx */ and // are identical to C. Due to the very similar syntax, transitioning to C based languages will be much smoother as he won't really have to learn what all the language constructs do and can focus more on the hard stuff like pointers.

      It also has the huge advantage that it's web based which is probably something your brother is intimately familiar with and less likely to be intimidated by. It's also very forgiving because it runs in a sandbox and he won't spend hours rebooting his machine and tearing his hair out over why some line of code crashes his computer.

      Javascript isn't perfect, but it's accessible, provides immediate feedback, and is a good primer for more serious languages.

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

    12. 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;
    13. Re:javascript by DomNF15 · · Score: 1

      This is a double edged sword - on one hand, I want to agree with you about C# / VB .Net, the large and broad depth of the built in libraries are certainly a win if you don't want to get bogged down in details, like rolling your own RSA encryption/decryption mechanism for example. On the other hand, struggling through those kind of things are part of what makes a programmer "hardened", in my opinion. Additionally, while these managed languages are nice and all, it would also be good to infuse some memory management knowledge into the youngster. If we were talking about math, it would be like learning about geometry proofs. It might be a struggle, and might not be terribly useful, since you really just need the final theorem to do your work, but still a good exercise to go through that thought process, makes some rusty synapses in your brain fire, and what not...

    14. Re:javascript by Hurricane78 · · Score: 1

      First of all, javascript is an awful language.

      Could you please stop parroting that old and false statement? I bet you know shit about JS in the first place.

      Secondly, I really fail to see how he would have fun in creating javascript stuff.

      That’s your failure. I came up with many cool webapps. That he could instantly show others. The good thing is, that you get fast results with JS!

      But I agree that there are better languages.

      C#, Delphi or Visual Basic are a lot better languages to start with,

      Now you must be kidding!
      Visual Basic? Of all languages?? Why didn’t you think that to the end and said Intercal? ^^ There is no worse language to start with.
      Delphi? I am a pretty good Delphi programmer. And it’s an outdated piece of shit of a language. I am very happy that I could move on.
      C#? Yeah right. Tie him to windows right from the start. And do so with one of the ugliest language families in human history. C-based languages are nice if you want to do micromanagement. But it’s quite the opposite of a “my first language” language.

      In conclusion, one could draw tetrahedron. With VB, Delphi and C# as the lower points, and Intercal (as the natural conclusion of a merge) being the top end. ^^

      --
      Any sufficiently advanced intelligence is indistinguishable from stupidity.
    15. Re:javascript by Anonymous Coward · · Score: 0

      C# and Visual Basic only if you want to teach your littlebrother/son/daughter/etc how to be a slave for the Microsoft.

    16. Re:javascript by sopssa · · Score: 1

      And your point is exactly what? All you could do is list them and say theyre shit in your opinion. Next time maybe tell why you think so, and why they aren't good languages for a beginner. You can't jump on the heavy stuff right away, you have to learn the basics first and actually get interested in programming too. Especially true for a 12 year old.

    17. Re:javascript by Eravnrekaree · · Score: 1

      I second javascript and HTML. Javascript is a clean, simple language, dynamic typed without all of that extra memory management and other stuff to worry about as on C. Its high level and allows for simple code, and instant results without all of the extra set up and initialisation which can confuse new users. Stay away from Java, C and C++ for goodness sake.

    18. Re:javascript by Anonymous Coward · · Score: 0

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

      It is possible to attach Visual Studio to IE to debug JS.

    19. Re:javascript by Eravnrekaree · · Score: 1

      Doing some web stuff would be an instant turn on, especially if we wants to use some of this stuff on a myspace profile. Doing javascript and html work can allow for instant payback and see the results quickly and allow him to get some quick payback in being able to let others see his work. I think instead of doing all of this abstract stuff of definitions, types, and so on its better to focus on getting things done so his interest can be caught throigh quick gratification, seeing his work turned to actual graphics and pages that he created, without having to go throuh learning all of this abstract stuff like memory management, mallocs, types and endless declarations as with some of the languages you mentioned. javascript is simple, well designed, adn does not require all of the declarations and technicalities, for instance Java and the everything has be declared in so many ways just to be used, it just steepens the learning curve.

      Like with Perl, Javascript and HTML allows you to get your foot into the door without having to learn about so many things at once, start off with the simple concepts and get quick results without having to type about a bunch of highly verbose declarations and initialisation. I think something like $hello="hello there"; print $hello; would require a bit more declarations and so on in Java or C#.

      And as far as 3D, probably better to start off with 2D webpages first. And hopefully you didnt mean OpenGL. Maybe there is a simple way to do 3D but OpenGL isnt it.

    20. Re:javascript by Rockoon · · Score: 1

      Many of the problems with JS are being solved or have been solved with the latest EMCA incarnations, but dont for a second think that regular old JS isnt riddled with many many problems and pitfalls that make it a terrible learning language.

      A new programmer starting with JavaScript but without a secondary source checking tool like JSLint is destined to run away from programming forever.

      --
      "His name was James Damore."
    21. Re:javascript by cbhacking · · Score: 1

      You've clearly never tried IE8's developer tools. Not to get too far off-topic, but they're extremely good, in some ways better than Firebug (not that I expect a newbie to need a script profiler). Syntax highlighting, breakpoints, debugging, immediate console, stack traces and locals windows, profiler, etc - just about everything you could want for scripting. Similar stuff for HTML and CSS.

      Of course, the downside to using IE8 for scripting is that its scripting support, while much better and far, far faster than previous versions of IE, is still well behind the latest Firefox versions, and vastly inferior to something like Chrome.

      --
      There's no place I could be, since I've found Serenity...
    22. Re:javascript by shutdown+-p+now · · Score: 1

      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.

      I'm not GP, but my beef with JavaScript is precisely over closures. Or rather, a language that is often sold as one that's good at it, but really isn't. Two things are particularly annoying there.

      First is the sheer verbosity of writing "function" and "return" for every trivial closure (to give a simple example, what in JS is written as "function(x) { return x + 1; }", in C# will be "x => x + 1", or in OCaml, "fun x -> x + 1"). For a practical FP language, this is unforgivable.

      The second major issue is variable scope, when any local declared with "var" - no matter where the declaration is located - is, in fact, scoped to the nearest enclosing function/closure. This is both highly unintuitive, and extremely inconvenient when closing over variables, e.g.:

      function foo() {
          for (int i = 0; i < N; ++i) {
            var x = a[i]; // single variable for this entire call to foo, not new one for each iteration
            bar(function() { return x }); // if bar won't call argument immediately, but later on (lazy evaluation), it will see the overwritten value of x
          }
        }

      That aside, there are many minor quirks in JS - e.g. the difference between "var x = 123" and "var x = new Number(123)", or "var s = "Foo"" and "var s = new String("foo")", or the useless for-in statement.

      So, to sum it up. If you really want to see closures done right, see Ruby. If you want a language that is not excessively concise, but still has all the good bits (including closures), see Python, preferably 3.x. If you want to deal with a not-quite-Scheme that pretends to be Java, then sure, use JS, but don't complain later. And, for the love of all that is holy, don't teach it to kids.

    23. Re:javascript by icebraining · · Score: 1

      I third that!

      I've started with HTML and Javascript, and had lots of fun doing simple scripts, and then I moved on to new languages when I got my first PC.

    24. Re:javascript by CobaltBlueDW · · Score: 1

      Javascript is probably one of THE worst languages of all time. Shame on you for even suggesting it in jest.

      Not only does it use bad syntax and force the user to use bad syntax, its lack of proper structure encourages bad programming practices. It uses prototyping chains as apposed to classes, which makes it a bad language for transition. It is made to integrate with many other technologies such as HTML/CSS/PHP/etc., which makes it more difficult to pick-up and run with. It doesn't handle syntax and logic errors well enough to be helpful for a beginner. It's full of quirks like, foreach not being suitable for array traversal, and functions being passed by value. It's built-in libraries are laughably bad. It can't do simple file IO directly, which is a major tool for teaching early programming concepts. It doesn't even do simple user input that well.

    25. Re:javascript by xouumalperxe · · Score: 1

      Not to get too far off-topic, but they're extremely good, in some ways better than Firebug (not that I expect a newbie to need a script profiler). Syntax highlighting, breakpoints, debugging, immediate console, stack traces and locals windows, profiler, etc - just about everything you could want for scripting.

      As someone who uses firebug and chrome's developer tools every day at work... You have to be kidding me. You're saying that IE8's developer tools are better than firebug, and then you enumerate... Syntax highlighting, breakpoints and debugging (really? two items?), console, stack traces (does this go with the debugger as well?). That's the basics, mate, the things you have to have before you're even allowed to play the game. If you want to argue that IE8 is a better development browser than Firefox or Webkit-based browsers (Chrome and Safari share the debugger interface, at least), which it might be, you need to give actual reasons for it.

    26. Re:javascript by uradu · · Score: 1

      It's the old glass half empty/half full thing. If you're looking for a language without problems or pitfalls you will be looking for a long time. Instead, focus on a language you like, find out its shortcomings and become good at avoiding them. You will have to do that anyway regardless of which language you pick.

    27. Re:javascript by uradu · · Score: 1

      If you want a language that runs in every modern browser and lets you code current dynamic web apps, better learn to like JS. You can code your back-end in whatever you want, but more and more of the meat runs in the browser, and it speaks neither Ruby nor Python (which I'm also a fan of, btw).

    28. Re:javascript by shutdown+-p+now · · Score: 1

      Gladly (because I see what a mess, from architectural perspective, the current HTML/JS/Ajax mix is), I'm not a web developer.

      That said, considering the existence of GWT, it would seem that there are plenty web developers out there who don't like JS much, either.

    29. Re:javascript by Rockoon · · Score: 1

      You apparently don't know whats wrong with JavaScript, and further you are arguing from a position of information. A new programmer taking up their first language does not and cannot 'focus on a language (s)he likes'

      The main problem with JavaScript in terms of the new programmer is the parsing rules of the syntax. This is not the kind of pitfall you were thinking of. Its not like forgetting to deallocate memory, passing by reference instead of by value, or misunderstanding implicit type conversions.

      Its things like omitting a statement terminator, which will almost never raise an error while also will only rarely change the semantic meaning of the code. Code that was once fine can be broken by changes to other code, and we arent talking about changes in logic but simply just how the parser behaves at any given time.

      JavaScript is a very powerful language, but it is NOT for beginners. Even highly experienced JavaScript programmers depend on a source checking tool. The language it just too brutal without a source checking tool and the strict adherence to the methodological avoidance of those pitfalls that a source checking tool will enforce. JavaScript is the valley of the shadow of death without a source checking tool, because it is very easy to create hard to find bugs that have nothing to do with the codes logic.

      --
      "His name was James Damore."
    30. Re:javascript by uradu · · Score: 1

      Ugh, because when a platform has "issues" it's better to hide those behind another platform, so you can reap the benefits of the issues of both. No thanks! You have to learn yet another framework and API and hope that Google sticks to this particular one for a while. But to each his own, there certainly are plenty of fans.

    31. Re:javascript by uradu · · Score: 1

      How do you know what kind of pitfalls I was thinking of, since I never mentioned any? ;-) Like I said, and you reiterated, it may not be a beginners' language, but it's nevertheless a very powerful and expressive language. I agree that current browser environments are not exactly the best for debugging, but things are getting better.

    32. Re:javascript by sopssa · · Score: 1

      Yeah that I can second, it's not an awful language by itself. But a programming language is only as good as what can run it. We have all hated Java for that. Some even hate Flash (tho I dont really see a reason). Some javascript is perfect for its job, even while there are quirks with it.

      But something as a beginner language? No. It would be better to get his interest in programming with something you can do games and such with.

    33. Re:javascript by Anonymous Coward · · Score: 0

      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.

      Parent++.

      Greasemonkey gives web users the ability to make simple direct changes to improve how their computer works for them. This is the essential purpose of programming languages. After people see how they can do something to make their lives better, that's when they know if they have the interest in pursuing programming further.

      N.B. A lifestyle improvement can be derived from a number of metrics, but in this case it's either just the cool/enjoyment factor ('that's neat!) or the ease of use (this works so much better now). Obviously those aren't the only sparks of interest, but they appear to be the key grabs for people.

      As such, while I hate some aspects of the language, FF + GM + Javascript, isn't a bad platform to start someone one. Either that, or if there is an application that supports programatic macroing that they use a lot, the macro language could be a good place to start. Essentially, what will make them want to pick this up and play with it on their own?

  4. C# Surely. by Zoidbot · · Score: 1, Interesting

    The problem then however, is everyting else will seem like a total PITA..

    1. Re:C# Surely. by A+Friendly+Troll · · Score: 1

      He'd better learn VB.Net. It's more verbose and easier for beginners to grasp, while still having the entire .NET framework underneath. If he grows to like the C syntax, great - he has C# to move to, and if goes to Linux, there's Mono. Maybe he'll like Python, so he could use IronPython...

      I have personally went through a really strange cycle of programming language choices. Started with BASIC, moved to C, then to Pascal (and Delphi) and now I'm on VB.Net and heavy JavaScript :)

    2. Re:C# Surely. by sopssa · · Score: 1

      I would actually recommend Delphi (maybe it's .NET version) directly over Visual Basic. They're not that far away in learning curve, but Delphi is a lot better language and it's easier to move to other things later on too. And at least with Delphi's native application you can get quite close to C++ performance, while Visual Basic is a completely different case.

    3. Re:C# Surely. by A+Friendly+Troll · · Score: 1

      Visual Basic as you know it is dead. Everything .NET compiles into the same bytecode, so the speed is the same between all languages. Not much of a difference between native code and .NET JIT.

      Delphi is great, but I doubt it has a future...

    4. Re:C# Surely. by digitig · · Score: 1

      I really don't see how VB.net is easier for beginners to grasp. I'm an experienced programmer, and I can't grasp it (or is it one of those things that only beginners can grasp?)

      C# seems to me to be much clearer, but I'd probably vote for Python because it's really easy to understand (easier than any BASIC I've seen: I started with K&K and have tried VB.net and Dark Basic) and the immediate mode is a great help for the beginner trying to work out what's going on. Or, for a more off-the-wall suggestion, Squeak.

      --
      Quidnam Latine loqui modo coepi?
    5. 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).

    6. Re:C# Surely. by Javagator · · Score: 1

      I would also recommend C#. You can download a terrific free IDE from MS (C# express). A powerful library is included, and there are a lot of books available. Also the syntax is similar to C and C++, so a student can easily move on to more manly languages, later.

    7. Re:C# Surely. by Heppelld0 · · Score: 1

      and there's always xna to get some really nice instant gratification (huge libraries, huge support network)... and an introduction into the games development process if a broader perspective is needed, using the creators club...

    8. Re:C# Surely. by digitig · · Score: 1

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

      Ok, I'll grant that one, but I still got the overwhelming feeling with VB.net that it was going to do what it wanted to do, not what I'd told it to do.

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

      Both C# and Python avoid the issue of pointers at the surface level, although sooner or later students are going to have to come to terms with the difference between calling by value and calling by reference, and why sometimes when they change the value of a variable then the value of what they think is a completely different variable also changes. And that will happen in VB.net, too.

      --
      Quidnam Latine loqui modo coepi?
    9. Re:C# Surely. by A+Friendly+Troll · · Score: 1

      That will only happen when you pass complex, reference parameters. We are talking about beginners here, and they will - at best - pass "x" and "y", both integers, to an "Add" function. Later on, yes, they are going to encounter "pointers" even in VB.Net, but it will be at a point in time when they'll be able to understand what's going on.

      Anyway, the greatest challenge with beginners is to get them to start thinking like programmers and understand the logic behind all this.

      I don't know about you, but when I first started playing around with SQL, I had issues thinking in terms of sets. I've never encountered anything similar, so it got me all confused at first and I desperately wanted to use cursors and loops and billions of selects instead of joins, as we would do in regular programming languages to iterate over data. Took a while, and lots of very easy examples for the new thinking type to root itself in my brain. Now, if SQL was a bloodied mess of "%(##column1+column2 - //table1||table2 x1=x2)" (makes no sense, made this up), I'd have an even harder time understanding that over "select column1,column2 from table1 inner join table2 where table1.x1=table2.x2". Thankfully, SQL is englishist and verbose ;)

      On a sidenote, I've never seen my university professors tell people to do sanity checks. Not one of them said "you are supposed to enter a number here, but watch out if someone enters some text or a negative number". But they'll teach people pointers...

      I'm rambling here, it's well past midnight, so I have no idea where I'm going with this, except that someone should make a very easy programming language for beginners. Like this:

      let x = user input
      add constraint to x: if not integer then terminate with error "you need to enter a number"
      add constraint to x: if below 0 then terminate with error "the number must be 0 or above"
      let y = x + 10
      print "y is: " y

      Rewrite that in vanilla C and see how much more complicated it gets.

      Shit, I have to get up in six hours...

    10. Re:C# Surely. by icebraining · · Score: 1

      Python:
      if x and not y:
          foo
      else:
          bar

      Doesn't seem more difficult to me. And I've always disliked having to "close" the ifs, in English you don't have to, so VB's approach is less intuitive, imho.

    11. Re:C# Surely. by Whiteox · · Score: 1

      I really don't see how VB.net is easier for beginners to grasp. I'm an experienced programmer, and I can't grasp it (or is it one of those things that only beginners can grasp?)

      I agree. I had a live (Teletext) Qbasic app I wrote that needed to be converted to VB and it was impossible to do without re-writing most of the code. That's because x,y screen locations were so intrinsic in much of the BASIC code and VB was useless.
      I ran it in DOS for years until the hardware broke and gave up on it.
      If I started with VB then I wouldn't have had the problem.

      --
      Don't be apathetic. Procrastinate!
  5. Freebie Ideas - bravenet.com, Excel VBA by theodp · · Score: 1

    Open a free bravenet.com account, and he can play around with Javascript using the included browser-based editor. If you've already got Excel, there's some interesting stuff that can be done with VBA that's not bad prep work for C and Python.

    1. Re:Freebie Ideas - bravenet.com, Excel VBA by xsonofagunx · · Score: 1

      Only the nerdiest child is going to have any fun/interest-in doing anything with Excel VBA and if that were the case, he'd probably already be trying to learn to program. I think Python is a good start if the kid is interested in making websites (even PHP wouldn't be bad). My favorite language is Perl, but teaching him that first would probably cause him to go prematurely bald or start crying. I originally started learning programming in 5th grade in QBasic. I got to middle school, and they were using Apple Basic on Apple IIe's (this was in 1997, yeah, I know... wtf?). I really didn't see the point of learning an essentially dead language on ancient computers, so I started learning Visual Basic to write AOL hacking programs at home. After that I started on Perl and PHP, and databases and web design. In college (the one year I went) they had us working in Java, and I got it, but I didn't particularly like it. Basically, I learned most of the programming skills I've got on my own at home, and what I picked up on and what I didn't were always based on one simple thing - if I was interested, I figured it out really quickly. If I wasn't interested, I'd either have to slave away forcing myself to, or I just said screw it, I don't care enough (that's where C++ went). It's been said in other comments and I totally agree - if there isn't real interest, then the kid won't go anywhere with it.

  6. 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 sopssa · · Score: 1

      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.

      That's the thing, and that's why I also think C is a bad programming language to start with. It doesn't have almost any build-in library, and adding (and discovering) such to your project is pain in the ass. C also doesn't let you do any kind of little errors. That is probably why you're saying that making a real-time video game requires lots of skills. It's not so with different games. You can get nice results with Delphi or Visual Basic (maybe C# too, never used it but it looks like that). You aren't making the next Crysis, but you're working with something that keeps you interested in the programming so you can later move in to better stuff and languages.

      If I would be starting programming now, I really wouldn't like to start with all the boring and crap things that programming has. Especially now a days there's nice ways to get started and get you hooked up to learn more yourself. But if you're presented with all the crap right away, you most likely just say "fuck it" and go play WoW/counter-strike/whatever.

    2. 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
    3. Re:plain C, python, or ruby by bcrowell · · Score: 1

      C also doesn't let you do any kind of little errors.

      Some people would consider this a feature, not a bug. There are people who complete an entire CS degree without ever using a language that's closer to the metal than java. If you look at the OP's question, it's clear that he's trying to find a balanced approach.

      You can get nice results with Delphi or Visual Basic (maybe C# too, never used it but it looks like that).

      All three of these programming languages are proprietary. I would strongly suggest not starting a first-timer with a proprietary language. Although it's true that a lot of programming skills are language-independent, not all of them are, and history has shown that proprietary languages are a total dead end.

    4. Re:plain C, python, or ruby by BikeHelmet · · Score: 1

      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.

      This is a very good point, which is why I recommend MMF. (or even TGF) I started with it - it made creating games quite simple. At the same time I learned javascript which helped for webpages. Then one day I tried making a game in javascript. The game worked, but ran like shit, because Chrome didn't exist at the time. :P Shortly after that I started learning Java/C. I settled on Java, because of its strictness. Javascript is very lax, so although the syntax looks like C, you can't do any of the same stuff in actual C. And C has an extra symbol for every single command. Java kept it simpler. (just dots, no & * ** :: -> . etc.)

      Looking back, I'd probably go with Python this time around. All my java code going back years (before looking into Python) matches Python indentation.

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

    6. Re:plain C, python, or ruby by FreelanceWizard · · Score: 1

      C# is an ECMA standard. The .NET Framework is the proprietary part, and there's Mono and DotGNU if you'd prefer more openly licensed libraries.

      Also, if you've ever used C#, you know that a lot of what you learn there is applicable to Java and, to a lesser extent, other curly-braces syntax languages (and if you're really feeling up to it, you can play with pointer arithmetic using unsafe pointers and the marshalling system for P/Invoke and COM Interop). The new C# 3.5 features such as generics, anonymous methods, and lambda expressions also provide a reasonable introduction to templates and functional programming, though I think both of those would be inappropriate to show to new programmer unless they're a bit of a math geek.

      --
      The Freelance Wizard
    7. Re:plain C, python, or ruby by dkf · · Score: 1

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

      Plain C isn't as good as you might think for a new programmer. The problem is that you don't get very far with it at all without having to deal with pointers, and they're plain difficult to start with. (I didn't grok pointers until I'd first understood both addressing in assembly and references in Pascal, and even then it took me a while to get fluent. Being stuck on a segmented architecture didn't help though...)

      I recommend a scripting language of some kind. Preferably one that gives an interpretive loop so that you can have an idea and try it out immediately; that's very rewarding and makes it easy to learn by mistakes. Compiled languages can come later. (I don't know when to introduce the high-power concepts like objects and pointers and stuff like that; it might be better to let them start to hit the limits of doing stuff the simple way before unveiling the deeper mysteries.)

      You're dead right to avoid C++. That's a language that really isn't beginner oriented in any way at all.

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    8. Re:plain C, python, or ruby by Hurricane78 · · Score: 1

      C also doesn't let you do any kind of little errors.

      Some people would consider this a feature, not a bug.

      No, it’s definitely a bug. Because that bitch does not forgive you any error, but does not tell you about it either. Until you fuck up in the worst possible way, in mid-runtime.
      Face it: Humans make errors.

      The proper way to handle them, if you want to be strict, is what e.g. Haskell did.
      To design the whole language and compiler in a way, that does not allow errors to pass in the first place. And to tell you right away.

      Does Python have a strict mode? (In the Haskell meaning of “strict”.)
      If yes, then add pygame, and you got your great learning language. :)

      (I must say that only when I started to learn Haskell, did I find out, that I knew nothing before that. And that most programmers also know nothing. Now I can program well in every language, because I always have these modern, proper, elegant concepts in my head.)

      --
      Any sufficiently advanced intelligence is indistinguishable from stupidity.
    9. Re:plain C, python, or ruby by tuxicle · · Score: 1

      I'd say that C requires too great a knowledge of how computers work internally to grasp concepts like pointers, which are fundamental to understanding C. I still think kids would need a stepping stone before C to grasp concepts like program flow, branching, etc. Personally, I taught myself BASIC first, then kept bugging my dad, asking him how "real programs" were written. The thing that bothered me was my .BAS files still needed GW or Q basic to run, while everything else just had a .EXE. He mentioned C and Pascal, so I saved up some money and bought a "teach yourself C" book because it was cheaper than the "teach yourself Pascal" book :)

    10. Re:plain C, python, or ruby by 2stein · · Score: 1

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

      I'm tempted to disagree. It might come down to a "imperative programming vs. OOP" thing, but since most people will get into some contact with OOP anyway, why not start with it in the first place? A few people have already suggested Smalltalk and I'd second that. It has extremely simple, compact syntax. It is 100% object oriented and consistent. And once you've got the "Everything is an object. Everything happens by sending messages (to objects)." idea, you've got it. Since this is a very simple idea, it should be quite easy to understand. And if you've understood that, you can just go on and write programs.

      I've started out with imperative programming (Pascal) and it took me a while to get behind the OOP idea, but after I've had a look at Smalltalk, I just had that enlightening moment, when I learned object-oriented thinking.

      I guess that this object-orientation is much closer to how we naturally think. It's about "making things happen" and about "interaction of things with each other", not about picking everything apart into a big list of things to do, then making smaller lists of to-do-items we call functions and so on. And even with 100% object-oriented thinking, you still have the concept of doing things one after the other. But only in those places, where it is in the nature of the problem.

    11. Re:plain C, python, or ruby by bcrowell · · Score: 1

      It might come down to a "imperative programming vs. OOP" thing, but since most people will get into some contact with OOP anyway, why not start with it in the first place?

      OO isn't the opposite of imperative. The opposite of imperative is functional.

      OO is a good, natural fit to a few very specific tasks. One of those is GUIs. But in general, OO is simply one more technique to add to your toolkit, along with pointers, regexes, etc. Historically, OO is just one of the more recent fads in programming. If this was 1985, the fad we'd be discussing would be structured programming.

    12. Re:plain C, python, or ruby by Anonymous Coward · · Score: 0

      You can get nice results with Delphi or Visual Basic (maybe C# too, never used it but it looks like that).

      All three of these programming languages are proprietary. I would strongly suggest not starting a first-timer with a proprietary language. Although it's true that a lot of programming skills are language-independent, not all of them are, and history has shown that proprietary languages are a total dead end.

      Somehow I don't think the beginner really cares about your little religious war against M$. The idea that his/her first language will be the one they build a career on is just as hilarious. And you're equally clueless about proprietary languages --I've plenty of friends making around six figures for decades on the same proprietary language.

    13. Re:plain C, python, or ruby by mikael · · Score: 1

      I'd agree with that - C was an improvement over assembly language in that your code would be cross-platform, assuming you didn't use any platform-dependent API's, and was a vast improvement over BASIC in that it supported recursion. Pascal had that benefit as well, but you ended up having to figure out how to unroll localized functions if you ever wanted to port algorithms to C or C++.

      To make any code reusable in C, you are going to have to learn abstract data types (the predecessor of object-orientated programming), but when you want to port C ADT's to C++, you would end up spending a lot of time shuffling around object pointers.

      Python and Perl seem to be the most popular object-oriented scripting languages used in industry, with the options of writing C++ and C++ extensions later on.

      --
      Vintage computer adverts: http://www.vintageadbrowser.com/computers-and-software-ads
    14. Re:plain C, python, or ruby by Anonymous Coward · · Score: 0

      Perhaps but you need to know something else other than a language. You need to *KNOW THE SYSTEM*. C does that. You need to know it to use it properly. Ignore the system to your own downfall. There is a reason the teach you the hard way to do things in math first. It is so you understand that the 'easy' ways do help you.

      Many have suggested Python. It has some nasty little side effects for a first time programmer. Take the python statment x=[1,3,4,[99,123]]. Do that in another language. You will need to relearn how to do things. C is so low level you understand that statement does quite a bit. Pushed into another language (which many programmers are, repeatedly) you may end up way over your head. My point? You want a language where when you jump to another one you are not totally over your head. Pascal/C/Java/Python are very good suggestions. But 1 or more would not be a bad idea with an eye on the underlying systems they are built on. You need to understand what a language does to the computer in order to be any good at it.

      Writing 'good looking' code is just a matter of being consistent about the way you write and doing it in a way that communicates to a computer and a person at the same time. I have seen crap code in just about all languages. I have also seen works of art. Pascal didnt teach me that. 15 years of fixing other peoples and my own code did.

    15. Re:plain C, python, or ruby by Anonymous Coward · · Score: 0

      Dismissed at first, but on further reflection you are absolutely correct. Anyone started a new business application lately that wasn't a web based application?

    16. Re:plain C, python, or ruby by Anonymous Coward · · Score: 0

      The OO stuff is, in my opinion, totally unnecessary for a first-time programmer to learn.

      When is he going to learn it if not right at the beginning? So many programmers don't do proper OO because they were contaminated by BASIC-like languages. Objects are actually a pretty simple concept if you don't have to unlearn an unencapsulated style to learn them.

    17. Re:plain C, python, or ruby by jhol13 · · Score: 1

      There's nothing particularly wrong with plain C as a first language.

      Yes, there is. Several. The worst is that it is compiled.

      I'd start from a language which has a shell, i.e. you can try out commands one by one. and see what each of them do.

    18. Re:plain C, python, or ruby by Ckwop · · Score: 1

      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.

      Perhaps even more importantly, he'll be able to show his friends and his friends will understand what he's done. They might even think it's cool.

      A tiny console app will not have the same effect.

    19. Re:plain C, python, or ruby by m6ack · · Score: 1

      "It gives you dreadful programming style." -- beg to differ. Teaches you pointers, teaches you to be careful, and to be careful specifically about memory allocation/deallocation. If you choose to program procedurally, that's fine with C. If you chose to program functionally, you may do so via pointer to function... If you choose Object Oriented Programming, such is facilitated via. structures and pointers. As a bonus, when you compile to assembly, you can actually make sense of the output.

      "not a right tool for applications programming" -- beg to differ. Most serious programming efforts are in C. Many, if not most, compilers and interpreters are written in C. GTK is written in C. Most all basic applications in the UNIX tool chain are written in C. As a bonus, you can libraries natively.

      "It Isn't even a high level language." -- Um... that's a bad thing?

      "All those buffer overruns[...]" -- were cause by people that learned BASIC, Pascal, or Java as their first language & couldn't be bothered to compile with -Wall and run with Valgrind.

      "You can mod me as a troll[...]" -- Um... OK... so long as we have your permission... I'll not presume to say that C is the language to start off a 12 year old, but I would say that I believe it is the lingua franca or even the root of all portable computer languages -- of which no programmer should be without a thorough understanding and appreciation.

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

      If you choose to program procedurally, that's fine with C. If you chose to program functionally, you may do so via pointer to function... If you choose Object Oriented Programming, such is facilitated via. structures and pointers.

      Ouch. I suppose that when all what you've got is a hammer, all problems start to look like nails. And you definitely sound like somebody who would hammer screws and bolts in.

      Most serious programming efforts are in C. Many, if not most, compilers and interpreters are written in C. GTK is written in C. Most all basic applications in the UNIX tool chain are written in C.

      Well, that is because far too many people work as mentioned above. Besides, compilers and interpreters are a minority of applications.

      Um... that's a bad thing?

      Yes. If you are such a low leven fetishist, why do you write software at all? Please implement all your functions in real transistors, capacitors and resistors.

      were cause by people that learned BASIC, Pascal, or Java as their first language & couldn't be bothered to compile with -Wall and run with Valgrind.

      Wrong. Those people take the right tools for writing business applications (which is not C) because they can't be bothered doing 10 times more work than needed just to insure that everything works properly.

      but I would say that I believe it is the lingua franca or even the root of all portable computer languages -- of which no programmer should be without a thorough understanding and appreciation.

      One can learn C but without the duty to mindlessly adore it.

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

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

      I think for many of us who grew up on home computers, Assembler was our first language; and we used it to write games and demos on C64 and Amiga's. Things don't get any simpler than assembly language (few concepts and a very finite set of instructions) and it's great for getting a gradual but very deep understanding for what a computer is and how it works. We did it in 68K and it was the ideal set-up for growing into higher-level languages (as it showed you what a higher level language is trying to help you with.) The problem with learning a higher level language first is you'll be too easily intimidated by lower-level concepts (pointers, call-stacks, hardware interfaces or just the way things are laid out in memory) and avoid those things for the rest of your career - I'm sure we've all seen the type of 'professional' programmer I'm talking about.

      Having said that, the amount of shit ("work") you need to wade through to get anything done these days in assembler means it's no longer an option; definitely not for a "from-scratch" type of program, and definitely not for getting quick experimental results; so it's today pointless for teaching a kid how to code as he'll get bored before anything exciting happens (unlike the Amiga days when the code to get some copper bars going would fit on your screen.)

    22. Re:plain C, python, or ruby by redalien · · Score: 1

      C does not teach you to be careful about memory allocation. I've marked undergraduate coursework written in C, do you know how many times I saw free()? Zero. AFAICT it was only used by the 3rd year undergrads on the crypto course as they were the only people that had to deal with large amounts of allocations. Most people that learn on C will never bother with free, they'll let the OS clean up on process termination.

    23. Re:plain C, python, or ruby by pruss · · Score: 1

      It is surely false that "C is a tool for writing operating systems". C is a general purpose programming language. I've mainly used it myself for two purposes: (a) scientific computation (combinatorial, floating point and graphics), and (b) programming for PDAs (Sharp and Palm). It is a perfectly fine language for scientific computation, without the overhead of C++ (which probably is not so much now as it used to be back when I was doing scientific computation). And it is a standard tool for embedded systems programming, including both OS-type stuff and applications. C might not be the best tool for GUI applications on desktop OSes, and is messy for heavy string manipulation, but for non-GUI applications on desktop OSes that don't do too much heavy string manipulation (for that, something with a well-integrated RE system is better) and for GUI applications on non-desktop OSes it is quite fine.

      What C doesn't have is OO stuff. But I don't think a beginner needs it--I think what is hard for a beginning programmer is the level of abstraction, and the level of abstraction in OOP is an order of magnitude higher.

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

      Dude, I know that C is standard for embedded applications, I am an embedded developer myself (Aplicom C and F Series, Owasys OWA22N, various Windows CE devices) but it still doesn't make it a right tool for writing applications. Operating systems, yes. Compilers also, as far as I am concerned, but not applications. Not because the lack of OOP, you don't need that for simple apps, but because C is too low-level, even for embedded. It is also not very readable, which makes the maintenance more difficult.

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

      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.

      Not so. C is the king of the third-generation languages. With respect to your points, in order:

      C doesn't enforce any particular programming style, and all major applications are written in C or C++ (so I don't think you can claim it is "not a right tool" for that). C is a tool for writing operating systems or anything else, and I am going to claim that C is a slightly higher level language than Pascal; it can do anything you can do in Pascal, often with cleaner code. (For example, it is much cleaner to simply return a value, than to assign the return value to the function name and then use a series of if statements to make sure that nothing else happens until the end of the function body is reached.)

      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.

      Buffer overflows are caused by using a language that doesn't do run-time bounds checking for you, combined with a standard library that includes functions that don't do explicit bounds checking either. strcpy() is considered harmful, you need to use functions that know how long the buffer is and refuse to write past the end. I note that there is nothing in Pascal to make it better than C here, except for the fact that it is really impossible to write a useful standard library in Pascal. (Different length strings have different types so there is no way to write a general-purpose library function that can accept strings of different lengths! That's just crazy! It's so crazy that every major Pascal implementation offers some way to work around it. Whereas C got this, like so many other things, right; and there are plenty of standard C string functions.)

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

      It did nothing of the sort. You can write wretched and awful code in Pascal just like anything else.

      The closest I have seen to a language that forces you to write clean software is Python; it forces you to put colons at the end of if statements and function definitions, just for readability; it forces you to indent your code consistently, or it won't work. And yet you can write wretched and awful code in Python just like anything else.

      A language cannot force good code. At best, it can support good code. C does this decently; Python does it better.

      Pascal is pretty much irrelevant now, and C is still very relevant now, which should tell you something.

      P.S. Getting back to 12-year-olds, I think Python would be the ideal first language. C would not be horrible; it would be better than C++ because there is much less to learn. Pascal isn't bad, but it is a dead-end irrelevant language, so I wouldn't bother with it.

      steveha

      --
      lf(1): it's like ls(1) but sorts filenames by extension, tersely
    26. Re:plain C, python, or ruby by Anonymous Coward · · Score: 0

      First, we don't know if the 12 year old will want to write operating systems of business/web apps. It therefore seems reasonable to consider a variety of languages for educational purposes.

      Secondly, I think teaching assembler as a first language makes good sense in some ways. I'm older... My first four languages were assembler. I didn't learn a "higher" language until 15-20 years on. Not sure if I'd recommend assembler forever, but there are worse fates. But also, knowing assembler, it is often quite easy to look at C or even Pascal code and "see" the assembler beneath, and taking apart things such as VBScript, or even the Java virtual machine are almost no brainers.

      Assembler, C, Pascal -- they're all useful things to have studied and worked in. They're also things one might never learn were one to start out with HTML/Javascript, et al.

  7. I wouldn't recommend BASIC by mysidia · · Score: 1, Interesting

    And neither would others.

    It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra

    PASCAL.. mediocre choice. C, okay... C++.. if you insist.

    Python: pretty good, Ruby, Ada: great, Haskell/SCHEME/LISP/ML: EXCELLENT

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

    2. Re:I wouldn't recommend BASIC by mysidia · · Score: 1

      The problem with BASIC is it is not structured programming, and the syntax is a mess.

      And GOTO is an integral statement in any attempt to implement a computer algorithm in BASIC, which is the bane of structured programmers.

      Using English words for certain things as in VB is reminiscent of COBOL, the syntax is more complicated than other programming languages, and the control structures are abysmal and difficult for a beginner to use.

      Real programming, even at the novice level, uses structured languages. Which, by the way, is a lot more elegant, structurally simple, logically simpler, and easier for a beginner to deal with than BASIC.

      Many beginners interested in computers, give up programming altogether, after being exposed to the horror that is BASIC.

      It's fine that some folks make a good living playing with VB.

      I'm saying that VB is more complicated, and is more suitable for advanced programmers. The language is not suited for teaching beginners.

    3. Re:I wouldn't recommend BASIC by Dogtanian · · Score: 1

      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.

      Yeah, and VB.Net doesn't appear to be significantly easier than (say) C#, while having much clunkier- and more nonstandard- syntax. So unless you already know Visual Basic, there's no compelling argument in favour of it.

      I assume that Visual Basic was originally intended for people who'd learned with old-school 8-bit BASICs, to provide an easier ramp than the sudden leap up to the likes of C++. Over the years it appears to have acquired more serious features which the people *who were already using Visual Basic* learned bit by bit rather than having to enter the icy-cold waters of... whatever other language. That may lead them into thinking that it's somehow "easier", because it has a thread leading back to BASIC that they followed. But in truth, if you haven't learned your trade via that path- and no new programmers will, nor have any good reason to do that- it doesn't look much simpler than any other language.

      A lot of programmers made and still make a good living in VB.

      That doesn't prove that it is- or was- the best language, only that it is- or was- popular, possibly due to existing installations, possibly to to large number of programmers knowing VB for the reasons given above.

      --
      "Slashdot - News and Chat Sites Deviant". (Click "homepage" link above for details).
    4. Re:I wouldn't recommend BASIC by Blakey+Rat · · Score: 1

      Whoa whoa, be fair.

      Visual Basic was a very early language with a visual layout tool, and automatic memory collection. It's notable, and was popular, because of those two features alone... despite its weaknesses. Now, it's true that it's definitely fallen behind the competition in the intervening years, but VB was state-of-the-art at one time. Give credit where credit is due.

    5. Re:I wouldn't recommend BASIC by Dogtanian · · Score: 1

      Oh yeah, it was probably more user-friendly than the competition *at the time*. Credit granted. Now? Not so much.

      --
      "Slashdot - News and Chat Sites Deviant". (Click "homepage" link above for details).
    6. 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
    7. Re:I wouldn't recommend BASIC by Blakey+Rat · · Score: 1

      Oh yeah, it was probably more user-friendly than the competition *at the time*. Credit granted. Now? Not so much.

      Yeah, but that said it's still more user-friendly than a lot of the competition now. Sadly, a bunch of GUI apps are still written in C++. And Java, while it has many user-friendly IDEs and automatic memory management, can't make a native-looking UI to save its life.

      Now when you put it up against other .net languages, then yah it's lost some of the magic. But it's not as if it's bad in general, when you compare it to the rest of the industry. I'd much rather build any GUI app in VB than C++, for example. (Although I'd prefer C# to both.)

    8. Re:I wouldn't recommend BASIC by Xamusk · · Score: 1

      To be more fair, Python is not hard if you use just basic features. No one has to use list comprehension to manage data on a list.

      However, and that's a BIG however, there's still nothing in the python world that matches the ease of creating a GUI app like VB has. Hell, using some IDEs like Qt Creator makes GUI programming easier even for C/C++. And a GUI is what most non-programmers believe a "program" is.

      Anyway, I'd still ask the kid for a project, which would pretty much dictate the technology to be used. A good programmer knows many languages and uses the best for the task.

      To get attention, one could start by getting an Arduino and making a led blink. That's the electronics "hello world". You can use either Wiring or simple C (without pointers) to do that, and with a program skeleton in place, there's lots to be learned.

  8. 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.
    2. Re:Python+pygame by selven · · Score: 1

      Saying this as a fairly experienced python/pygame programmer, be sure to throw in Psyco once you get to doing complex games with dozens of units. It magically makes all of your "140 ms per frame isn't fast enough" woes go away in 2 lines of code (and that is not, in any way, an understatement, their boasts of 2-100x speedups are accurate).

    3. Re:Python+pygame by Fragmented_Datagram · · Score: 1

      You can write a script in Python on your computer and run it on your phone (if you've got a Nokia, at least).

      And any Android phone... http://code.google.com/p/android-scripting/

    4. Re:Python+pygame by UnknownJoe · · Score: 1

      I used Game Maker and made a full commercial style game with an external level editor. I also used GM to make a console calculator that compiles the code I write. It's not exactly that limited.

  9. Visual Basic by XPeter · · Score: 1

    Troll all you want, but VB is a good way to go for a starter language.

    He doesn't have to master it, but use it to teach him the basics of UI, variables, ect. When I ventured into programming at 13 this was my entry language and I'm glad I took the time to learn it as it provided me with a solid foundation and left me prepared to move onto other languages such as ruby, C/C++, and javascript.

    This is an example of a simple program I coded as a starter a few years back, it divides a total amount of pennies into change.

    Public Class MoneyForm

            Private Sub ExitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ExitButton.Click
                    Me.Close()
            End Sub

            Private Sub ClearButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ClearButton.Click
                    Me.InputTextBox.Text = ""
                    Me.QuartersLabel.Text = ""
                    Me.DimeLabel.Text = ""
                    Me.NicklesLabel.Text = ""
                    Me.PenniesLabel.Text = ""
                    Me.DollarsLabel.Text = ""

            End Sub

            Private Sub CalcButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles CalcButton.Click
                    'declare variables
                    Dim intPenniesInput, intDollars, intQuarters, intDimes, intNickels, intPenniesOutput As Integer
                    'get input from user
                    intPenniesInput = Val(Me.InputTextBox.Text)
                    'calc values
                    intDollars = intPenniesInput \ 100
                    intPenniesOutput = intPenniesInput Mod 100
                    intQuarters = ((intPenniesOutput \ 25))
                    intPenniesOutput = intPenniesOutput Mod 25
                    intDimes = intPenniesOutput \ 10
                    intPenniesOutput = intPenniesOutput Mod 10
                    intNickels = intPenniesOutput \ 5
                    intPenniesOutput = intPenniesOutput Mod 5
                    'display results

                    Me.DollarsLabel.Text = intDollars
                    Me.QuartersLabel.Text = intQuarters
                    Me.DimeLabel.Text = intDimes
                    Me.NicklesLabel.Text = intNickels
                    Me.PenniesLabel.Text = intPenniesOutput

            End Sub

            Private Sub InputTextBox_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles InputTextBox.TextChanged
                    Me.QuartersLabel.Text = ""
                    Me.DimeLabel.Text = ""
                    Me.NicklesLabel.Text = ""
                    Me.PenniesLabel.Text = ""
                    Me.DollarsLabel.Text = ""
            End Sub
    End Class

    Once he's firm on coding things like this, move onto harder stuff such as C/C++

    -P

    --
    "The difference between genius and stupidity is that genius has it's limits" - Albert Einstein
    1. Re:Visual Basic by mikael_j · · Score: 1

      I'd actually say that VB or VB.NET would be a horrible first language, very little code I've seen come from developers who started with VB or VB.NET has been well-written and I think this is partly because of the language and partially because within the "VB community" there is less focus on the quality of code.

      To elaborate, the language has fairly quirky syntax compared to many other languages, some may not like it but I think it's better to start out with a language that has a slightly more C-like syntax, that way it's easier to move to lower-level languages like C or other high-level languages since a lot of books and other resources on various languages compares language concepts in comparison to C.

      Secondly, the code quality in the VB community tends to be a lot lower, whenever I need to work on legacy VB/VB.NET apps I find myself checking MSDN and googling for "best practice" examples and even though I'm not particularly experienced with VB I can tell a very high percentage of example code is poorly written (for VBScript there's always the classic "include-o-mania" which has certain similarities to what could often be seen with PHP3 code, if(condition) { include("somefile.php"); }).

      /Mikael

      --
      Greylisting is to SMTP as NAT is to IPv4
    2. Re:Visual Basic by gringer · · Score: 1

      I really hope you were being sarcastic with that. That code is not good for grammar / syntax — it has no obvious start point, comments look like unbalanced quotations, and there are subroutines that only set string values to an empty string.

      [add to that my personal preference for end-of-line markers, and brackets / braces to surround statement blocks (without them, it's like sentences without commas and full stops)]

      --
      Ask me about repetitive DNA
    3. Re:Visual Basic by Anonymous Coward · · Score: 0

      Yes, but you also have to account for the mind this information this is going to be presented too.

      We're talking about a 12 year old kid, not a college student who is looking to take on venturing. The reason I say VB is primarily because of the graphical interface and easy debugging measures.

      I'll agree 110% that the community is poor, but if you buy a book (such as Diane Zak's interpretation of the language) you should fine yourself pretty set.

      It's all in the preference of the programmer it seems, the kid will find what out what he likes eventually. After spending a while on C/C++ I found my niche in the internet/cloud realm and am currently working on my CCNA certification. If the passion for computers develops, he'll find his way.

    4. Re:Visual Basic by XPeter · · Score: 1

      Stupid Slashdot posting anonymously. Have the kid read some /. and Ars...that's where I've gained most of my computer information from.

      --
      "The difference between genius and stupidity is that genius has it's limits" - Albert Einstein
    5. Re:Visual Basic by westyvw · · Score: 1

      Visual Basic makes me want to gouge my eyes out. Worse, its inconsistent with any other reasonable language.

    6. Re:Visual Basic by Anonymous Coward · · Score: 0

      Classic /. attitude. I know how to write VB better than the folks documenting it, therefore the language is a complete waste of time. What?!? That "fairly quirky syntax" is pretty easy to use, once you actually LEARN it. I honestly think C++ has a screwy syntax, but I still code with it.

      Maybe it never occurred to you that the overall code quality in the VB community (read: VB forums) is due to a large beginner user base? The MSDN documentation, on the other hand, is perfectly fine. I know, I've seen it. I think your stated lack of experience explains your lack of satisfaction with the documentation.

      If you're going to learn, start with the basics.

    7. Re:Visual Basic by mikael_j · · Score: 1

      Classic /. attitude. I know how to write VB better than the folks documenting it, therefore the language is a complete waste of time.

      I never said that, please don't pretend that I said things that I didn't.

      That "fairly quirky syntax" is pretty easy to use, once you actually LEARN it. I honestly think C++ has a screwy syntax, but I still code with it.

      If you improve your reading comprehension and learn to interpret what you read based on the context in which it is meant to be read then maybe you'll understand that what I meant was that for a beginner it would probably make more sense to start out with a language with a more C-like syntax since it will most likely help the transition to other languages.

      Maybe it never occurred to you that the overall code quality in the VB community (read: VB forums) is due to a large beginner user base?

      I never commented on the reason for the low quality of a lot of the VB code but yes, one reason that is likely to contribute is that many VB programmers are fairly inexperienced with programming in general.

      The MSDN documentation, on the other hand, is perfectly fine. I know, I've seen it.

      I didn't comment on the quality of the MSDN code so I hope you're not implying that I did.

      I think your stated lack of experience explains your lack of satisfaction with the documentation.

      No, my dissatisfaction with the non-MS documentation on the net comes from the low quality of the code, it's a lot harder to understand exactly what the code does if it's all mangled up, does unnecessary things because the author never bothered checking if they were needed and is written in an incomprehensible way.

      /Mikael

      --
      Greylisting is to SMTP as NAT is to IPv4
  10. 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.

    1. Re:Parallax Propeller micro controller kit. by Anonymous Coward · · Score: 0

      A full-featured dev kit is nice, but the parallax is both too complex and expensive for a starter kit.

      I would go for a small AVR dev kit instead. These chips can be programmed in REAL C (uses GCC-AVR) and he'll be able to build very low-cost (under $10 for all parts) portable projects (most AVRs can run on 3V, so 2xAA or a single CR2032 battery) that he can carry around to show his friends.

  11. Ruby by mysidia · · Score: 1

    It's really easy to get started, and there's an online, interactive ruby tutorial

    1. Re:Ruby by CobaltBlueDW · · Score: 1

      Ruby is a great choice because of it's ease of use, but it is also a bad choice because of the expansive nature of the language. Ruby has too much acceptable syntax for a beginner, IMO. It's needlessly complex in its exhaustiveness, and isn't strict enough to encourage proper structure.

  12. C#/XNA? by EllF · · Score: 1

    At 12, I think you want to impart a good foundation, not expertise in a specific language. I learned BASIC on a C64 back when I was 5-8, and followed it by learning C and C++ in my early teens. I think BASIC remains a reasonably decent starting point, in that you'll be teaching the rudiments of loops and program flow without the complexities of pointers, but depending upon the learner you may want to dive into C immediately after walking through the basics of BASIC. C# would arguably be the logical replacement for C++ in a new programmer, these days. If he's like most kids, you could even teach both C# and XNA, and work with him on learning to write code via a small video game project; if he has a Windows PC or an XBox, he can even show it off to his friends.

    --
    We who were living are now dying
    With a little patience
    1. Re:C#/XNA? by BenoitRen · · Score: 1

      C# would arguably be the logical replacement for C++ in a new programmer, these days.

      It definitely is not, especially after C. C# is like C++, but with the neat parts ripped out and the control of resources and program flow taken away from you. It's a managed language, after all.

      C++ is the logical step after C.

  13. Logo by Tablizer · · Score: 1

    Many still recommend Logo as an early teaching language. It's quite visual.

    1. Re:Logo by TheRaven64 · · Score: 1

      Logo's a good choice if you know Logo well (which really means knowing Scheme), but a terrible language if taught badly. For young programmers, I'd recommend Smalltalk. Start with something like Squeak eToys and then go into depth. I've never met anyone who wrote good OO code and couldn't program in Smalltalk (but a lot of people who think they understand OO). Smalltalk is trivial to learn, but teaches you lessons that are useful in almost any modern language.

      --
      I am TheRaven on Soylent News
    2. Re:Logo by Anonymous Coward · · Score: 0

      You should check netlogo then. It's a new implementation with a *TON* of nice, visually pleasing, built-in examples you can learn from.

    3. Re:Logo by Anonymous Coward · · Score: 0

      OOP is overhyped. There's no scientific evidence it's better for all code, only people with strong personal preferences. Wait until they get older for that intro. OOP is one tool among many. Plus, Logo comes with some great graphical idioms out-of-the-box.

  14. Shoot for instant gratification with... by mccotter · · Score: 1

    web programming. Set him up with a web server where he can work on projects to show off to his friends. I believe that in the beginning learning how to express yourself in code is more important than what language you're doing it in....

    Instant gratification + something cool to share with friends == success and satisfaction.

    I wish you luck...

    1. Re:Shoot for instant gratification with... by dgatwood · · Score: 1

      Seconded on the whole web programming thing. I suggest PHP. It's lightweight, has a C-like syntax to make the future transition to C/C++ easier, and integrates easily into an environment that kids already are familiar with (the web). It also has a lighweight notion of classes, making it a perfect choice for introducing OOP without the bloat of Java or the ugliness of C++.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

  15. I'm using K&R by notthepainter · · Score: 1

    I've signed up as a mentor to teach programming to an interested High School senior, so it isn't a 12 year old. I chose C because, frankly, it is what I know best. Java might be appropriate also but for starting out I think C is a better bet than Java. (I can't address Python since I've barely coded in it.)

    The teacher had a copy of K&R, 2nd edition on the shelf. I had them order a second copy for me. We'll start in Februray. Meeting about once a week for the rest of the term but staying in email and Skype video contact.

    Wish us luck!

    1. Re:I'm using K&R by Dogtanian · · Score: 1

      I've signed up as a mentor to teach programming to an interested High School senior, so it isn't a 12 year old. I chose C because, frankly, it is what I know best.

      I'm not going to rubbish C, because I think it's a very good high-level way of doing relatively low-level programming. But... the string functionality in ANSI C (C89)- which I assume is still the most common version- is *not* its strong point. I certainly wouldn't use it for primarily text-oriented projects (unless they were *very* performance-oriented) and this may be a drawback for newcomers.

      --
      "Slashdot - News and Chat Sites Deviant". (Click "homepage" link above for details).
  16. 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...)

  17. It aint about a language... by LibertineR · · Score: 1
    Its about proper programing principles and procedures.

    Set him up with something where he can produce something cool, FAST, which will enforce best practices. Frankly, the IDE is more important than the language. Set him up to where he is asking "Why and How", not "what the fuck do I do now?"

    He'll need an idea of something to accomplish, and set out on a path to get it done. Learning programing without a specific goal, is another kind of hell. Make it about the 'Solution', then show him how to get there.

    1. Re:It aint about a language... by omar.sahal · · Score: 1

      Learning programing without a specific goal, is another kind of hell. Make it about the 'Solution', then show him how to get there.

      I agree with this. As well as a project that someone is interested in it may well pay off to (if this is only his first attempt at programming) give him a big book with lots of examples and questions and answers. An example of book style (please don't flame me, its the format that is good not necessarily the content) is Herbert Schildt teach your self C. This format is great because he explains one concept

      • Gives code fragments about the concept
      • Gives (typically) three whole examples of code using the concept/language feature, with a line by line analysis of each programme
      • Has questions stating "change example x so it can do x"
      • After each chapter there are more questions aimed at 1. seeing how well you understand the concepts in the chapter as a whole, 2. how well you have integrated this knowledge with previous chapters
      • Lots more questions both at the end of the chapters, and before you start the new chapter.
  18. How To Teach a 12-Year-Old To Program? by omar.sahal · · Score: 1

    Firstly he has to want to do it, I mean really want to because it is hard. Show him this its pretty inspirational (what ever you think of the author), this got me into programming.
    Peter Norvig says Python or Scheme (he's an old lisp guy) but he needs to get to the point of codding his own apps ASAP so a language with lots of examples is good (Python has the oreilly publishers cookbook and numerous applications out there).

  19. How To Design Programs with DrScheme by chthon · · Score: 1

    How To Design Programs

    Really. If he is interested in programming and you can guide him to follow the book, then he will know what to expect from a programming language, get a a good background and will not need to unlearn bad habits.

  20. Lua by Anonymous Coward · · Score: 0

    Lua

  21. Graphical? by Lord+Lode · · Score: 1

    I wasn't taught how to program by someone. I discovered QBasic in DOS myself when I was 13 and was automatically drawn into it. I liked programming graphical things the most (plotting pixels with PSET). The fact that such graphical things were possible is what interested me so much. I'm not sure how this is with other people, but programming boring text examples makes it uninteresting probably.

    1. Re:Graphical? by michael_cain · · Score: 1

      I taught myself Fortran 40 years ago when I was 16 (long story about how that happened that's not relevant here). I would have been so much better off if there had been someone looking over my shoulder from time to time and making suggestions about style. I estimate that it took two years of computer science in college before I unlearned all of the bad habits I picked up in three months...

    2. Re:Graphical? by CobaltBlueDW · · Score: 1

      Still, it got your foot in the door. The teaching process often involves learning bad things first, and then re-learning better things later when you. You can't teach a pupil good habits if you don't have a pupil to begin with. I think working the graphical angle to start with to cultivate interest is more important that starting the learner with excellent habits.
      Good fundamentals and habits are very important but, would anyone waste there time learning football if they had to spend there first 3 years doing nothing but learning how to throw the perfect spiral before they could play the game? Nope.

    3. Re:Graphical? by michael_cain · · Score: 1

      ...would anyone waste there time learning football if they had to spend there first 3 years doing nothing but learning how to throw the perfect spiral before they could play the game?

      Completely off topic, but... I do some epee fencing. My master has a long-standing interest in the history of both the weapon and methods of instruction. 400 years ago, many masters required beginning students (typically children in the aristocracy) to spend two years or more on footwork before they were allowed to pick up a blade. The consequences were somewhat different, of course; good footwork didn't mean that you would win the duel, but bad footwork would get you killed fairly quickly.

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

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

    :D

    1. Re:Cold, hard X86 Assembly. by geekgirlandrea · · Score: 1

      *sigh*

      x86 is for useless twits who need to do things like rep stosb and can't handle delay slots. Anyone who can't learn MIPS by age 13 should be shot. It's for their own good. :)

    2. Re:Cold, hard X86 Assembly. by Anonymous Coward · · Score: 0

      yeah, he's freakin' 12 already! Give him an Intel manual and tell him to start reading for f*q's sake!

      Buy him a TI-86 or TI-92 calculator (none of that ti84/ti83 nonsense..) and get him playing drug wars & tetris.

  23. 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: 0

      Doodlings of children are indistinguishable from valid Perl scripts.

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

    3. Re:Perl by 93+Escort+Wagon · · Score: 1

      Doodlings of children are indistinguishable from valid Perl scripts.

      Doodlings of children usually are valid Perl scripts.

      --
      #DeleteChrome
    4. Re:Perl by Hurricane78 · · Score: 1

      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.

      I thought that’s the same thing... ^^

      Oh, and never forget: Don’t make another basement dweller.

      --
      Any sufficiently advanced intelligence is indistinguishable from stupidity.
    5. 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.

    6. Re:Perl by Anonymous Coward · · Score: 0

      Oh dear, now the python/perl war is invoked, it will go downhill in a handbasket quite nicely. oh my, this had been suh an interesting conversation up to this point. Now the perl divers and the snake charmers shall degrade the signal to noise level gradually until moderation sets in and the thread ends in frosty stares over moderator gags. sigh...

    7. Re:Perl by a0schweitzer · · Score: 1

      I've just started to program, and I'm in the process of learning perl. Form this experience, I'd say it's a good place to start. It removes (from what I can tell) a need to focus on complicated syntax and allows you to learn the basics of loops and stuff before you have to worry about technicalities (like declaring variable types, etc). Mind you, I technically started programming on a TI-83, but hey. I assume if you're looking to teach him, it's becasue he wants to learn. As others have said, there's no point in teaching him to program if he doesn't have the right logic circuits.

  24. Game Maker by raving+griff · · Score: 1

    Depending on your kid's preferences, there is a good chance that he likes to make games. I find that Game Maker can be a great starting off point for a young programmer--it has a simple, graphical interface with a simple programming UI that, while drag and drop, still programming logic and structure. Then have him graduate to using GML, which is the programming language included with Game Maker. Its syntax is very similar to C and C++ and, at least for me, it proved to be an excellent introduction to programming.

  25. Ease in with scratch by ajaxlex · · Score: 1

    MIT's Scratch http://scratch.mit.edu/ is a remarkable environment that will allow for young programmers (as young as 6 and 7 ) to become familliar with subroutines, variables, conditionals, message passing, etc. in an environment that makes it easy to express things visually. For a 12 year old, it might be worth a month of exploration in that environment, then on to a conventional language.

    1. Re:Ease in with scratch by OttoErotic · · Score: 1

      2nd that. Seems perfect for this question.

      /. mentioned it a while back.

      --
      "Once in Hawaii I had sex with a 102 year old male turtle. It is difficult to argue that it was consensual." - Steve Ma
    2. Re:Ease in with scratch by bellwould · · Score: 1

      Another vote for Scratch. Programming concepts are learned transparently without issues like environment, syntax, etc.

    3. Re:Ease in with scratch by FictionPimp · · Score: 1

      As I said previously, this is a great teaching tool for any age.

    4. Re:Ease in with scratch by JetTredmont · · Score: 1

      I would agree with Scratch as well. We ended up going with Alice for our 13-year-old, as the 3D interactions seemed more her style, but the social networking aspect of Scratch is a really powerful point in its favor.

      For those too lazy to click the link, Scratch is a Smalltalk-style language wrapped in a graphical shell which makes it impossible to create syntax errors (you drag/drop code snippets and pick arguments from drop-down lists) and very easy to create simple 2D graphics and interactive apps. It also allows the programmer to post his creation on the Web for other Scratch users to download and improve on, and of course allows him to take someone else's fully-formed app and tweak it to his liking.

      The only downside I see is that there isn't much of a "natural" next step once you hit the ceiling of its capabilities. But then, by that time there's a good chance your brother will have decided he likes this programming thing enough to invest some time and abstract thought in Python or whatever, or that it's not really worth all the fuss.

    5. Re:Ease in with scratch by kjenks · · Score: 1

      Scratch!

  26. Game Maker 8 by Anonymous Coward · · Score: 0

    Just released and has potential to make programs along with games. Can also do 3D for the advanced crowd. Very easy to program with. Can begin with drag & drop actions to easily learn structure.

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

    Paper tape reader sold separately... :-)

  28. No, no. by toby · · Score: 1

    Speaking as a programmer who followed that "royal road" of BASIC->Pascal->C->and beyond .... But that was 25-30 years ago!

    Today: Lead him AWAY from C/C++ and towards VHLLs (you choose, there are so many good examples).

    In fact *start* with a VHLL. Scheme would not be bad. There are plenty of other suggestions in other comments.

    Imperative programming can be a limiting paradigm and difficult to grow beyond. It is better, imho, to be exposed to a variety of paradigms, especially functional and declarative, early in the learning process.

    --
    you had me at #!
    1. Re:No, no. by Anonymous Coward · · Score: 0

      Basic was the VHLL of it's time.

    2. Re:No, no. by glorpy · · Score: 1

      Precisely my thoughts. Data structures and pointer management are important concepts to understand, but they should not be "end goals" so much as means to an end - a career in electrical engineering or programming - which is something the kid is not ready to decide upon.

  29. Insufficient information by thethibs · · Score: 1

    By "interesting things", we'll assume you mean interesting to him.

    Given his age, that probably means something webish, so Javascript is the obvious choice for the kind of instant gratification a 12-year-old will need.

    If he's into games, then the language of choice is probably whatever will let him mod his favourite.

    If he likes to play with numbers, it's VBA and Excel--or R.

    Is he into computer graphics (not digital painting)? Then you want to introduce him to Processing.

    Lots of choices

    --
    I'm a Programmer. That's one level above Software Engineer and one level below Engineer.
    1. Re:Insufficient information by Anonymous Coward · · Score: 0

      If he likes to play with numbers, it's VBA and Excel

      I believe teaching VBA to children qualifies as child abuse in some jurisdictions - OP may want to check with the local authorities first. :)

    2. Re:Insufficient information by Anonymous Coward · · Score: 0

      If he is into games, I would suggest show LUA to him in combination with some of the many games you can use it in.

      I used to use it with a MUD client and it was a lot of fun. With very little knowledge of programming and LUA you can write a program that will basically play your character for you. Which is kind of fun and interesting.

  30. at 12 I learned HTML by EW87 · · Score: 0

    HTML fascinated the hell out of me, so i tried it, made some Pokemon websites, try something simple that has impacting results when previewing the code.

    1. 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).
    2. Re:at 12 I learned HTML by cbhacking · · Score: 1

      I agree with you fully, however... DHTML (specifically, using JavaScript to make HTML dynamic) is a pretty fun and "instant gratification" sort of programming. You're using a real language that is in wide use today (albeit not one with particularly clean syntax or exceptionally large libraries), and something like a number-guessing game can be written in like 15 lines of code (plus some HTML to wrap it up).

      That said, if you want to get into *programming* right off, starting with Visual Basic.NET is a decent enough pick. It's less bad-habit-inducing than previous flavors of BASIC, and a good IDE (such as Visual Basic Express Edition, which is free) will help you learn the libraries and even the syntax quite well. It's also very easy to write a simple GUI in it, and you can either go with procedural-style code or jump right into full OOP (one of the biggest advantages of VB.NET is that it is a "real* OOP language, with inheritance and generics and everything).

      For bonus points, once you're familiar with core programming concepts and the standard .NET libraries, transitioning to C# is pretty easy - new syntax and slightly more complex structure but also more powerful, and it uses the same libraries. From there, moving to C/C++ isn't very difficult either. Each step changes as little as possible.

      --
      There's no place I could be, since I've found Serenity...
    3. Re:at 12 I learned HTML by Alchemist253 · · Score: 1

      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.

      While of course strictly true, I don't think that for the true beginner "programming" is actually the most important thing.

      Learning to write HTML (okay, learning to write standards-compliant, non-lazy HTML) forces one into the mindset of thinking about how a computer is going to interpret something. Don't underestimate the effort involved in parsing a line of code, be it a loop in C or a row of table data in HTML; training one's mind to be able to walk through code of any flavor is a crucial skill to hone early on.

      Some of my first efforts to make a computer do what I wanted programatically involved creating simply web pages (this was back in 1993 or so). It was very exciting to see the results of my work, and figuring out why my output didn't look quite right was, in effect, my first exposure to the debugging process. Eventually I wanted one of those newfangled email forms, so I next picked up Perl. (Yeah, please refrain from poking fun at my early language choices.)

      So, HTML proved a "gateway drug" into software development. Many years later, I came to learn C, Obj-C, Python, PHP/MySQL, etc. "Programming" can wait - let kids start out with web pages.

      (As an aside, I never did learn Java. In retrospect, I wish I had learned Java in lieu of the Perl and PHP I cultivated for server-side web work; while Perl has definite sysadmin uses, Java could have replaced PHP quite satisfactorily and would have been more broadly useful outside web work. Just advice I would give to those starting to program.)

  31. Simple! by Reziac · · Score: 1

    Tell the kid there's something nifty hidden on the computer, but that he'll need to write the tools to get at it. He'll be learning to code in no time flat. :)

    --
    ~REZ~ #43301. Who'd fake being me anyway?
    1. Re:Simple! by thethibs · · Score: 1

      There's something to that. It's how I learned.

      They put me in a room with nothing in it but a computer no one was using, and a box of manuals. Curiosity did the rest.

      --
      I'm a Programmer. That's one level above Software Engineer and one level below Engineer.
  32. Learning to code by Anonymous Coward · · Score: 0

    I once remember someone talking on IRC once about his childhood. He was 'caught' trying to learn BASIC at around age 7 or 8.

    Fortunately for him, his father was a professional. He gave him a copy of a C tutorial book targeted to kids (I can't remember the name) and a compiler, and warned him that he'd be grounded if he ever tried to go back to BASIC again.

    My parents weren't as informed, and I had to suffer through GW-BASIC from second grade onward, moving on to complicated VB Excel macros and JavaScript in middle school for lack of a decent compiler / any sort of supervised learning throughout. I'd highly recommend avoiding this 'approach'.

  33. Anonymous Crowd by Anonymous Coward · · Score: 0

    Suggest the 12 year old starts with this book... Learn to Program, 2nd edition, by Chris Pine. http://pine.fm/LearnToProgram/

  34. Scratch for starters by sfranklin · · Score: 1

    http://scratch.mit.edu/ is a good place to start, I would think. Let him do some of that and then when you start to hear, "I wish I could do X", point him toward something more complex. I've seen Python and Ruby both suggested as that next step, and I'd add Perl to the list.

    --
    Skip Franklin
    It's always darkest just before it goes pitch black. -- despair.com
  35. 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__()
    1. Re:Python + a Logo-inspired module = cool! by poopdeville · · Score: 1

      Ugh, that sounds awful. Logo is a Lisp, you know. Why implement it poorly, using non-functional constructs?

      Teach kids functional programming. Don't saddle them with your own limitations of imagination.

      --
      After all, I am strangely colored.
    2. Re:Python + a Logo-inspired module = cool! by Anonymous Coward · · Score: 0

      The learning materials, third-party libraries, and support community are all still using Python 2.x predominantly and will be for a while yet, so 2.6 would be the least painful, most useful version of Python to learn with right now.

    3. Re:Python + a Logo-inspired module = cool! by Anonymous Coward · · Score: 0

      Have a look here:

      http://www.archive.org/details/IntroductionToPythonUsingTurtleGraphics

  36. start with motivation, rest follows by jkajala · · Score: 1

    Show him what you can do with programming. Show him something cool, which is still reachable so he can imagine himself doing that. Just some lame "you will get good jobs after 100 years" thing doesn't fly I think. For me the "defining moment" was when I saw Scandinavian "demo-scene" stuff at the age of roughly 11. After that, I really died to learn 3D-programming, and I've been coding pretty much every day since. :) I started with C, but it seemed so complicated and difficult to learn that I moved to x86 assembly, and learned that way. Couple of years later of course moved back to C, but that time with different perspective already -- as the projects grow in complication there was need for something more high-level. Pretty much same way ended up in OO-programming, I noticed I was more or less doing OO-programming already but just cumbersome way, so transitioned to C++... But anyway, get books, lots of them. I've met some programmers who have never read a programming book, but I still believe clearly organized and though-out book is a much better way to learn something "right way" even if basically all the information is in Internet.

    1. Re:start with motivation, rest follows by beefnog · · Score: 1

      Holy crap... when I compare your comment with mine I can only conclude that we're doppelgangers!

  37. What can be done BY programming by ivoras · · Score: 1
    For me, programming was never ever the goal in itself. Sure, it was fun experiencing building something out of more-or-less abstract logic, but it was always about what I could *do* with the program. E.g. solve practical (i.e. of immediate concern to me) problems. Of course there are other personalities - those more mathematically oriented who end up in pure CS.

    My suggestion would be - show the kid what he can do *with* programming, then see what he likes best and then choose an appropriate language / environment for him. If he's graphically inclined, you might want to start with e.g. Flash. If he's fascinated more by how quicksort works then maybe Haskell or LISP.

    Python can do all those but it's for people who already know what they want.

    --
    -- Sig down
  38. Getting started quickly and transitioning by Anonymous Coward · · Score: 0

    If you want to get him started quickly with something he can play around with on his own there are a lot of languages which now exist specifically to teach young kids. Check out Scratch from MIT (It's a visual language for making interactive animations with sprites), or Alice from CMU. There's also TurtleArt which is a graphical representation of Logo and has a number of mathematical blocks in it. Once he's having fun and doing something exciting then transition him into a more formal language like Java, C, Ruby etc. As previous posters have said, the language itself isn't nearly as important as the IDE, and because of that I'd recommend going with Java or Ruby when you transition. Java has some good learning IDEs like BlueJ or WhyLine and Ruby has a number of environments with interactive tutorials. Your brother might even enjoy reading Why's Poignant Guide to Ruby, which is available free online (though as many people seem to hate it as like it). There are lots of tools available to teach programming these days and you don't need to rely on the same outdated examples that bore most kids.

    Also take into consideration that Java then C are currently the most taught programming languages in universities, while Java, C, and C# are the most commonly used languages in industry (though this is starting to change).

  39. Processing by Anonymous Coward · · Score: 0

    Check out Processing (http://processing.org/). It's easy to get off the ground quickly, comes with an IDE, and offers a lot of simple primitives for drawing and sound.

    1. Re:Processing by slim · · Score: 1

      +1 for Processing.

      It's the modern equivalent to all the stuff I did in BBC Basic when I was a kid. Yet it does it within a language framework that will lead naturally on to "proper" languages (Processing is very Java-like indeed)

  40. Whats wrong with BASIC? by The+Cisco+Kid · · Score: 1

    It was good enough 'then', and would still work the same way.

    If he is put off by it, perhaps LOGO (Yes, the one with the little 'turtle' that you program to move around and draw lines.

    1. Re:Whats wrong with BASIC? by firewood · · Score: 1

      Plain old-fashioned Basic might not be perfect, but computer programming literacy seemed much higher back in the days when every popular 8-bit personal computer came with a Basic interpreter. Nowadays, they seem to want to keep young people as mere users, until they are old enough to worship scalable software engineering practices, instead of just having fun coding a few lines of whatever.

      IMHO, I think there's great value in a greater number of people learning what it is to code up a few lines of whatever, even with GOTOs and unstructured globally scoped everything included (which is actually closer to how the hardware in simple computers actually works).

    2. Re:Whats wrong with BASIC? by crazycheetah · · Score: 1

      I essentially started with BASIC at a summer college program when I was 8 or 9. I don't know what language we used there, but it was on Macs at the school, and they focused mostly on drawing patterns on the screen. Of course, at that time, my partner and I accidentally figured out how to move a box around the screen and have the foreground and background switch through a list of different colors in seizure-inducing style. Some of us also programmed boxes that would race each other, a random one winning each time, and other such things. For a first exposure to programming, I still support BASIC, even though I wouldn't use it unless the project warranted it, any more.

      After that was over, I used Liberty BASIC for some time. Liberty BASIC is actually an awesome language to get a good footing in on programming as well, and one I really recommend for just beginning to learn programming. It's simple, and you can get to doing some rather basic things in it rather quickly, while having a good chance at getting your foot in the door at some of the thought process and other things you'll be using later on in more advanced languages. It's got some good sprite stuff for simple 2D graphics and such, making it rather attractive if you want to show him how to make a game, but it also begins in command line (something that the *nix lover in me loves, especially when Liberty BASIC is Windows).

      It was after that, that I switched to VB (pre-.NET). After playing with VB6, specifically, for a while, then I finally began learning C/C++ when I was 15 or 16. I can't say that I regret the path I followed there at all; C/C++ introduced a challenge, but I had a lot of the basics down in BASIC style syntax already. Of course, at 8, I was also playing with HTML and Javascript (specifically, for here, the latter), which gave me a little lead into the C-style syntax, and made the whole transition relatively easy.

      Though, I have to throw in my tidbit of I still support learning ASM somewhere along the way. I never got great at ASM or anything, as I only wanted to do it for learning purposes, and so I did a lot of just embedding it in C/C++ code. However, the lessons that ASM taught me are invaluable every time I sit down to program, as it got me thinking of how the computer is actually working with what I tell it to do. As low level as C might be, it still has a good amount of abstraction over ASM, and I found my code to get cleaner in C after playing with ASM a decent amount. Of course, now, I'd struggle to make a program in ASM again, as I'd have to relearn quite a bit, but the goal was learning and gaining another perspective. And several, even higher-level languages have bits and pieces that can be great for that purpose, beyond just being useful in their own respects.

  41. Logo by thunderbee · · Score: 1

    Seriously.
    You get immediate visual feedback; and it is properly structured unlike basic. Move on to pascal afterward, then C.

    --
    In my opinion, Scientology is a cult you should avoid.
  42. Programmable Graphing Calculator by Anonymous Coward · · Score: 0

    It's simple and portable and provides a graphical/alphanumeric display. It will introduce him to variables and conditionals and loops and stored procedures. And it could be immediately useful to him in his studies.

    1. Re:Programmable Graphing Calculator by toastar · · Score: 1

      i learned to program on basic on an old TI, I know this doesn't lead well into C, But it gets them started with something they will use heavily in their high school years

    2. Re:Programmable Graphing Calculator by Nyall · · Score: 1

      For the ti89/92+/v200 series calculators you can write C programs on a PC and compile with GCC.

      --
      http://en.wikipedia.org/wiki/Jury_nullification
  43. 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
  44. The Same Way I Am by Plekto · · Score: 1

    My son is just turning eleven and his "wish" for his birthday is to get his own computer(his last one died a few months ago) and learn to program.

    1: Linux. Learning a in real hard-core operating environment like this is very similar to what we had to do in the 70s and 80s where everyone built their own box and had to do everything from scratch. Also, it's a lot like those old electronics kits - you learn the basics that hard way from the ground up and you never have to worry about it later on. That said, I suggest Mint or something fairly streamlined and possible to live-boot in case he nukes the box with his fiddling.

    Also, such skills will be in great demand a decade from now when he's out of college and ready to get to work. There are book-learned programmers and then there are those who understand the science and technology behind it as well. This only happens if you start early and with the very basics and don't cut corners. (that aside, it does amaze me how many computer savvy people can't even do simple things like fix a power supply - or even change the oil in their car)

    2: Perl and HTML to start, then a few specific programs come to mind. Pov-Ray is complex but also is free and requires some skills that are very useful later on. Another good program to look at is NetHack/Angband/etc. They are old now, but they represent a great crash-course in entry level C programming. From there, have him work on 3-D programs ( look up "Mandelbulb" ), networking, and anything else that you can find that stresses math and programming skills over eye candy. You can also have him work on constructing levels for older games like Unreal Tournament or Halflife later on. Old as they are, they still are great to make mods for.

  45. Start with "Free Software" by Deorus · · Score: 1

    Get him to use Linux, and if he likes that, then start explaining how things work. Get him to do some basic stuff with sockets in C once he's comfortable with a Unix environment and the curiousity will evolve naturally. I would personally not put him in contact with any higher level programming paradigms just yet as he might get overwhelmed with way too many concepts, let him get used to the way computers work close to the hardware first, then introduce him to object oriented programming using a language of your choice (I would follow with C++, but that's my preference) and then slowly introduce dynamically typed languages and functional concepts to him. Whatever you do, just make sure that his bases are all properly laid before moving on to the next level. I believe C is a good starting language because it abstracts the programmer from architecture specifics without abstracting them from the fundamental way all computers work, and people get motivated when they understand that what they're playing with are the tools that everyone uses to build real stuff.

  46. Personal Experience by Anonymous Coward · · Score: 0

    I don't know if I am a good example, but I started out in 6th grade with a cheap program built for kids that used BASIC to build games. It included short little skits with cartoons to teach each individual command and including syntax. It was not very useful and hard to deal with at the time, but it laid the path for basic programming flow. Also that same year I discovered my sister's graphing calculator, which I then also started programming in. These were all very basic, but my sister appreciated the help with her tests in algebra.

    After this primal sprites builder and programming IDE I moved along to a book that I found of my father's, which was Learn Visual Basic in 24 Hours. I instantly installed the software and began reading. It wasn't until I started browsing the internet did I learn a lot more. The book was very limited on what it taught. A big part that helped me in my programming discovery was IRC. At 13 I was all over IRC where I found a lot of information. Beyond anything that a book could ever hold.

    Once I hit High School I moved up to C/C++ and eventually started programming for our school's FIRST robotics team. This is where I learned a lot of electronics and engineering as well. I ventured off a lot in electrical engineering. Anyways, C++ led to every other programming language you can think of. (i.e. Perl, PHP, Java, SQL, Python,Ruby)

    So to answer the question: Possibly BASIC might be a good route. QBasic would be good. Another option would be Ruby or Python. These are very simple and could be dissected and understood by any 12-year-old, with a little help that is.

  47. Um. No. by zizzo · · Score: 1

    Your question has a lot of what you want, not what he wants. So ponder that for a moment: if he doesn't have any interest, you're wasting both your time and his time, plus causing aggravation and friction. Ask him if he's interested, ask him what kinds of things he would like to develop, and go from there.

    Javascript, by the way, is the new BASIC. It's ubiquitous and you can get results quickly.

    1. Re:Um. No. by RockDoctor · · Score: 1

      Your question has a lot of what you want, not what he wants. So ponder that for a moment:

      I was searching down the thread from the start, waiting for the first person to say that, but I got bored. So I started from the bottom and worked up.

      I hope, for the sake of the children of SlashDotters, that you're not the first person to have pointed out this fundamental fact - that kids may not have the same interests as their parents, but are often quite good about concealing this from the parents. But, to be honest, I wouldn't be terribly surprised if you were.

      --
      Birds are not dinosaur descendants;birds are dinosaurs, for all useful meanings of "birds", "are" and "dinosaurs"
  48. python by Anonymous Coward · · Score: 0

    The snake that will die one day.

  49. Start with his own sandbox computer... by beefnog · · Score: 1

    I'm completely atypical in this respect, but I first learned to program in x86 assembly. Why? Because I was poor and the only computer I had was an XT clone that was given to me. I had no development tools except what came with DOS. I'm 27. I think the absolute best thing you could do is give him a computer to experiment with. Provide all of the tools for development, but don't try to prod him into your following. If the interest is there then curiosity will spur the pursuit.

  50. Find something more interesting than text by mdarksbane · · Score: 1

    I highly recommend teaching basic principles in whatever random scripting language you can do something *interesting* in. There are a few different systems online that allow you to script "bugs" or "tanks" or whatever kind of character around a map. They use a simple scripting language that will at least handle loops, control statements, and the concepts of variables and methods. More importantly, they give the new learner *immediate* feedback on what they're doing. Or you could go more into the physical world, and start in Interactive-C and Lego.

    The most important thing when you're first learning any skill is getting immediate "fun" reinforcement out of it. No matter what language you learn, it's going to be a lot harder to stick with it if all you can *do* with the language is print out text on a command line. Once they're doing interesting things in their wimpy scripting language, give them a harder problem that is a pain in the butt to do in that simple language, and show them how a more powerful language (and more powerful concepts, like object oriented programming) can help them do it.

    IMO, people worry far too much about teaching good design or a specific language early. Get them thinking about problems like a programmer first, then start showing them how good design or a different languge will make those problems easier to solve.

  51. Let him do it on his own ! by burni2 · · Score: 1

    That's the truth like you did, like you gathered all the pieces together to write programs. It's best done in his own way and pace of learning.

    What you can do, is to assist him, assisting is someway different from teaching :) keep that in mind.

    Give him a selection and let him choose, or go with him to a bookstore.

    And if he wants c#/c++ let him buy a book (bad we had xmas) he can download the express edt of visual studio on his own.

    Btw. for "Pascal" there is Turbo Delphi, given away at no cost from Borland/Inprise/Borland/Whatsoeverjustthemakersofdelphi, no real draw backs known, except some strange stuff nobody's using ;)

  52. I remember my introduction.... by lintmint · · Score: 1

    #include int main(char * argv[], int argc) { fprintf(stdout, "Hello World!\n"); return 0; }

  53. Linden Scripting Language by Baloo+Uriza · · Score: 1

    Open Simulator (which is what OSGrid runs) and Second Life both support LSL, and you can see tangible results from your code almost immediately after writing it. This will probably be a little bit more attention-holding than your typical hacking environment.

    --
    Furries make the internet go.
  54. C, PERL, PHP by Anonymous Coward · · Score: 0

    Personally, I picked up C as my first language when I was 12, so I know that other people can do it, too -- depending on how dedicated he is.

    Another thought is PERL; I have a friend from middle school that learned PERL as his first language when he was in 8th grade and continued to use it until college, when he switched to python.

    Finally, PHP could be quite nice -- simple, C-style syntax with capabilities out the wazoo, plus it allows him to use either structured or OO style programming and transition between the two, depending on where he starts. Another nice thing about PHP is the ability to make things happen quickly. In other programming languages, if a person wants to set up a GUI, there's (generally) a lot of work involved. With PHP, it's very simple (and we all know that kids like purdy graficks).

    Ultimately, as others have said, it depends on your brother's personality and interests in the first place, but I'd say that any of the three could be good places to start.

  55. Lisp or Assembly by Anonymous Coward · · Score: 0

    Either Lisp or Assembly. If you go the assembly route pick an architecture like 6800, MIPS, ARM, AVR.

    1. Re:Lisp or Assembly by bb5ch39t · · Score: 1

      If you like LISP, you might want to look at Clojure. It is a LISP variant which generate Java byte code. The of that is that you have all the Java infrastructure available. You can use it to write Tomcat / Jboss and other application server modules.

  56. Unix. by dynamo · · Score: 1

    The ideal programming language IMO to start him on is to make it clear that unix itself is a programming language, and show how it underlies so many modern electronic devices. Programs are functions, files are variables. I'd start by having him write some stuff for the command line. My first instinct to suggest is ruby, and I can't be objective on it but perl has always been a lot of fun for me, and then python, objectiveC, C, etc.. are all good options. Bash scripting is important to cover and mention from time to time but I'd not use it for a primary language.

    The important thing is what you do with it. I don't know your son but in general the best way to grab a child's attention is by teaching them how to control something visual or audible and potentially cool. With this in mind, Javascript is another excellent choice due to the ease of changing visual elements and the natural lead-in to complexity. But there's a lot of noise between the differences of various html/css/javascript implementations so pick one and stick to it while he's learning - though a second well-chosen language would be helpful to teach generation of documents / programs / whatever in that second language.

  57. Get him an OLPC by Antique+Geekmeister · · Score: 1

    He'll have a fascinating device, he'll learn lessons in morals and human ethics for the entire world, and he'll learn more about how things work in both software and hardware than any Windows/Microsoft environment can teach him. It also won't run the latest Windows shooter games, but will allow useful browsing, networking, and access to data to actually do programming with.

    1. Re:Get him an OLPC by gmuslera · · Score: 1

      More important than that, at least in the ones deployed in Uruguay, they include already TurtleArt (logo), Squeak (to do from 2d animations to games, even includes an example tetris, and looks similar to logo in programming, but you are doing multitasking as controlling all the actors in the presentation), those 2 with a puzzle-like programming interface, and Pippy (python, not explored yet the implementation or how intuitive it could be for children). Those 3 are a good progression for learning programming to even younger children. And you can install that components in a "normal" windows/mac/linux computer.if you can't get the XO.

  58. C, Scheme or iPhone by drdrgivemethenews · · Score: 1

    C and Scheme are the "closest to the metal", meaning that they're the purest expressions of procedural and functional programming. He'll be most likely to learn good programming habits using those. But he pretty much needs to be interested in programming for its own sake to succeed with them.

    If he wants to do games, just bite the conceptual bullet, get an account for developing iPhone apps and let him use it. Or try out Android. Give him as much help as you can, but don't sweat getting him the answer for every question. Teach from your expertise, which is knowledge of general principles. He'll be teaching you the gory details in six months.

    -------

    Theory blazes the trail, but it can't pave the road

  59. The best language IMHO... by PortHaven · · Score: 1

    Adobe's ColdFusion...

    Here is why...

    It is very close to pseudocode, the language itself is nearly logic.

    Examples:

    Albeit the language is slightly more verbose. It is a rapid development language allowing for very fast production of smaller web projects. As skills develop your 12 year old can move to CFSCRIPT which is very similar to JavaScript and other C-syntax languages. But ColdFusion will allow a very easy entrance to programming concepts. Conditionals. loops and arrays. They can then progress to MVC model frameworks in ColdFusion. ColdFusion itself utilizes Java. Once they get the basics they can expand into the Java world.

    I am sure there are some who will advocate going straight into a language like Java. But I think breaking up the learning of logic and the learning of syntax into two steps is very prudent in education. ColdFusion adheres closer to logic in it's syntax. It has not been super-optimized for coding efficiency.

    ie: versus if(x=y)

    But it's syntax is less cryptic. It is also very easy to work with SQL databases in ColdFusion. This allows the 12 yr old to start being productive much earlier than they would in something like Java. And once they have an understanding of 0the logic and design patterns they should be able to move to any syntax. Hence why I think CF is a good language. It greatly reduces syntax issues adhering very closely to logic based pseudo-code.

  60. The thing that interested me... by 91degrees · · Score: 1

    This is vague musing hoping that someone else can expand. The BBC Micro's BASIC had a series of plot and draw routines built in. It was fun actually getting something tangible out of very limited beginner's knowledge. Not sure whether something with built in OpenGL would work. The basic GL operations are very flexible and easy to understand. Downsides are that actually setting up a window is a more effort than just typing "MODE 0" and glut is slightly distracting from a low level understanding.

  61. Getting There From Here by DannyO152 · · Score: 1

    The only advantage C has as a language is speed. It is difficult to read and relies on the programmer knowing enough not to shoot themselves in the foot. C++ has bolting upon bolting upon bolting of things in order to deliver OOP, and its primary advantage is the speed of C: it is semantic/syntactic goulash.

    As to today's problem, I gather one of the unspoken issues is picking a language the teacher knows well enough so as to answer the student's questions. Assuming from the phrasing of the question that the asker would like to know the better imperative languages to teach, then, maybe python is the answer. I've heard reports from a teacher of an undergraduate course that the students respond to it fairly well.

    But that brings us to another issue, the age of the student. How we learn differs as we grow through childhood and adolescence and the best language for an 18 year old may be totally unsuited for a 12 year old. Logo and SmallTalk (Squeak) are languages and runtimes which teach children the message and response paradigm of computing application. The Carnegie Mellon people are really excited about Alice as a teaching language.

    The way I look at it, one doesn't teach children about chemistry by launching into the shell model of electrons and discussing valences and bondings. No, one puts some lemon juice on baking soda and then explain what the child saw and in simple terms. Regarding teaching computing and an introduction to languages, I'd want to not bother the child with memory allocations and deallocations and I'm not sure the entry form bias of the Visual languages is all that energizing a subject matter. Interactively creating objects, moving them through space, and causing them to draw seems a lot more promising for introducing a child to the concept of programming.

    1. Re:Getting There From Here by larry+bagina · · Score: 1

      C has another advantage in that it's closer to the machine. Some people that only use higher level languages have no understanding of what's going on underneath or the performance characteristics of their data structures.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    2. Re:Getting There From Here by CptPicard · · Score: 1

      I agree with the sentiment, but the "shell model of electrons" analogy gives too much credit to low-level languages in the programming context. I have debated low-level programmers a lot on this, and the most fanatical of them always leave me with the feeling that they don't actually have any clue as to why higher-level languages have the kinds of entities in them that they do. To them it's just all "dumbed down library calls" to the low level, where the actual pointer-magic makes everything happen. They simply do not see the meaning of the higher-level abstractions that emerge, and understanding of which is IMO the more important part to really grokking computation from the theoretical perspective.

      I would actually go as far as say that low-level languages in the sense of asm simply are not present in any meaningful way in a language like Lisp, and/or they are trivially contained, and the value of a supposed bottom-up approach is very suspect...

      --
      I want to play Free Market with a drowning Libertarian.
  62. GPL LiveDVD/USB Distro + NDS Homebrew by jdogalt · · Score: 1

    My solution to this problem that I've been working on for years, but still has further to go is LiveDVD linux distribution, that includes all the source code to rebuild itself (the iso image) from scratch. Add to that, a cool interaction with some NDS homebrew, including all the source and compilers needed to modify that. Currently what I have is a fedora derived LiveDVD/USB that boots a PC into an electric guitar-f/x preamp, which when combined with speakers and a guitar, lets you easily start jamming with Rakarrack. For the NDS homebrew side, I have an application that lets the NDS talk via wifi to control Rakarrack in realtime. A TouchScreenWhammyPad implementation.

    For the long term goal to achieve what you described, I intend to add more simple GPL homebrew games, and a book walking a kid through the process of tweaking some little aspects of the existing games, maybe just text strings. That would get them familiar with the development process. Then maybe a complete tutorial implementing tic-tac-toe or such (from good overcommented template code of course).

    If you want to check out what I have so far-

    http://gzyx.org/

    (developer build of new f11 based version will upload today, and an f12 version should be coming pretty soon)

  63. depends what he likes.. by Youngbull · · Score: 1

    I would guess that at an early age you should appeal to their interests, if he is into "web2.0", social networking and that kind of stuff I would guess ruby and lead him towards ruby on rails later on, nice loving language, powerful framework.

    If he like games, python and eventually teach pygame or pyglet. Maybe you'll put competing together in PyWeek as a goal.

    If none of the above applies but he have a general interest in computers, Haskell is just a jawdroppingly beautiful language. Functional and typed. I just love it. Graham Hutton: Programming in Haskell is a great book for learning Haskell, and if your looking for an online resource there is always Learn You a Haskell For Great Good

    1. Re:depends what he likes.. by Youngbull · · Score: 1

      An instant after I had written this I regretted doing so, because I suddenly remembered the old wise words of Why the lucky stiff... Teaching programming should be easy, fun, in collaboration with other kids, done on the child's terms and not be about how a computer works. I wholeheartedly hope you teach the kid ruby with hackety hack. Because it's all of the above and done in a language the is all about readability and doesn't have the "first you have to do like this and then that" that many other languages have. Take C or Java, you'll either have to wade through a lot information or you have to just leave a blank at many questions like: "why do I have to write include stdio?", "what is this int main()?", "why do I have to write public?", "what is an int?" or even "what is a compiler?" or "what is a textfile?" In ruby you might jump those initial questions in a couple of sentences for instances like this: "I'm going to teach you many different ways of hacking, but we are going to start here with this program called irb, and do the first steps. Now in this program type puts "hello world", which puts "hello world" on the screen..."

  64. should you bother? by Anonymous Coward · · Score: 0

    My brother tried with all his might to get me into QBASIC when I was that age. I refused to use it, because it looked like a shitty language compared to C/C++. I also avoided PASCAL like a plague because it looked ridiculous and no one was really using it for anything meaningful. JAVA didn't exist back then.

    I also refused to use C, when I saw how much more sophisticated C++ was. As a result, the very first language I taught myself was C++ when I was 13. Then after I became proficient in it, I learned to code C and became a C bigot for awhile due to the fact that C++ was more bloated and cumbersome. I used Linux and C throughout all of high school, and hung out on #c on efnet.

    When I got into college, I decided to focus on C++ again because at that point I started to realize the strength of OOP designs. Even though the programs were longer, bloated, slightly slower, and more cumbersome they ultimately led to more interesting programs and easily maintainable/readable code. I still avoided JAVA which now existed, for the same reasons I had left C++ originally.

    After I graduated I got my first job because of C++. Though, while on the job I began to see the benefit of a language like JAVA for simplifying cross platform development and GUI development. This is because, for the first time, I was forced to code MFC on Windows for GUI development, which I had not yet been exposed to. It was to me the most disgusting API I had ever seen in my life. I was required to do it because the lead developer had developed their Windows program with MFC using ATL which *supposedly* made it easier to read but not by much. The move to JAVA for me made sense because of the pristine GUI API and also because the owners of the company wanted me to port the MFC application to Linux. I ended up rewriting the application in JAVA on both Windows and Linux and we were able to make it into an embedded application in a very small device even which is something they had always wanted to do.

    At this point I gave up C/C++ entirely and became a JAVA advocate, I also tried my hand a year later at C# and rewrote their application in C# on a handheld PDA using the compact framework. I made one of the biggest mistake in my careers when I wrote a memo criticizing their inability to hire a proper manager. They had laid off my manager and as a result I didn't have any direction and was just coding random software, which while fun was leading to situations where I was being yelled at for not having focus and being given poor yearly reviews. So, I had written an email to one of the managers of the EE department, who was the one yelling at me, stating that because they refused to hire a proper manager and were having me managed by his son who never showed up to work I didn't deserve to get bad reviews and I refused to sign off on a poor review, I said I'd rather resign. Then bam, next morning he sat me down and shook my hand and said resignation accepted. I was out the door minutes later shocked with all my books in my hands. I never thought they would essentially fire me, because I was their only good programmer who knew their platform inside and out and I was such a hard worker.

    My next job, which I got about eight months of job searching required I go back to C++. They didn't like C# or JAVA and only wanted their code done in C++ and Visual Basic 6 lol. Of course, I turned my nose up at VB6 but I learned and coded it anyways because they demanded it. I also learned VB.NET with the hope they would let me rewrite it, but they never did. I wrote some programs for them in C# that they ended up allowing, though they didn't like. They ended up laying me off, after a couple of years, even though again I had become one of their most proficient programmers and they had invested a lot of time in me. I think my lack of focus and programming in languages they didn't like probably again led to my dismissal. That, and they replaced me with cheap labor from india. I met one of my replacements as I was on my way out, he had only been in the countr

    1. Re:should you bother? by Anonymous Coward · · Score: 0

      get a fucking blog.

  65. Nudzo by Anonymous Coward · · Score: 0

    At 14, I've fist time start something to program... it was Basic, after cca 6month a moved to Z80 assembler. I think it was a very good practice. After 20 years I've been looking at this way that it's perfect to start with some 'smell' of algorithmic thinking and then move to deep dive to roots for a while. In young years it could be benefit cause of ability of young brain to absorb such huge quantum of informations. Details are gone after years, but something like right intuition lasts, which is great benefit in next personal IT movements. ;-)

  66. Editor's remark... by Saint+Ego · · Score: 1

    The demographic already has a great deal of preconceptions about how to train a 12yo to program. My kid is only 5. Go back and edit the post to capture a stronger market demo...

    --
    Reality is prettier inside my head...
  67. VB6 on WinXP by Anonymous Coward · · Score: 0

    Visual Basic, preferably 6.0, preferably running on XP.

    If he takes to VB, then that can lead him easily enough to C. With full access to the API there is not much that VB6 cannot do that C can, including pointers, raw memory blocks, pointers into raw memory blocks, subclassing, etc. I don't program much anymore, so I'm not sure what VB.NET gives you programatic access to in a Win7 environment.

    If he takes to using the VB->API bits, then something like OpenWatcom, which can lead him into DLL programming without getting him dependent on MS' Visual Studio interface. The reason being that if you're familiar with other IDEs, you can get accustomed to VS, the corollary is not necessarily true.

    With that said, don't pressure him. Keep it fun for him and back off if he shows no interest.

  68. Shamless Plug by icknay · · Score: 1

    Check out http://javabat.com/ for coding practice (the *teaching* of the material is still a problem, but JavaBat is great for practicing)

  69. Book for beginners by Anonymous Coward · · Score: 0

    There's this book called "Hello World!: Computer Programming for Kids and Other Beginners": http://www.amazon.com/exec/obidos/tg/detail/-/1933988495/ref=ord_cart_shr?_encoding=UTF8&m=ATVPDKIKX0DER&v=glance

    I didn't actually read it (it's sitting on my shopping cart for a long time), but it's got good reviews, if only a few.

  70. 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.
    1. Re:Lego Mindstorms by Anonymous Coward · · Score: 0

      Agreed. Turned me on to programming.

      Once you have interest built, the kid can learn anything.

    2. Re:Lego Mindstorms by smithwd · · Score: 1
      My son started on scratch from MIT when he was 7 or 8. Scratch is similar to Lego Mindstorm - in that it is a simple visual programming languages PLUS it is free. He spent a lot of time developing simple games on it. From there, we went on to buying Lego Mindstorm after he demonstrated interest and basic competencies in Scratch. However, when he was 9, he started finding these simple visual programming languages to be too limiting.

      We then tried a simple C-like language for use with a Lego Mindstorm - but this was too much for him to learn at once.

      After some research, I downloaded a trial version of Phrogram - which I wound up buying and he used for quite a while. It is derived from Kids Programming Language (KPL) and targets teaching programming to high school aged kids. The language comes with an IDE with a compiler and debugger - and makes it fairly simple to do 2D and 3D graphics games. My son loved this language and has been writing software in it for about 8 months. However, he has recently been finding the Phrogram development libraries to be rather limiting and was getting frustrated with it - particularly in lack of GUI libraries.

      So more research on languages. He recently switched to working with Process, which is a simple Java-based language and associated development environment with more extensive library support. However, it lacks an integrated debugger. I believe that stepping from Process to Java is probably a pretty small step, but we have not gotten there yet.

      My son has not gone back to learning C/C++ yet, but I think he will get there eventually. He is only 10 - and he will have plenty of time to get there at his own pace.

      I had looked at Python and Lisp for him - but I wanted something that was a little more kid friendly. My son loves to show off his projects - and they have all been visually oriented with 2D or 3D interfaces. So picking a language with strong support for graphics is important for him.

      Most of his learning has been unsupervised. He spends a lot of time looking at code examples, borrowing ideas from these examples and building from there, I do spend time helping him figure out code bugs, etc. - but he has been self motivated in terms of what sorts of applications he develops.

      As you look at different language options, you need to consider a number of things - why do they want to learn to program? Are the language and development libraries well documented and organized in a way that a kid can use? Are there a lot of examples to work with? Do things work reliably and predictably? (For example, a buggy environment such as the C-based environment for Lego Mindstorm was a big negative.) Is it easy to get some kind of visual reward or feedback (e.g., easy to compile and test a program and see it working)?

      And - remember - positive feedback and encouragement coupled with lots of patience are probably the most important part of his educational process.

      --
      truth unquestioned lies ignored
    3. Re:Lego Mindstorms by RightwingNutjob · · Score: 1

      There used to be a C compiler for the mindstorms bricks. A few years ago (2004) it went by the name of NQC (not-quite-C).

  71. Start with HTML, CSS and JavaScript... by Anonymous Coward · · Score: 0

    I think it's best to get him going with something that shows results quickly. I would recommend to start him with HTML and CSS and he'll see how things come together and then start on with JavaScript if he wants to do something more complex. If he's still interested, he'll pick up other areas by himself, but HTML, and CSS should get him going to have something on the screen that he owns.

  72. Lego Mindstorm by Anonymous Coward · · Score: 0

    Lego Mindstorm comes with a great Virtual Lab for kids. Let them visualize first.

  73. Try Phrogram / KPL by MobyDisk · · Score: 1

    I taught my brother a bit using KPL, but looks like it has been replaced with Phrogram To me, it was like what I could do in BASIC years old - a few lines of code to draw some cool shapes then animate them. Very minimal meta-programming (importing libraries, using statements, make scripts, etc.) I actually was using it and feeling kinda jealous, like "why can't I be this productive in real languages?" It was a heck of a lot of fun too.

  74. I wasn't twelve but... by KneelBeforeZod · · Score: 1

    The first thing i learned to program was the TI-83 calculator.
    The programming language was pretty simple and easy to understand. You don't even have to make anything complicated to learn how it works. Just write one line and run the program, see how it works, fix it, and try again.

    Go for the TI-83 calc

  75. Reward his bossiness.. by sux0rz · · Score: 1

    Reward his bossiness and ridiculous demands, he'll become a high paid manager of C++ programmers in no time.

  76. There in only one rule: by Hurricane78 · · Score: 1

    Create the perfect motivating balance between too hard and too easy. The more close to perfect, the more motivation it will create.

    That can really be all there is, so someone has fun, is motivated and interested.

    Of course you can make it into a game, by
    seeing it as a toy (something that you manipulate out of curiosity, and that is fun [happiness with surprises]),
    and then creating goals to be reached by problem solving. (Usual goals are, to understand/learn interesting things, and to have fun.)

    I’d say some LEGO robotics, controlled by Python, should be a fun toy.
    And creating “levels” with goals, obstacles and surprises, and an end boss/level should make it a good game. :)
    Add real rewards with a value, and you got tons of motivation too. ^^

    P.S.: Be sure that you teach him social dynamics and how to handle girls with the same approach next year, so he does not end up in your basement. ^^ (Programming and being good with girls are not mutually exclusive. That’s just what we are socially conditioned to think. But what stops you from doing both? Nothing. You just have to allow yourself to go full scale. How hard is it, to decide that you will be like that. And then just be like that. :)

    --
    Any sufficiently advanced intelligence is indistinguishable from stupidity.
  77. Phrogram by ghjm · · Score: 1

    It's not free (by either definition), but it's the best thing for what you're talking about. It has a class-based language with similarities to Java and VB.NET but easier to learn, a simple 2D sprite engine that lets you write games immediately so you get positive feedback right away, and enough APIs to be able to do interesting things once you get somewhat sophisticated.

  78. Pick something actually designed with kids in mind by blamanj · · Score: 1
  79. If they use Windows... by spywhere · · Score: 1

    ...teach them the CMD-environment batch file language, which became a real computer language sometime around 2001 and becomes better and more powerful with each successive iteration of Windows.

  80. Processing by Anonymous Coward · · Score: 0

    How about Processing? Allows you to create some cool interactive projects, with great graphics support. Also a natural if you want to get into Arduino programming.

    www.processing.org

  81. Crobots by shawn.fox · · Score: 1

    I recommend Crobots. It is a fairly simple game where you create a program that operates a robot on a battlefield vs another robot that someone else has written. Limited C syntax but it has the basic programming structures. Way back in the late 80s I spent all summer building robots with Crobots.

  82. Not KAREL? by pspahn · · Score: 1

    While I worked as a special education assistant, I showed KAREL to a few students, and they were not only interested, but they found it fun.

    --
    Someone flopped a steamer in the gene pool.
  83. start with HTML then PHP by Anonymous Coward · · Score: 0

    start off with HTML coding.

    Teenagers like to see instant results and HTML language is fairly easy to pick up. You can help with setting up a website for the teen and then can go from there.

    1. Re:start with HTML then PHP by RPoet · · Score: 1

      HTML is markup, not programming. And PHP? Come on.

      --
      "Oppression and harassment is a small price to pay to live in the land of the free." -- Montgomery Burns.
  84. 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.

  85. Gamemaker, Scratch, or Java by LewisDaniel · · Score: 1

    Yoyogames gamemaker (http://www.yoyogames.com/) is an incredibly fun platform to learn, and its OO. Scratch (http://scratch.mit.edu/) is even easier. For more of a challenge try java or python. A challenging but very interesting intermediate-beginners project could be: design Conways Game of Life (http://www.ibiblio.org/lifepatterns/).

    1. Re:Gamemaker, Scratch, or Java by FictionPimp · · Score: 1

      Scratch is a awesome teaching tool. I've used it to help college level kids get their first start into program during the 100 level courses.

  86. C++ worked for me by thepieman · · Score: 1

    I am a computer science junior at RPI, and they start with C++ there. This way he has something that people actually use. A lot of the languages are quite similar as far as basic syntax, so it doesn't really matter which you start with, and C++ allows for the use of more complex programs to be written down the line. I would also like to mention that 12 years old is not to early to start, but even if they are not interested at that age, it doesn't mean they never will be. I have a few Mathematics major friends who have become interested in programming at the age of 19.

  87. Don't use a programming language by Kjella · · Score: 1

    I'd say starting off with any programming language, even the easy ones, is quite boring and it seems very far until you do anything "fun". I would use something like a scripable game, like say NWN2 or similar. Let him figure out the basics of variables, assignment, branching, looping and state from there and the result will be a little quests you can play. If and only if he's got interest in that I'd start him off with a real language. Pick something with a nice IDE so you don't have to know the standard library by heart, vi and emacs is so last century even with syntax highlighting. Then you can give him a bit more clues on memory management as appropriate for the language (RAII is vital to C++, for example), creating GUIs, read/write files and send/recieve over the network. That should cover most the basics, I'd leave databases alone unless he really wants to make something best driven by a database.

    --
    Live today, because you never know what tomorrow brings
  88. Does it really matter? by Ash-Fox · · Score: 1

    Does it really matter? I mean, I started programming when I was 9 in m68k assembler and at 11 I had somewhat Mastered it with extreme proficiency. From there I pretty much learned any other language I fancied.

    I don't think the language really matters as much as the aspiration to program.

    --
    Change is certain; progress is not obligatory.
  89. 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

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

      I'd just like to add this was done in alice 2.2. Alice 3.0 is currently in beta but is underwritten by EA, and uses characters from the Sims 2. It's quite a bit nicer than the 2.2 release, which as you may notice in the youtube video, the export to video option doesn't keep the video and music completely in sync, and your graphics card + version of quicktime can affect it greatly.

    3. Re:ALICE from CMU by Anonymous Coward · · Score: 0

      What is the goal of programming?

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

      I like to think the goal of programming is to promote logical/critical thinking, efficiency and the development and application of problem-solving skills; finding the best solution to a problem. Unfortunately, I think that the things you listed are overemphasized these days and deters people from the field (do the items in your list sound exciting?), robbing society of these key skills. The world seems to have a lot of problems..

      That said however, Alice looks like a nice educational tool

    4. Re:ALICE from CMU by perew · · Score: 1

      The goal of programming is to do entertaining and/or useful things. Alice is a wonderful teaching tool because it allows the programmer to do entertaining and/or useful things without fretting too much about syntax and semantics. In the process, the student is exposed to objects, methods, variables, control structures, functions, events, etc.. For many school-aged kids, those entertaining and/or useful things may be creating a moderately complex game or just telling a story (essentially a small animated movie). Keeping kids engaged and quickly making visible progress toward the goal, while exposing them to strong programming principles, certainly makes Alice a good teaching platform.

    5. Re:ALICE from CMU by udittmer · · Score: 1

      +1. Storytelling Alice might be more age-appropriate -if not gender-appropriate- though.

    6. Re:ALICE from CMU by KnownIssues · · Score: 1

      The goal of programming is to solve problems that are harder to solve than without a program. Every successful experience I've had learning something has been in trying to solve a problem that meant something to me.

      Are you trying to spark an interested in the subject of programming or are you trying to teach the kid a skill? Or is this piano lessons for the next generation?

  90. Well... Java. by Urkki · · Score: 1

    Assuming you'll be heavily involved and you know Java (or are willing to learn), I'd go with Java+NetBeans (or Java+Eclipse, or whatever). You'll program the framework (like a canvas for drawing), and let your brother to put the meat into it. Don't try to do any object oriented stuff, just imperative programming that happens to be in a class method. You'll provide a class with just one empty function with the canvas (or whatever) as argument to start with (and "throws Exception" so he doesn't need to worry about those, and whatever else secondary comes up). And then, program away.

    Using Java above is beside the point. The real point is, good IDE will show typos and syntax errors, and provide immediate argument help for any functions he wants to call, and has "scripting language feel" even though it's compiled. Oh, and teach him to let the IDE auto-format the code. That way he'll learn to look at correctly formatted code, while not being burdened with having to be pedantic himself, and he'll learn that if auto-formatting formats the code wrong, then there's a syntax error. I'd go as far as to bind auto-formatting to TAB key... In general, let him skip the required pedantry of any modern, complex programming language by letting the IDE show how it's done. Java just happens to be one of the languages with best free, modern, fully-featured IDEs, while not being the horror known as C++...

    I wouldn't recommend Python, it's too big and complicated for a first language IMHO, and I don't think there are good enough IDEs (or good enough Python support in existing IDEs) to compensate for it. Once he know the basics of programming, then python+pygame or python+pyglet can be a lot of fun, but getting started with them has the risk of getting frustrated with run-time exceptions that should be compile-time errors, manually keeping the indentation right, and perhaps too many complex concepts to start with.

  91. javascript is for pussies by Neil+Jansen · · Score: 1

    Javascript is for pussies. Teach him brainfuck.

    1. Re:javascript is for pussies by cp.tar · · Score: 1

      Teach him Malbolge. Enjoy the transformation of a normal kid to Sheldon Cooper.

      --
      Ignore this signature. By order.
  92. My father's solution by zaffir · · Score: 1

    My father's solution was to give me a copy of K&R's C Programming Language. It was slow going at first, to say the least. I found other C books to be a great help, particularly O'Reilly's Practical C Programming. Things that weren't explained in a manner in which I could understand them in K&R, were explained there quite well. But that's only useful if you think he'll enjoy pushing bits around like I did. Other, more high level and graphical stuff will probably be quite a bit more appealing if he's not really interested in writing stuff for the command line.

    --
    "Upon attaching the waterblock to my penis, I began to notice that I know nothing about computers." -- JRockway
  93. Me 2! by cephus440 · · Score: 0

    I started programming at a very young age. Similar to you, I started with BASIC (Atari 800 for me) and moved to Turbo Basic, Turbo Pascal, C++, JAVA, C#... and somewhere along the way I picked up FORTRAN. For a young man around 12 years old, I would suggest an interpreted language that would quick show the cause and effect of what has happened.

    I know how much Slashdot love MS, but there's this:
    http://msdn.microsoft.com/en-us/devlabs/cc950524.aspx

    The Mono project is also very awesome:
    http://www.mono-project.com/VisualBasic.NET_support

    Last but not least, jump right into JAVA with NetBeans. The IDE (although bloated) holds your hand through a lot of things.

    If there's a struggle with understanding, then good ol' HTML is a quick way to see results. After all, the 'Hello World' and making your name appear on the screen in different colors and blinking is very exciting when you're young!

    1. Re:Me 2! by cephus440 · · Score: 0

      Really? I don't get modded up for this? 4 post down just says use HTML and they score for 4 points!

  94. I'm shocked nobody's mentioned this yet... by Anonymous Coward · · Score: 0

    I tried to get into c++ at that age but quickly became discouraged; lots of complicated typing for 'text only' results. I wanted to see some action!

    Then about five years later I heard of a game called 'ColoBot', which is a 3-D adventure game in which programming in a c++ like language is the core of everything you do; you have a small group of robots on an alien world and you code their AI to perform tasks, from resource collection to building to attacking enemy aliens.

    I became instantly obsessed with ColoBot and writing better code for the robots; I played the game late into the night and arrived at work sleepy the next day for weeks.

    After I had become comfortable with ColoBot, it was easy to make the transition to actual c++ and creating my own games; my ColoBot experience had given me the confidence and the high-level understanding of the concepts to make the jump.

    The real key was that ColoBot felt like playing a video game, though 90% of what I was doing was imagining new types of tasks, coming up with code to perform them, and then debugging and improving the code over and over. ColoBot kept me interested with graphics, effects, missions, etc... until I was ready for the real thing.

    Though I've read /. for years, I've never posted here (hence anonymous coward), but I remember thinking 'where was this game when I was 12!' about ColoBot, and its effect on my own subsequent computer science experiences was too profound not to share.

    Good luck!

  95. Blue collar skillset by Anonymous Coward · · Score: 0

    Programming?!

    Tutor him in math, science, money, and other things that will get him ahead in life = so he can go on to much better things than programming.

    Teaching him programming is like teaching your kid how to be a janitor.

    And no, math has nothing to do with programming. In all my years, the most math I ever had to use was some high school level linear algebra - even at the CAD company i worked for. They hired math grad students to do that algorithms for the calculations and they coded the number crunching. Us CS guys just wrote the GUI, plotted points on the screen and file management stuff.

    Or teach your kid plumbing or electrical - something with a future.

  96. C Primer Plus by ditoa · · Score: 1

    Buy him a copy of C Primer Plus (5th Ed) by Stephen Prata and work through it with him. In my opinion it is one of the best introduction to C books available, if not the best and very friendly to first time programmers. Another option is Java: A Beginner's Guide (4th Ed) by Herbert Schildt.

    I too believe that learning the lower level things such as memory allocation is the best way to make yourself a better life long programmer so I would advise C over Java however I know a lot of people who only know Java (or C#) and do just fine however they knew next to nothing about what I consider to be "real" programming. Everything they do is drag and drop then writing some logic to handle an event and letting the runtime deal with the "nitty gritty" stuff.

  97. Dupe? by Anonymous Coward · · Score: 0

    Best Introduction To Programming For Bright 11-14-Year-Olds?

    Or is your brother not bright? :)

    You could always try searching for yourself....
    http://slashdot.org/index2.pl?fhfilter=askslashdot+language

  98. Competition by CAIMLAS · · Score: 1

    It doesn't really matter what he learns to program, but to teach a young man how to do something, the best motivator is, i think, a competitive challenge. There are many ways that programming can be applied in such a fashion: botting games, the games which are, in fact, programming exercises, and things of that fashion.

    The idea is to make it interesting, and interested people try to find solutions.

    Then just make sure you break him of the habit by making him write some sort of ERP platform, so he can grow up normal and find employment.

    --
    ~/ssh slashdot.org ssh: connect to host slashdot.org port 22: too many beers
  99. Start low, build up by Anonymous Coward · · Score: 0

    6502 or Z80 Assembly to start.
    68000 Assembly (luxury in comparison) to follow.

    By the time they get to high level languages, they'll actually have a clue how it all works underneath, how to write safe code, how to conserve system resources, and a host of other things - many of which translate directly into C programming practice...

    Of course, your kilometerage may vary....

  100. my experience by porky_pig_jr · · Score: 1

    When I learned the basic algorithms, we used Pascal. It had just a few quirks, so you can focus on logic. Subsequently I ended up mastering both C and assembly language fairly quickly and fairly well, and those became my main languages.

    Since Pascal is essentially passe, I would recommend some minimalistic interpretive language instead, like Python, as a starting point.

  101. Scratch, ActionScript 3.0, MySQL, Sqeak: SmallTalk by Anonymous Coward · · Score: 0

    All great languages for beginners:
    Scratch, ActionScript 3.0, MySQL, Sqeak: SmallTalk

    http://scratch.mit.edu/
    http://www.squeak.org/
    http://www.amazon.com/Squeak-Quick-ObjectLand-Gene-Korienek/dp/0201731142

  102. APL by Anonymous Coward · · Score: 0

    Start him with APL.

    I hear TECO makes a nice IDE as well.

    Seriously... QBasic would be a good start... I started on speccy basic and having the ability to easily toy with graphics made it very appealing. If he's in any way mathematically inclined, demonstrating how simple maths or even simple arithmetic can create all kinds of interesting patterns could pique his interest. As much as I love C, I agree with everyone else saying that its too advanced for a beginner. The shell script idea mentioned above is an interesting concept however. Either way, set him up with a code environment that allows him to experiment... so going with the QBasic idea, if he wants to code a game, you should write the code for him to switch to a graphics mode, get key presses etc. etc. so he can concentrate on the meat. I found that learning by altering example programs and seeing what happened was also incredibly effective.

    But the key thing is, as many other people have said, if he's not into the idea then there's absolutely no point.

  103. I think python is the basic equivalent these days by nedlohs · · Score: 1

    Or just jump into java with something like: http://www.greenfoot.org/

    Though personally, I don't like the whole "objects first" concept.

    Depends on how motivated the person is and whether they need the "I made a game" reward, or whether "I made the computer do what I wanted" is enough.

    Without actually thinking it through, the original Freedom Force game (2002 so will run on basically any modern machine) used python as the scripting language. You could do pretty neat things with small amounts of code and you got a "fun" test environment. But it's been a long time since I looked at that, there might be some drawback I don't recall making it a PITA.

  104. Only if the kid is interested by Madsy · · Score: 1

    When I was twelve, I moved from QBasic to C. C isn't that difficult to understand. If the child doesn't show any interest, don't push him/her. It takes a certain level of curiosity to like programming. It isn't for everyone. Choosing a dumbed-down toy-language doesn't make a difference, but being a good teacher does.

  105. Python by ProteusQ · · Score: 1

    Consider "Python Programming for the Absolute Beginner" by Michael Dawson. Python has the advantage of making sense in the same way that mathematics makes sense, so learning the language may have the additional bonus of helping him transition from computational math to algebra. As for the book, it has an extremely high rating on Amazon. One reviewer (C.L. West) states that he taught his nephew using this book.

  106. My strategy with my 2 kids by caywen · · Score: 1

    I have two babies and I'm always wondering how I'd teach them programming. The conclusion I came to is that I won't. Instead, I'll give them a computer and let them take their own path. For all I know, they'd eschew the programming, but go on to become amazing digital artists.

    If they are truly interested, they'll find C, or Java, or whatever, all by themselves. And daddy will be there to guide them along that path after they've found it.

    1. Re:My strategy with my 2 kids by mdarksbane · · Score: 1

      As someone who grew up without know anyone who knew computers, please be a little more hands on than that :)

      Don't force it on them, but if the kid has interest, help guide them onto it. Otherwise if they are interested they'll still end up spending most of their time playing computer games and slowly picking up bits and pieces of programming. I ended up a decent programmer, but I was ages behind where I could have been with a good mentor. There's a reason that so many engineers are the sons and daughters of other engineers.

    2. Re:My strategy with my 2 kids by caywen · · Score: 1

      I definitely will be hands on if they show the interest... But if they gravitate towards, say, politics, and I end up with Ender and Valentine, I think I'll just keep my C++ to myself :)

    3. Re:My strategy with my 2 kids by Rikiji7 · · Score: 1

      romantic...

      --
      slashwhat?
  107. Need more info by obarthelemy · · Score: 1

    There really is not enough info to give you advice:

    - has the kid voiced any interest at all, or are you more or less forcing that on him ? In the first instance you may go relatively hardcore, or at least art for art's sake, sooner, in the second case, you need a bit more demagogy.
    - is he interested in scientific stuff in general ?
    - does he do anything on a PC that may get him hooked, like play on a macro-able game, draw...
    - does he play with any programmable stuff, like Lego Mindstorm...
    - have you ever done anything else with him, or are you just trying to hook him up to so that he'll leave you alone with that "baseball" thing ?
    - ...

    --
    The Cloud - because you don't care if your apps and data are up in the air.
  108. Tcl/Tk by Anonymous Coward · · Score: 0

    With Tcl/Tk he'd be able to immediately start writing GUI programs, which may keep his interest more than just command-line stuff.

  109. Scratch from MIT by Anonymous Coward · · Score: 0

    Try "scratch" it's a simple graphical language.

    I find that the problem with most languages is that children want simple ways to do "cool" stuff. No one gets excited with plain text

      http://scratch.mit.edu/

  110. More answers on S.O. by icepick72 · · Score: 1

    I've also seen similar questions having lots of great voted answers on StackOverflow.com. For example, see these similar questions: http://www.google.ca/search?q=Teach+Year+Old+To+Program%3F+site:stackoverflow.com

  111. Its what he would like that's important. by jamie(really) · · Score: 1

    "I've got a younger brother who I'd like to teach to program"

    Why? Unless he comes to you, don't do it. You'll put him off for life. The best you could do would be to find out what he's interested in, and then do some of that on your own, and let him see what you are up to. See if he bites.

    Otherwise you might as well "like to teach him physics", or math, or shakespear.

    So, does he play shooters? Teach him how to script bots / gameplay in Unreal Script. Is he on youtube a lot? Teach him video editing tools. Ok, not programming, but technical. Interested in 3D? Get blender. Teach the math for raytracing. Facebook everyday? Teach him the API to write a cool app. So many possibilities.

  112. I would recommend FORTH by quarkscat · · Score: 1

    The syntax is simple. The basic operations are simple. The concept of 2 stacks to work with is simple. There is a core of operands/words (libraries) upon which all else is built. There is free on-line documentation available, as well as free versions that run under DOS, Win32, and Linux. It can also be easily extended later with C language. Even FORTRAN translates into FORTH without much pain. It a great learning tool for programming, and even if FORTH, along with C and ASM, is all your youngster learns, he or she could have a good future in the embedded programming field.

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

    1. Re:Go with ActionScript 3.0 by Anonymous Coward · · Score: 0

      Couldn't agree more: Flash is definitely the way i would go. Easy to publish and share on the Web, and it caters to both sides of the brain, so whether your kid is an artist or a programmer, he/she will get something useful out of the experience.

    2. Re:Go with ActionScript 3.0 by BenoitRen · · Score: 1

      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.

      In other words, the secret to using an OO language is not to use its OO features? Are you for real?

    3. Re:Go with ActionScript 3.0 by alanmusician · · Score: 1

      You don't need complex memory references to take advantage of OO. And the "secret" to OO languages is most definitely not procedural programming. That statement is just absurd. That being said, OO is generally something that developers come to to see the advantages of by getting their hands dirty with procedural programming first. OO is best learned as a solution to design challenges rather than a programming basic. Even though PHP's OO implementation is very weak compared to languages such as Java or C#, I find it a good language to learn OO concepts, partially because of its limitations. Plus a kid can easily deploy/show off his work if he's using a web-based interface. I haven't had much experience with Flash, but from what I've seen the same is true for it also.

    4. Re:Go with ActionScript 3.0 by Blakey+Rat · · Score: 1

      Dude, it's CrazyJim. Just be glad he's not pretending to invent every video game made in the last 20 years, or whining about how he can't get a job in the games industry despite spending a decade accomplishing absolutely nothing. Or writing a comic book about samurai swords with rockets in the hilt.

      Seriously, for a CrazyJim post, that's about the most sane thing I've ever read.

    5. Re:Go with ActionScript 3.0 by CrazyJim1 · · Score: 1

      No doubt you need to know OO to be an advanced programmer, but someone starting programming for their first time doesn't need to jump into OO. There is something cerebral about programming things like a laundry list. Once they get a hang on procedural, then you can introduce them to OO.

  114. Javascript. by zippthorne · · Score: 1

    Every computer that a 12 year old has access to has a ready-to-use javascript interpreter sitting right there on the desktop. Probably several of them. And they're all unrestricted enough to use for beginning exercises.

    There may be more legible languages out there, and there are certainly better "learning languages." but Javascript has an attractive price and portability, and the child might be able to write something that is genuinely useful, and of course show off to the class.

    You can't force programming on a 12-year old, it's hard enough "forcing" them to learn anything at all at school. You just have to remove the barriers and let her find her own way. Make sure to leave some "entry-level" books lying around and provide guidance when asked.

    --
    Can you be Even More Awesome?!
  115. teaching kids to program can be disappointing by OrangeTide · · Score: 1

    Don't be disappointed when your kids (or little brother in this case) is far less interested in programming than you are. You may never be able to inspire a kid to like coding as much as you like it yourself.

    It can be really tough to share your favorite hobby/occupation with a kid and not have him/her respond with the same passion for it that you had at that age. This happens to musician parents who try to teach their kid music and find out their kid just isn't that interested. And it is no different for us programmers.

    Sometimes a child will express an interest in programming. But don't be fooled, asking you about it is not the same as having a passion for it. And don't get upset if down the road the child wants to do something else instead. Be happy that they had any interest at all in the things you enjoy!

    Just make it fun and let the kid drive the direction of the teaching. You cannot rush this. If you try to dump decades of experience onto a kid in a few weekends it will seem like work to both of you. If the kid turns out to be serious classes or computer camp or something where they can learn and socialize with peers can be a great way for them to keep going forward and improve their skills.

    --
    “Common sense is not so common.” — Voltaire
  116. Groovy? by bb5ch39t · · Score: 1
    Is a fairly nice language. It is based on the Java JVM bytecode. The plus of this is that you can use Java code and libraries with Groovy. It also has a Web framework called Grails (like Rails, but with Groovy / Java as the language instead of Ruby). The syntax is fairly simple and easier than Java. The main plus is that you don't need to define your variables before hand. Groovy will determine the type when it is first defined. And semicolons are generally optional.

    http://groovy.codehaus.org/

    1. Re:Groovy? by bb5ch39t · · Score: 1

      Another plus to Groovy. You can start off just doing "normal" linear program writing like in Basic. But it also include OOP, like Java. But, to be really different, it also gives you the ability to write code in a Functional Programming paradigm. One language: three different modes of coding. And, of course, you can do all three in one program if you want.

  117. Interpreted by frisket · · Score: 1

    An interpreted language for sure -- Python is a good choice, but not the only one. Adding the complexities of compiling and linking are wholly unnecessary for a beginner. And preferably something with a decent development interface. But as already noted, only if he's interested. If he's not, buy him something physical and extensible instead (eg Lego)

  118. Anonymous Coward by Anonymous Coward · · Score: 0

    Scratch is a visual programming language from MIT with object-oriented structure and instant ability to create a new graphical game. I used it to teach a homeschooling class with 10 and 12 year olds, and they were way ahead of my detailed knowledge by the third class. Then some of the students headed into Python with me as a next step.

    Evidently the new Android Creator from Google will look a lot like the Scratch interface. Strongly recommend it!

  119. fortran by phrostie · · Score: 1

    Start him off with fortran.

    1. Re:fortran by Anonymous+Cowpat · · Score: 1

      excuse me while I expound this a little:

      Fortran is awesome for the following reasons:

      • It's just so flaming obvious - none of that monkeying with curly brackets
        program numbers
        implicit none
        integer :: i
        for i = 1, 10, 1
        write(6,*) i
        end
        end program

        That, along with a sample output, is completely obvious. C-style looping is completely impenetrable.

      • Fortran is, by default, case insensitive. This immediately stops you from doing stupid things like having variables called 'mapSize' and 'mapsize'.
      • F90/5 is not F77, it's free-form, you don't have to start commands in column 6, or put things in block capitals
      • Many of the things that you will want to do are available automatically, unlike C, you don't need to declare the math library at the top (and seperately tell the compiler to include it) just to use a square root.
      • Unlike higher-level languages, like python, fortran leaves you near enough to the metal to learn C later if you actually need that level of control.
      • Everything's free

      The only real disadvantage is that it's damn-near impossible to make pretty pictures directly with fortran

      --
      FGD 135
  120. I agree, JavaScript! by WebManWalking · · Score: 1

    JavaScript never stops being fun. And you can actually impress girls with cool stuff you can do with JavaScript on a Web page. Not many computer languages can impress girls.

  121. Best Teaching Language by omb · · Score: 1

    I would like to recommend (1) C, and (2) Python. NOT C++, or Java AT any price.

    Reasoning C, is simple and short to define and understand and is well supported with debugging tools ddd, and gdb, which now has reverse debugging and he will also learn about the POSIX api. Python is very clean, and 2.6 up has a very good Object Model and Library. It is the best language for people entering OO mode. Programmers who know C, Fortran, Cobol or Pascal seem to transition to Python easily. It also gas good built in debugging tools, just not as good as Perl, which continues to irritate me.

    No way start with C++, Java or Pascal. C++ + StdLib + Boost is just too complicated, and every iteration of the Standard Committee seems to make things worse, the two Scott Myers books are very useful and I ensure that anyone working on a C++ project knows of and reads them. But anything that needs that is a mess and the C++ world continues to multiply inherit the kludge of CFront or rather its effects on the language design and fix-by-committee. Java is too verbose and tends to have people depend on program writing tools, which is the last thing a learner needs. Pascal is old, and not going anywhere.

    Remember C was derived from BCPL which was created as a teaching language. I don't hold with the theory that it is necessary to protect the beginner from pointers and mandate a managed and garbage-collected language. If you are able, after a few months, you should show him some assembler and explain the tool chain.

    Compile -> Assemble -> Link -> Load (Debug), and,

    Compile -> Interpret ...

  122. TI Calculators by pozitron969 · · Score: 1

    This is how I initially got started with programming. We were required to purchase on of the TI-8X models of calculators for my high school math class. They come with a builtin BASIC language for programming. The language is simple and you can either use menus to add statements or type them. If you brother turns out to be really into programming he also can do as far as writing assembly language programs. In the more advanced models they have simplistic GUI elements for building windows, dropdowns and the like. It is a nice way to spruce up your program with little hassle. In addition to the programming language you have the benefit of access to the mathematics capabilities of the calculator. Everything from statistics, equations, This is very handy when you want to solve an equation in a program but may not be ready to write your own subroutine to do that. They have limited graphics capabilites, only grey-scale graphics and no sound. I think that as a first excursion into games and programming those items are fun but not required. Lastly I believe one of the strongest reasons to get something like this would be that it is portable. No need to bring a laptop, inverter, etc... I spent many hours in the back of my parents car typing away on my calculator. Porting games or even utilities for my math and physics classes. It was about either having fun or solving a problem that was important to me. My personal favorite is the TI-Voyage 200. It has a qwerty keyboard, larger screen and does symbolic math. Chances are if you brother is going to take a math class beyond Geometry he will probably want to have one of these anyway. Best of Luck!

  123. Try Scratch from MIT by The+Lurker+King · · Score: 1

    I've recently been teaching my 12 year old twins how to program with Scratch from MIT.

    http://scratch.mit.edu/

    It's fun, there's lots of examples, and they seem to really enjoy it.

  124. What does he want to do? by hedrick · · Score: 1

    I'd start by talking about possibilities with him. Let him decide what he wants to do and get a sense of how much time he's willing to put into it. I mentored someone starting at about that age. He did VB.net for a few months, did a project using it as an OO language, and then moved to Java. But his idea of a simple project is a Swing client talking to a multithreaded server with a database behind it. He made all the decisions on project and language. That may be an unusual situation, but I'd still let the kid make as many of the decisions as possible. Let him see some examples of a few likely candidates, and talk about what he wants to do. Scratch sounds really neat if we wants to play with graphics as quickly as possible. But at 12 I probably would have found it a little bit insulting. If he wants to tinker with IT infrastructure, Java is probably a better starting point,

  125. easier paths have less competition by bzipitidoo · · Score: 1

    How competitive is the family?

    My father is mechanically inclined. Always working on cars. I was never allowed to compete with him there. He does not understand programming at all, so it was a safe direction for me to explore without his interference, him always telling me I wasn't doing it right, always looking over my shoulder, criticizing, etc. When working on cars, it gets real old real fast when he laughs at you for occasionally having to think about which way to turn a nut. He never missed any opportunity to demonstrate that the old man is still The Man when it comes to cars.

    My younger brother might have been a good programmer, except that he couldn't stand being 2nd fiddle to me, and maybe I made it less bearable. He went as far as getting a Commodore 64, because it wasn't an Apple II which is what I started on. But he went no further. He did not become a expert Commodore hacker, as I was an expert Apple hacker. He passed by all the sciences and engineering, and went into finance and politics. He certainly could have done some engineering or science. There were plenty we had only passing acquaintance with, things like civil engineering, astronomy, or chemistry, to say nothing of medicine. A waste, perhaps? He perceived what society valued. I am perhaps more idealistic, and think too much about what society should value. He's richer than I am. He has a wife and children, and I do not. Well of course it isn't that simple, and there are many other reasons why things turned out the way they did. But it's a factor.

    So, asking which programming language is easiest could be misguided. You will tend to pick among what you know and like. Maybe the chief criteria should be what you don't know, so that you can't be an interfering know-it-all who can show him up anytime you want. If you know little of web programming, or even databases and SQL, then maybe little brother will take to it. Sounds crazy to even think of SQL? It's certainly a mess, with dozens of SQL dialects and proprietary extensions, and there is much that cannot be done in SQL.

    --
    Intellectual Property is a monopolistic, selfish, and defective concept. It is "tyranny over the mind of man"
  126. Forbid him by not-my-real-name · · Score: 1

    Forbid him to learn programming. You can be more specific than that - forbid him to learn Pascal or forbid him to write a program in Java that solves quadratic equations. The main thing is to forbid him to do it.

    --
    un-ALTERED reproduction and dissimination of this IMPORTANT information is ENCOURAGED
  127. C/C++ is not a language by johanatan · · Score: 1

    C is [for all intents and purposes] a proper subset of C++. Knowledge of C does not imply knowledge of C++ (specifically its polymorphism, templates/meta-templates, etc).

  128. Let the kid go play outside... by overnight_failure · · Score: 1

    Let the kid go play outside in the real world whilst he's still a kid, instead of sitting in front of a screen making friends with pixels.

  129. Windoze by omb · · Score: 0, Troll

    Don't use Windoze or any M$ tools unless you have to, though they look simple, they bring endless unnecessary complexity all caused by M$ trying to screw its customers, use Fedora, SuSE, Debian or derivatives and, when the install is done you have an OS and full tool chain

    Editors: vi, xemacs, gedit ...

    Compilers: C, C++, Fortran, Pascal, Ada

    Managed: Perl, Python, Java

    IDE: Eclipse ... ddd, gdb, valgrind ...

    If you have to do it on a Windoze box, Virtualize, or as a last resort use cygwin.

    1. Re:Windoze by Keeper+Of+Keys · · Score: 1

      Python works just fine on the windows command line (after it's been installed, of course). And there are several decent non-MS text editors; personally I like jEdit, but Notepad++ is another good one. Not used Visual Studio for IronPython, but I'd be interested in hearing people's experience; it's damn good for C# (not that I'd recommend that as a first language).

    2. Re:Windoze by ClosedSource · · Score: 1, Insightful

      "Don't use Windoze or any M$ tools unless you have to, though they look simple, they bring endless unnecessary complexity all caused by M$ trying to screw its customers"

      You're complaining about complexity and suggesting Emacs and Eclipse as alternatives?

    3. Re:Windoze by Blakey+Rat · · Score: 1, Troll

      Oh yes, obviously EMACs and vi are so much easier and less complex than the *free* Visual Studio Express you can get on Windows.

    4. Re:Windoze by Anonymous Coward · · Score: 0

      Yes, because we need more programmers who believe that learning how to program is the exact same thing as learning how to use a IDE.

    5. Re:Windoze by arth1 · · Score: 1

      Logically, they are. There are no abstraction layers between what you want to do and how you do it -- you have to specify every step of the way, and thus understand every step of the way. Visual [Anything] may SEEM like it's easier and less complex, but in reality it's far more complex, it just hides the complexity from the user, who (generally) has no idea what goes on behind the scene.

      But anyhow, I think the whole article takes the wrong approach. You can't teach someone to program. They can learn it, but not by you instructing them and limiting their choices. Make the options available, and let the kid find his own ways. If he can't, he was never cut out for programming in the first place.

    6. Re:Windoze by m6ack · · Score: 1

      Honestly, I have a six year old -- he's already learned the basics of VIM -- and he actually calls it his favorite "game." He presses "i" or "a" and types away & giggles as his daddy pronounces his silly made-up words. He knows to hit ESC and dd to start over again (IOW, he gets modality)... Kids are adaptable & can grasp more than we give them credit for.

    7. Re:Windoze by AigariusDebian · · Score: 1

      Usind an IDE is more complex than just usind a text editor and a command line. You write the code into a file and then tell python to execute that file. Two separate and very clean actions. All those IDEs and Expresses and Eclipses only get in the way of actual programming.

      A simple gedit will work just fine on Linux, then you can move on to Geany. Don't know what reasonable text editor to recommend on Windows as I have not used it (except for gaming) for like 8 years now.

    8. Re:Windoze by Brad+Mace · · Score: 1, Insightful

      Do you know how stupid and childish you look when you say things like 'Windoze' and 'M$'? All that does it let people know that they should ignore whatever else you're saying. And why exactly does a 12 year old care about "an OS and full tool chain"?

    9. Re:Windoze by evenmoreconfused · · Score: 1

      Good thing you didn't post your location -- a clear case of child abuse if ever there was one!

      Now my first child could tear down a machine and do a full reinstall of Windows 95 before he reached the age of 9 -- and the skill supported him all the way through both high school and college.

      --
      No. Well...maybe. Actually, yes. It really just depends.
    10. Re:Windoze by jlarocco · · Score: 1

      Okay, maybe I use it too much to see it, but what's complicated about Emacs? There are like a half dozen things to learn, then you can navigate through the entire thing and do just about anything.

      In comparison, Visual Studio is a never-ending maze of menus, toolbars, and dialog boxes.

    11. Re:Windoze by smi.james.th · · Score: 1

      I agree 100%. I started becoming interested in programming at that age, I found a C++ tutorial, and not knowing any better, I gave it a whirl. I got about as far as pointers and gave up, later I started on Pascal and got quite far, I wrote a few little DOS games that my brothers and I played, and I learned quite a bit. These days I still dabble a little in programming but it's not really my main field of interest anymore. The ability that I had to make my own decisions helped me learn tremendously though.

      --
      One thing I know, and that is that I am ignorant...
    12. Re:Windoze by DuckDodgers · · Score: 1

      Vim, Emacs (the GUI versions of both give menus with the commands so you don't need to memorize keystrokes), and Notepad++

    13. Re:Windoze by Shompol · · Score: 1

      You can use the bare minimum on Emacs, such as "Open" and "Save" through the Menu toolbar. Don't need to know all the shortcuts nor Lisp to start working. And by the time a youngster needs the shortcuts, he can learn them faster than you think is possible.
      I am forced to work on Windos lately, and even with cygwin, it is abhorrent for programming.

    14. Re:Windoze by omb · · Score: 1

      Herrn Mace,

      It gives me MUCH pleasure to respond to your criticism of "Windoze" and "M$", it is not fun, it is just a a way of expressing my severe displeasure, in English, of the illegal and venal conduct of one of your largest corporations, but we are aware that they have already bought you and expect no better.

      We understand that your fully corrupt system of government will not ensure that existing Court decisions are enforced, nor proper investigation and prosecution brought, eg in the corruption of ISO.

      We also understand that M$ now has a corps of shills, such as yourself, and astoturfers to infest mailing lists as you are doing.

      I look forward to seeing Gates & Balmer in a Super-Max for perjury.

      You have LOST, throwing chairs will not help!

      Ich w&#252;nsche allemal, au&#223;er Ihnen, auf Slashdot ein frohes und erfolgreiches neues Jahr

  130. I taught my little sister HTML by enter+to+exit · · Score: 0

    I realized that girls love to personalize their stationary with characters, sqiggles and poems.
    It was a school break and i was tired of her playing stupid flash games. so i showed her the real basics in making a website and gave her a "HTML for dummies" book. Of course, the first page she created was to slander some of her schoolmates.
    I enticed her into javascript with the standard "hello the day is Monday". I was suprised at the stuff she could do with dialog boxes.

  131. PHP or Java by tthomas48 · · Score: 1

    PHP and Java both have great class libraries that let you stitch together a program pretty quickly without having to re-invent the wheel or master something like CPAN (I know you people think they're easy and I agree, but it's a barrier to getting up and running quickly, and barriers are bad).

    And I think learning to program for the web is a great starting place since it's easy to get results. I didn't really get into programming as a teenager because it was so hard to get impressive results with C++ quickly.

    And javascript programming is great for kids. It's pretty trivial to be able to do simple animations, wire buttons, etc.

  132. Phrogram by dd1968 · · Score: 1

    Hands down, Phrogram is the best language for teaching young people to program. It's a language purpose-built for teaching kids (it used to be called KPL or "Kids Programming Language") and it scales with the child. A young person can start by coding simple graphical applications and "graduate" to database access and even sockets programming. http://phrogram.com/

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

    1. Re:HTML and Javascript by Eravnrekaree · · Score: 1

      as this progresses CSS can also be shown, to use it to position things on the web page rather simply.

    2. Re:HTML and Javascript by uhmmmm · · Score: 1

      Javascript, maybe. I don't have much experience with it, so I can't comment.

      But I have to disagree with HTML. HTML is not programming. Seriously, making a simple webpage in HTML is like typing a document in Word, except typing <b>text</b> instead of hitting the bold button on the toolbar. If that's programming, then typing up a paper for high school English class is too.

      HTML _can_ lead into Javascript, PHP, and other facets of web programming. But it's not programming in itself, and if the goal is to introduce him to programming, making him learn HTML before he can start learning programming seems like the wrong way to go about it.

    3. Re:HTML and Javascript by Pawnn · · Score: 1

      This reminds me of a time in college when a guy who was heavy into assembler and Basic asked me "So how do I plot a pixel in HTML?" I paused to take in his question, then I opened Paint, drew a dot, then made an HTML page with the image in it.

      He responded "Whoa! That's way too much overhead!"

      I replied, "No, check this out." I opened the image file with the dot and made a smiley. Then, I refreshed the page. He was elated. "No vector graphics needed?! This is awesome!"

      I tell this story to preface the statement that I know from first-hand experience that a noobie programmer can make Pong in javascript/html in less than 100 lines of code with minimal difficulty compared to other languages. That being said, QBasic was actually MY first language...

    4. Re:HTML and Javascript by Eravnrekaree · · Score: 1

      PS you can get started really simple with something like Hello world

      Then maybe introduce the construct for some simple layouts.

      use for playing around with fonts. There is much more to do with CSS.

      for javascript, you can show document.write for doing some simple output to the browser. Start showing how to do some simple loops and so on. you can use also javascript and the DOM throigh onclick and so on to get data from text fields to process user input and so on in javascript and placing output from the javascript program into a seperate node. To do i/o it may be simpler to demonstrate some perl programs using read and print however. If you would like i could write some simple programs to demonstrate how to do some simple DOM i/o and send them to you. it can really help with gratification to write some programs that can respond to input to make an interactive program. it is often a good idea to write some simple programs for him that are easy to understand, demonstrate them and show him how it works and so on. Its often best to learn by example.

    5. Re:HTML and Javascript by Eravnrekaree · · Score: 1

      The original message i posted had the html mangled in the examples so i fixed that:

      PS you can get started really simple with something like

      <html><body> Hello world</body></html>

      Then maybe introduce the

      <table><tr><td></td></tr></table>

      construct for some simple layouts.

      use

      <span style="font-family:Arial;size:23pt;color:blue">

      for playing around with fonts. There is much more to do with CSS.

      for javascript, you can show document.write for doing some simple output to the browser. Start showing how to do some simple loops and so on. you can use also javascript and the DOM throigh onclick and so on to get data from text fields to process user input and so on in javascript and placing output from the javascript program into a seperate node. To do i/o it may be simpler to demonstrate some perl programs using read and print however. If you would like i could write some simple programs to demonstrate how to do some simple DOM i/o and send them to you. it can really help with gratification to write some programs that can respond to input to make an interactive program. it is often a good idea to write some simple programs for him that are easy to understand, demonstrate them and show him how it works and so on. Its often best to learn by example.

    6. Re:HTML and Javascript by Eravnrekaree · · Score: 1

      That is one way to do it. I have also seen some examples of javascript being used to do some bit and vector graphics but I cant recall what it entails. The new canvas object may be of use here but i have not studied it, and seen if it is really useful, and how it is linked into DOM.

    7. Re:HTML and Javascript by Eravnrekaree · · Score: 1

      I agree that HTML is not turing complete programming and should lead into javascript, perl etc. It can be a stepping stone into a real language.

    8. Re:HTML and Javascript by Anonymous Coward · · Score: 0

      Yea definitely start with HTML and javascript first.
      Instant, free and you know its working. At this point if you get frustrated and you feel like its not your thing, you've only spent about less than a day or two learning some basic javascript.
      I remember the myspace and xanga days when you made your profile nice and spiffy with javascript.
      After you think you know that you want to do something harder. Made some sort of small game, tic tac toe even in javascript and you want something more...
      then go to your local library borrow one of those big books, Learn C in 30 days ( or anything similar). You dont have to learn in 30 days. But that book will teach you everything you need to know. From then on just keep learning and programming. Good luck.

    9. Re:HTML and Javascript by Brickwall · · Score: 1

      This gets back to my much earlier complaint that java, html, etc. are cryptic because the friggin' guys who write them and use them DON'T WANT TO DO ANY TYPING.
      I mean your html "Hello World" is unintelligble to anyone without programming background.
      Write the same thing in VB:
      Program HelloWorld
      Begin
            Print "Hello World"
      End
      The html example uses 38 key strokes. The VB version uses 46. Yet I could show it to any reasonably intelligent kid, and he'd understand it pretty easily. Why should kids get wrapped up in cryptic syntax instead of programming in English? It's not like the logic in VB is inferior to the logic used by other languages. You still have to figure out all the steps in your program, get the logic correct, put in error checking/trapping if required, and then test it to make it sure does exactly what you want.
      I still remember my very first CS class at the University of Toronto. The instructor went on and on about the importance of documentation, both for maintenance purposes, but more importantly, for debugging. He said if we would write out exactly what we wanted our programs to do, step by step, in English, it would make debugging faster and easier. And I've found that to be true. When I do documentation first, it speeds up the whole process; when I try to do it quick and dirty, it ends up taking me longer. I'd introduce a kid to any natural language type program first. I actually liked Turbo Pascal when I started using it after university (where I wrote in assembler, Fortran, and some exotics like Lisp and Spitbol) because I found it much easier to read over parts of the program when requirements changed, and understand what I had done, and what I needed to do.

      --
      What was once true, is no longer so
    10. Re:HTML and Javascript by Anonymous Coward · · Score: 0

      WTF? HTML is a MARK-UP language, not a programming language.

    11. Re:HTML and Javascript by Schnoogs · · Score: 1, Insightful

      HTML is not a programming language.

    12. Re:HTML and Javascript by Pawnn · · Score: 1

      I've actually done vector graphics in javascript via 1x1 pixel divs, generated with absolute positioning. I merely used it to make a few dozen lines, though

      Unfortunately, using real vector graphics in javascript is comparatively slow to using images when you have the choice. It's also a lot more complex.

      For 2D games, images are the way to go in javascript for now. I honestly think this is just about the lowest barrier to entry for someone who wants to make a "game".

      I've heard of a 3D javascript library being invented, but I can't imagine that it's actually efficient enough for even today's computers. Perhaps I'm wrong though. I haven't looked into the canvas object you speak of.

  134. The Real Answer by poopdeville · · Score: 1

    The real answer to your question is to not teach programming. Get them started on some abstract mathematics. It will serve them far better than learning to become the newest web flunkie on the planet.

    If you must teach some kind of programming, go with a typed functional language, like Haskell or ML. Focus on these concepts, as they bring out the relation between proof and computation (every computation is a "constructive" proof):

    http://web.cecs.pdx.edu/~mpj/pubs/springschool95.pdf

    --
    After all, I am strangely colored.
  135. processing + openframeworks by Anonymous Coward · · Score: 0

    Definitely I'd say processing - www.processing.org. It's based on Java, with a very simple IDE, just open the text editor, type some code, and press run (check out the provided examples). Then also the path to C/C++ is relatively painless (for C++ i'd recommend starting with openframeworks, www.openframeworks.cc)

  136. Yup, and it's free (dev version), and it's easy by WebManWalking · · Score: 1

    ColdFusion is as easy to learn as HTML, which is really saying something.

    I'd say the only problems that the original poster would have would be (1) to have enough memory on the younger brother's machine to run a webserver, a J2EE server (JRun) and ColdFusion Server, and (2) making sure to run them behind a broadband router / firewall. Lotsa webserver-attacking malware out there.

    The only cheaper, easier suggestion would be JavaScript, which I already advocated above. But yes indeed, ColdFusion is a great starting language that keeps getting better the more you learn it (just like JavaScript).

  137. Alice by cadeon · · Score: 1

    http://alice.org/

    Specifically designed to teach tweens how to program. Essentially is Java, but with instant, graphical results, which, as a few others have pointed out, is important to keep new learners interested.

    My wife took a college course which used ALICE to introduce programming- if it worked for her, it will work for anyone.

  138. What's his favourite game? by Aliotroph · · Score: 1

    Things like this have been mentioned already, but games get kids interested. If he has a PC game he likes then see what it has for tool and languages? I wasn't interested in learning anything like programming until the local news paper mentioned there were map editors for DOOM. Had it possessed a scripting language at the time, I probably would have learned that in a hurry.

    My brother's time running a private WoW server with his friends had him starting to learn MySQL. If a game can inspire a kid to try SQL surely it can inspire interest in something less fantastically boring!

    If he likes FPS games, he might like to learn to build a map and script some invasion maps or neat effects. If like likes RTS games he could make some scripted stuff for maps or AI. If he likes RPGs there are any number of scripting things he could do. These kinds of scripting languages are usually just fine for teaching the basics of programming and they make it easy to have something cool to show your friends (who probably play the same game) in a real hurry.

    Other posters have a good point about letting him go with his interests. He may take to programming if he tries something like this. He may not. Programming requires you to want to think in a certain way (putting the world together in logical steps?) and most kids aren't very interested in that. Having him build something -- *anything* -- for the game he likes might spark an interest in programming.

  139. Python, however... by Anonymous Coward · · Score: 0

    Quick Answer: Python

    Thoughtful Answer: It's not about the language, but the concepts. :-)

  140. Electronics Kit and a Microcontroller by Fls'Zen · · Score: 0

    Start out with an electronics kit and get them a small 8-bit microcontroller. Use assembly. Don't go for x86 either-I pity Intel for the monster they have created. Freescale's S08 core is a nice starter-you can get a programmer for ~ $30. The reason this is better: They get to build a circuit that has a function. No matter how simple the circuit is, it is built to fulfill a specific function that they can understand. The microcontroller code can is programmed to make the circuit behave in different ways. The reason this is more fun that high-level programming for a 12-year old: At this stage in life, they want to become in control. Hoping that your event handler ends up being called is not being in control. Wondering what on earth the computer is actually doing when you give it a command is not being in control either.

  141. Rethink it, then point him at Scratch or Bootstrap by technik · · Score: 1

    Stop; don't do it. Your love of programming doesn't automatically make you a good teacher and layering inexperience on the ingrained patterns of behaviour between brothers will be a problem. Next assess if you want him to learn or if he wants to learn. If it's the first, consider that strike three.

    Now, assuming he actually wants to learn and approached you for advice, start him with something fun like Bootstrap, http://www.bootstrapworld.org/, based on Scheme, or Scratch, http://scratch.mit.edu/Smalltalk, based on Smalltalk. He'll learn fundamentals in a well-designed language and have a community of educators and students to interact with.

  142. Help making the programming world a better place.. by jopet · · Score: 1

    .. and avoid teaching C. The only reasons why C is still around are pragramitic reasons *despite* the inadequacy, bad design, and anachronistism and general retardedness of C.
    Do not teach a single language. Do not predominantly teach a language, teach the concept of programming. You do not even need a programming language for that.
    Make teaching fun and provide quick successes.
    How to actually do it depends on how much time you want to invest in the teaching.

    At any rate, I'd go for a mix of Scala (best pragrmatic compromise between good language design, portability and library & tool support), Processing and Ocaml or similar. You could even start with Logo and then go to Processing using the turtle library of processing.

  143. Wrong Question by pz · · Score: 1

    The language you select is nearly irrelevant (although I would strongly shy away from the standard imperative languages, and take serious issue that C/C++ is a good target). You do not want to teach a child a particular language, you want to teach them how to think about programming. If you think knowing C/C++ or Python, or Ruby, or Perl, or Javascript, or nearly anything else in wide use right now will be relevant in 20 years, you have not studied your history.

    Get a good book on PROGRAMMING, not on a particular language. There are tons. I would personally recommend Structure and Intrepretation of Computer Programs by Abelson and Sussman (http://mitpress.mit.edu/sicp/full-text/book/book.html available at Amazon ... the first edition is fine if you don't want to pony up for the second edition). It teaches PROGRAMMING, not a particular language.

    As my undergraduate advisor said, "go and pick up K&R and learn C over the weekend" -- THAT is what you want to be able to do. Teaching a particular language does not generate that kind of skill. Teaching the fundamentals does.

    --

    Put my fist through my alarm clock with its ding-dong death inside my ear. - The Blackjacks.
  144. Use a game dev evironment by Anonymous Coward · · Score: 0

    I would recommend the Unity3D dev environment, why?
    It's free, it's easy, use either javascript or mono, it comes with a lot of examples / tutorials.

    but most importantly, it is very quick at making pretty 3D games, using one of the examples he can be coding his own super-mega laser gun to use against robots in the fps, for a 12 year old seeing this direct cause an effect, and taking control of a game like that, is a powerful incentive.

  145. Gamemake by Toonol · · Score: 1

    PUt a free copy of gamemaker on his pc. He can create a simple game with drag and drop; add a few lines of code to make it better. Eventually he can write whole games in nothing but code.

    It doesn't matter that it's not based on a standard programming language. What matters is that he can see instant results, and program stuff that he likes. Learning any particular language's syntax is irrelevant, all that matters at this point is getting him to understand concepts without losing interest.

  146. Python ... or Smalltalk by Anonymous Coward · · Score: 0

    I really think that Python is one of the most elegant languages out there for teaching (and for general use). It also has the added benefit of being able to teach several different programming styles simply as it intuitively combines functional programming, iterative programing, and object oriented techniques. It also has a large, active community supporting it and would allow your brother to do something cool pretty quickly. The downfall of starting with a language like that is that other languages will seem very clunky and difficult.

    That being said, I do think there is something to be said for learning a language like smalltalk. Possibly not as the first language, and not as a language for general use. But it does teach a completely different way of thinking about how to program. I think that the introducing different ways of thinking to a young programmer is really important. Otherwise it can be much more difficult to grasp those concepts once you have stuck to programming style for a long period of time. Trying to teach myself OO techniques after learning C, or rather C++ without OO, was a complicated process.

  147. Re:Python =JavaScript by johnjaydk · · Score: 1

    The really awesome book on JavaScript is by Doug Crockford but it's hardly something You unleash upon a non-programmer. Heck. JavaScript (the real functional language) is not something You unleash upon anyone who hasn't understood functional programming( LISP, Scheme, Haskell etc).

    --
    TCAP-Abort
  148. MikeOS by MattBD · · Score: 1

    Really it depends what he wants to do - if he's interested in programming for the web, for instance, then something like PHP might be a better choice, or if he wants to write games for Windows and the XBox 360, maybe C# and XNA. But in general I think Python is your best bet. It's pretty easy to get your head round, the syntax is nice and clear, it can do pretty much anything he's likely to want, although it may not be the fastest language around. It's easy to get into game programming using PyGame, or GUI programming using Tkinter, wxPython or another GUI toolkit, or web development using Django. However, I will also suggest something slightly off the wall. You might want to check out MikeOS (http://mikeos.berlios.de/), which is a simple x86 operating system written in assembly. It now incorporates a simple BASIC interpreter, and can boot from a floppy drive, USB key or CD-R so it could easily be used alongside Windows, or can be run in a virtual machine if you'd prefer. Applications can be written in BASIC or assembly. Because MikeOS is so simple, writing programs for it should be similarly simple, and the experience is not entirely dissimilar to on old 8-bit computers.

  149. Teach the kid, not the language by raque · · Score: 1

    I've taught programming, part time in an elementary setting, for years, and have been a real live stay at home dad for almost 20 years. I know code and kids. Kids learn people first, things later. So teach what *you* are passionate about. A kid will spot bullshit a mile away. You can trust that your little brother knows you better than you would like. Your little brother isn't going to be learning programming, he will be learning what you like. It's the "what you like" part that is most important.

    Don't worry about what language to use, all languages suck about the same amount, just in different ways. C is fine, kids have a wonderful ability with language, any language. Any kid under 14 (puberty is the dividing line) or so will pick up the syntax of any language in a few weeks. Arbitrary and weird is fine, they just go with it. In my experience kids can learn either top down or bottom up, but they have a more or less fixed attention span. You have something like 20 - 40 minutes before he will start to get antsy. (YMMV) Regular times for set amounts of time work best. He knows that Monday at 6 big brother will give him a lesson and answer that question that has been bugging him for days, or years or centuries, they're all about the same. If in 6 months he would rather find something else to do, then consider dropping it. But remember!! The discipline in a 12 year olds life is external, not internal! That really doesn't start kicking in until HIgh School.

    One thing that will kill this is forgetting that he is 12, below a certain but unknown age kids just can't get certain things. You just don't know what, exactly. Just because you got it at 12 doesn't mean he will. He may get different things. Then they just go to sleep and wake up and suddenly get it. They will often deny that they ever didn't get it, it is now natural and part of them. It's magic and frustrating as hell.

    1. Re:Teach the kid, not the language by kklein · · Score: 1

      Very nice. All of us get into things because of the people in our lives, and based on our own cognitive style, gravitate towards things we like more or are better at from the options we have in the people we know. I ended up being in language not because I loved language and literature, but because at my high school, the English department had the smartest, funniest, strictest teachers, and I liked and respected them. I wish it had been the math or science people, though, because in college I found that I hated literature, but because I was in language, I could move into linguistics and from there into psychometrics... It just took 20 years to get me into a math-heavy field, where I actually feel I belong.

      I think the most important thing you can do with a kid is do as you say--show him what you think is cool. Maybe he'll agree; maybe he won't, but you will be planting seeds in his mind as to what is possible. Kids need to see a lot of different things and meet a lot of different people before they'll be able to express any actual, intentional interest in much of anything. You know, because they're people.

  150. Try Scalable Game Design by the+agent+man · · Score: 1

    Here is a curriculum used in schools to get middle school kids learn about computer science/computational thinking through game design: http://scalablegamedesign.cs.colorado.edu/ start with simple games like Frogger and make it all the way to sophisticated ones like The Sims

  151. C++ by Anonymous Coward · · Score: 0

    I did C++ at the age of 11 or 12, such as your brother. I took interest in a book my father had brought home - it had the title "101 C++ examples" but the author slips my mind. It helped a lot in the first year of university - the very first course there was nothing new to me. However, beware, nowadays C++ is all about templates, you're probably better off with pure C.

  152. Let him tell you by houghi · · Score: 1

    Don't ask /. Ask him. What does he want to do. Does he has already looked at him and let him know that you are willing to help.

    Most likely he will try to figure it out himself.

    --
    Don't fight for your country, if your country does not fight for you.
  153. Let him learn the way we all learned... by Dunbal · · Score: 1

    Buy him an IBM PC XT, load up MS DOS 2 or so (I think it still came with MASM back then), give him a copy of colossal cave adventure, trek, and lots of soda. Eventually thrown in some BASICA and a few programs he can read the source from by doing Ctrl-C. When he burns in sunlight and/or has a body mass index of 30+, buy him a C compiler (preferably Borland Turbo C). Then confuse him by throwing both the Windows GUI, MFC AND OOP at him at the same time.

    If he makes it to 20+ without a heart attack, you'll have a coder on your hands.

    --
    Seven puppies were harmed during the making of this post.
  154. Basic with gotos by presidenteloco · · Score: 1

    I learned with old Apple II+ Basic.
    It had a crucial fun aspect in that it could control the coloured graphics and the speaker tones.
    But more importantly, the goto statements made it sort of clear the step by step sequential
    evaluation that the computer was doing of your language statements. Without that mental model
    of the program counter going over the statements, it's all going to remain "magic".

    After those initial clumsy Basic programs, I added two different things, and I think both are
    essential.

    1. I went downwards, and studied how the assembly language and machine language
    and memory bytes/words etc.
    worked (and kind of how they related to the high-level basic statements and variables etc.

    And most importantly, in writing an assembler program, I came up with assembly code
    "templates" that would do a standard "if then else" or another template for a standard while loop
    etc. Learning the representation of one of these levels of organization in the other was
    fundamental to a solid complete grasp of what was going on and what would be possible or
    advisable.

    2. I went upwards, realizing that the undisciplined use of gotos in the basic would be bad, as
    programs got bigger, so I should create standard if then else constructs (copy-paste templates again)
    and use of gosub statements to reduce the size and complexity of each block of code etc. So
    I taught myself the "why"s of structured programming from first principles and painful frustration
    with long complex unstructured "goto" basic programs.

    Eventually in University, we went all the way down to transistors as logic gates, and TTL NAND/NOR gates, and building up to
    structured programs based on combining those together.

    And we went all the way up to LISP and Prolog, and modules with interfaces, and the beginnings of O-O.

    I would recommend a similar bottom up approach for someone to full appreciate what they are working with, and
    what its fundamental limitations and quality dimensions might be.

    --

    Where are we going and why are we in a handbasket?
  155. Data structures by michael_cain · · Score: 1

    Lots and lots of comments about syntax (C's sparseness, Python's white space, VBA's readability), but not many about data. If he likes programming, he's very quickly going to be managing collections of data. My short list of mandatory data aggregates would be lists and associative arrays, with various ways of pulling things out of the lists. Lists of lists in some form. All garbage collected. In my experience of trying to explain things to non-programmers, lists and some form of tag-value pairs are the easiest things to get across, especially if there's some syntactic sugar.

    For further down the road, blocks of generated executable code as first-class objects are mandatory. Which leaves out many compiled languages. But I admit that this makes me at least a little odd.

  156. Scratch by iwoj · · Score: 1

    Try Scratch.

  157. Scratch / Alice by jeremyhu · · Score: 1

    Scratch (http://scratch.mit.edu) and Alice (http://www.alice.org) are probably your best bets. I've been teaching kids at this age level for the past four years, and the children have responded best to Scratch.

    Both of these have the advantage of not frustrating students with syntax. Scratch has a better community built around it than Alice does, but it doesn't support things like procedures out of the box (it's event script driven). If you want to start teaching procedures, you should look into the BYOB fork of Scratch.

    Alice has a better OOP model, but it's not entirely OOP.

  158. Flash / Actionscript3 by Tronster · · Score: 1

    If I was to teach beginning programming to a child or someone who does not know if they want to commit to the field, I would teach programming in Flash.

    While the Flash IDE's debugging and scripting area is not suited for an experienced programmer, it does a great job of letting someone quickly wire up visual elements for that instant feedback & gratification. Core programming concepts such as variables, loops, and functions are quick to learn. For those who want to continue AS3 has a long road of concepts going into bit fields, OO, shaders, etc...

    There is a tremendous amount of books on programming in Flash / Actionscript 3; as well as great web sources in the forms of blogs and communities such as:
    http://www.kirupa.com/forum/forumdisplay.php?f=6
    http://wonderfl.net/
    http://www.gskinner.com/blog/

    This is coming from someone who has created and taught curriculum in Turbo Pascal and Turbo C++ back in the 90's for 11-15 year olds, and these days I am an adjunct professor teaching Flash & Actionscript3 to artists (non-programmers).

    1. Re:Flash / Actionscript3 by plowboylifestyle · · Score: 1

      I agree with this. I had the same dilemma with my nephew and decided that flash scripting is the best route, because he can immediately involve graphics animations and etc.

  159. Alice? by Anonymous Coward · · Score: 0

    What about Alice? It goes all the way from simple movies with 3D objects to basic games.
    www.alice.org

    1. Re:alice? by Anonymous Coward · · Score: 0

      http://www.alice.org/

      isn't that one of the best starting points to teach object orientation, concepts etc, first?

      this comment brought to you by the original AC above. I'm very sorry. I skimmed only the first page and didn't see mentions of Alice. thinking on it more, I checked more and see there were many. I apologize for sucking. :-)

  160. Visual Basic by Bensam123 · · Score: 1

    I'm going to be the heathen here and outright suggest Visual Basic. Even if it's far from the best coding language and it has it's quirks, you get to SEE and INTERACT with what you make. It's not a bunch of gibberish on the screen and that's something a lot of people need to learn in the beginning.

    A lot of you need to keep in mind that people who like to code are a very select group. You have to be interested in things you can't actually touch and that require mind numbing amounts of logical work. That isn't something a whole lot of people can handle. A language that is easy to code in by a coders standards still doesn't mean it's good for a beginner. More then likely the OP brother will have no interest in coding at all.

  161. Soustrup by omb · · Score: 1

    Wasn't a traitor, more like a prisoner of the Macro + KLUDGE culture that was AT&T then, and a lot of Not Invented Here!

    On sabatical at Cambridge (England) Bjarne found out about Simula, and thought bringing Classes into C would be neat. Not the first to make this mistake he decided to compile his new C++ into C, thinking easier. Huge mistake, CFront, years of kludges, and still no advance from C, which is an excellent systems programming language, to C++ which was supposed to be THE applications language. Still no strings, a death march of implementation, burial by conflicting committee, endless mindless complexity eg sematics of constructors/destructors, hopeless reliance on strict typing (also a Java problem) ... those interested should read the C. Strachey paper on CPL and note type general, and its semantic implications, but yes this is 30 years old.

    C++ says much about the short-termism of the USA. It really is much easier to do it right the first time.

  162. Me by Kopachris · · Score: 1

    When I was 12, I actually started teaching myself programming with TI-BASIC on a school-supplied graphing calculator. HTML and GW-BASIC quickly followed, then it was on to Visual Basic and C++. If I were to do it again today, though, I'd probably start with Python—it's easy to learn and can do great stuff. I would certainly steer clear of things like Alice and HTML, which don't really teach the fundamentals of programming very well.

  163. Autohotkey by Anonymous Coward · · Score: 0

    While I was working at a school I used this program Autohotkey to successfully teach a 10 year old the very basics of programming (emphasis on very), it involves all the basic principles of teaching a computer but in a very simple and easy way and with simple and easy to understand results and uses in everyday computer use.

  164. What about MIT's Scratch? by Anonymous Coward · · Score: 0

    Meaby too childish, but perfect for a first young step!

    http://scratch.mit.edu/

  165. alice? by Anonymous Coward · · Score: 0

    http://www.alice.org/

    isn't that one of the best starting points to teach object orientation, concepts etc, first?

  166. Three Factors on the Path to Coding... by MaxNomad68 · · Score: 1

    In a word, the big determining factors for your brother's path are "Curiosity", "Desire" and "Time". If he's got all three, he can start out with pretty much any language as long as he's got a tutorial or book that's simple enough for him to read, a simple development environment or testbed. Having some sort of project or goal in mind helps out, too. I was about 10 or 11 when I started out with Apple BASIC then I took on 6502 Assembly language (a must for any aspiring protection-cracking software pirate back then) and eventually took QBasic and Pascal once it was available in school. Most of my friends that had an interest in programming took a similar path except they started out with C64 BASIC or whatever came with their computer. As far as what languages to start with, I've seen some fun introductions to Python. With all sincerity, if your brother doesn't have at least two of those three factors working for him -- particularly the desire to learn -- then you'll probably be wasting your time. If your brother doesn't have the desire, you won't be able to teach him how to program a microwave oven.

    --
    Max Nomad . Bohemian Griot Publishing, LLC . http://www.bgpublishing.com
  167. Why C/C++? by CptPicard · · Score: 1

    I have talked about the "programmer's learning path" a lot, and considering my own experiences, I am quite convinced that there is no such thing as a "continuum" towards C or C++... C is minimal and dull and a lot of work for a beginner to get anything done in, C++ is hairy and complex (even from my experienced programmer's perspective) and rigid.

    Personally I have started to view programming more and more simply in terms of "formulating problem solutions in a Turing-complete symbolic system". As such, the machine-specifics have receded more and more into the background... I tend to see C for example in terms of a small set of imperative, structured-programming statements instead of "low-level programming"... the machine is just simply not important as long as the specification of the language is correct. What truly has been the most instructive thing for me ever as a programmer was learning Lisp -- I'm mostly a fanatical Lisper these days whenever I can. Of course, C's imperative statements are trivially included as a part of Lisp. It's nothing to write home about.

    Python is a nice language because it contains a lot of important high-level programming ideas in a language that is easy to use... that is, it does not even waste an experienced programmer's time. Managing your memory does not make you more of a man... understanding how programming conceptually works is far more crucial.

    --
    I want to play Free Market with a drowning Libertarian.
  168. Ruby! by Noer · · Score: 1

    I'd particularly recommend Ruby, even over Python. It's got very clean, elegant syntax, and its main disadvantages (performance, mostly) won't matter to him. He would be able to quickly get into web development too if he learned Rails.

    I highly recommend the book Learn To Program by Chris Pine. It uses Ruby as a teaching language.

    Ruby is truly purely object-oriented (no primitives) which helps with consistency and the principle of least surprise. It also does NOT have the whitespace-as-syntax 'issue' of Python. But, python is also a good choice. Ruby has nice functional aspects as well, which if he eventually learns how to use them, will make him a better programmer in any language.

    Lua is used as the scripting engine for a lot of games, which might make it a good choice.

    Scala is another alternative, though it might be a little tricky as a first language.

    The advantages of higher-level languages like Ruby, Python, Lua, Scala etc. are that there's less code and less boilerplate, and while they're further from the metal than C, you can get meaningful stuff done faster, which may be a good thing for a 12 year old's attention span.

    I'm a PhD student in computer science at Tufts University and our department is seriously rethinking how intro CS is taught at the undergrad level, so I've put some thought into this. Note that I would NOT make the same recommendations for a 12 year old as for a college freshman, necessarily.

    --
    -- "Those who cast the votes decide nothing. Those who count the votes decide everything." -Joseph Stalin
    1. Re:Ruby! by shutdown+-p+now · · Score: 1

      Ruby is truly purely object-oriented (no primitives)

      So is Python.

      (wasn't sure, but it sounded like you were trying to contrast Ruby against Python there, so it might worth noting)

      Ruby, in my opinion, is a bit too terse and emphasizes first-class functions much, for a beginner language. I do not think it's something that must be the first concept to learn, and you'll need to go there with Ruby.

    2. Re:Ruby! by Noer · · Score: 1

      Err, no, I didn't mean to make that contrast against Python, but rather against Java and C# and their ilk.

      I think Ruby's terseness is a good thing. I do not think that first-clas functions are pushed in any way; they're there, but you do NOT need to go there in Ruby until you've gotten into some pretty advanced stuff. And I'd much rather teach advanced functional programming to an enthusiastic Jr. High kid than I would C pointer math... the pointer arithmetic is conceptually easy but a huge headache over time.

      --
      -- "Those who cast the votes decide nothing. Those who count the votes decide everything." -Joseph Stalin
    3. Re:Ruby! by shutdown+-p+now · · Score: 1

      Err, no, I didn't mean to make that contrast against Python, but rather against Java and C# and their ilk.

      Still wrong, then, as C# "primitive" types (like int and float) are still first-class objects, and derive from System.Object. The only types in C# which aren't first-class objects are raw pointer types, but you'll need to use a special compiler switch and keyword to even get to use them.

      Same applies to VB, except that there are no raw pointers there, so absolutely all VB-accessible .NET types are first-class objects.

      I do not think that first-clas functions are pushed in any way; they're there, but you do NOT need to go there in Ruby until you've gotten into some pretty advanced stuff.

      How do you write something analogous to "xs.each { |x| ... }" in Ruby without first-class functions (a block is one, obviously)?

    4. Re:Ruby! by Noer · · Score: 1

      I don't know C# and haven't used VB in over a decade, so forgive my mistakes there :)

      You don't need to understand the functional aspects of blocks in Ruby to use them. So, you can teach it as block syntax without showing how blocks are actually things that can be handed around. You don't have to teach yield right away. That's the approach Why's Poignant Guide to Ruby takes and I think it's very effective.

      To teach a programming language, sometimes you do have to lie a little :)

      --
      -- "Those who cast the votes decide nothing. Those who count the votes decide everything." -Joseph Stalin
  169. Alice by lawpoop · · Score: 1

    Do they want to "learn programming", or do they want to make video games? ( Or do *you* want them to learn programming? ) If they want to make video games, have them check out Alice. They'll make a video game and learn to program as a bonus. For middle-school aged people, there is Storytelling Alice, which is pretty powerful in its own right, in terms of a teaching tool.

    --
    Computers are useless. They can only give you answers.
    -- Pablo Picasso
  170. Idiot by omb · · Score: 1

    There is absolutely nothing in C that makes for buffer overflows, in C managing your data is YOUR business.

    When I write user-land code I have a very small library which provides the basic tools to write safe app code and I get 1% of the bugs I would in either C++ or java, and with dmalloc and valgrind I cam prove it. In reasonable time. If you can not write in C you can not program.

    1. Re:Idiot by Der+PC · · Score: 1

      And with 2 bugs per line on average, your simple watchamacallit-program of 10000 lines still contains 200 severe bugs....

      Oh, and by the way - valgrind doesn't find all memory leaks, so grow up, put your hand in front of your mouth, slap face, and stop calling people idiots.

      --
      This signature is DRM protected. By the DMCA, you are not allowed to counteract or oppose to it.
  171. Teach him right... by meburke · · Score: 1

    OK, "right" is an opinionated position and YMMV. However, after 48 years of being a programmer, I still find discouragingly few programmers who can design a program beyond the basic forms and business arithmetic or solve problems creatively.

    Get him a copy of the "The Little Lisper" or "The Little Schemer", get him a robotics kit like the LEGO system, find him some Turtle application that works interactively on his computer, get him some sort of logic controller kit (like for home automation) and focus on the areas where he has an actual interest. In a couple of years he'll be a better programmer than you are! http://www.paulgraham.com/avg.html If you both have a common interest in something like games or graphics, working on a project together builds competence. The free Robotics kit from Microsoft is worth checking out.

    BTW, it's interesting how the skills I learned trying to program logic gates (back in the "Tube" era, transitioning to transitors) are now so useful in developing nanotechnology, MEMS, and biologics. See if you can get him interested in the basics. He might even like assembly language because of the high degree of control and obvious cause-and-effect relationships. The transition from Assembly to C was very easy for me.

    Good luck.

    --
    "The mind works quicker than you think!"
    1. Re:Teach him right... by Kagetsuki · · Score: 1

      On some points I would agree with you very much, for instance learning how a computer actually computes and implementing your own computations with Assembly. I can read a program as binary, and that's because I understand how a program is actually run and how instructions are built. I can look at a chunk of binary and pick it apart, look up which part corresponds to an Assembler mnemonic and understand which parts are memory addresses etc. Even when I write code in C++, I can envision how that code will end up in binary/asm and often I will take into consideration what kind of hardware that code will be run on. Because of that I was able to write fast 3D engines on low powered hardware, using no more than a single division operation and fixed point, lookup tables, trick multiplcation using shifts, and other things that I would not have realized how that particular hardware worked (no FPU, very fast memory operations and binary operators, and no hardware division so a division operation ended up being a many cycle macro). So yes, knowing hardware and how code is actually built up, stored, executed, etc. is a very important part to not being a generic douchebag "objects are pretty" "I'll just make templates for EVERYTHING" "if it runs slow get a faster computer" programmer.

      At the same time using LOGO and "instructional" languages and methods to teach the concepts of programming without actually teaching real practical programming is a bad idea in this era. It's no longer so complex to get sophisticated graphics up on the screen (and I don't mean PyGame, I mean using C/C++ and SFML to get genuine OpenGL code running). And learning limited and older technology is of little benefit. If you must start out with something basic to start grasping concepts then do that, but not LOGO, something you can expand upon and fall back on like Ruby or Python. Ruby for example, while being quite intuitive AND featuring an on-line interpreter (Python does too) so you can try code in real time like LOGO, can also be used to do everything from system scripting to writing real code and applications to web back ends to 3D scientific simulations and more. It's here, now, simple, and practical. LOGO is hard to find, has no practical use, and is so basic that to use it as your basis of the concepts of programming today is an act I can only imagine limiting you.

  172. ALICE by blue_moon_ro · · Score: 1

    How about Alice (http://www.alice.org)? Form their site: "It is an 3D programming environment that makes it easy to create an animation for telling a story, playing an interactive game, or a video to share on the web. Alice is a teaching tool for introductory computing. It uses 3D graphics and a drag-and-drop interface to facilitate a more engaging, less frustrating first programming experience." From what I've seen, it is specifically targeted at kids.

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

    1. Re:Javascript IS very good by Xtifr · · Score: 1

      - It's the fastest scripting language around.

      Are you sure about that? I think it depends on the implementation, and I understand that some implementations have improved recently, but our (admittedly non-rigorous) testing suggested that Lua had an edge on JS. In any case, I'm not sure speed is a major factor when considering a language for teaching purposes.

      - There's plenty of doc and examples

      If you want to manipulate DOM, yes. If you have more general-purpose programming in mind, not quite so much.

      - It's on every computer

      Embedded in the browser where it's not quite so easy to use.

      That said, I don't think JS is a bad suggestion. It wouldn't be my first choice, but it could easily make my top ten list. And I don't think there's any question that it's a better choice than Basic, which can leave scars that take years to heal! :)

    2. Re:Javascript IS very good by shutdown+-p+now · · Score: 1

      It's the fastest scripting language around.

      References?

      There's plenty of doc and examples

      There's plenty of shitty "Teach yourself JS in 10 nanoseconds" books, I'll give you that. There are definitely some good JS books, but finding them in the huge pile of crap is a challenge (similar thing goes for PHP, by the way).

      Meanwhile, JS has no definite reference implementation, and therefore no "primary" docs. The best you get is the ECMA spec, which is a very dry and technical read.

      It's on every computer

      It is, but I sure hope you aren't going to teach people to write JS code in Notepad. So you'll need an IDE, or at least a decent editor - and then what does it matter?

      It's useful right away

      Any non-toy language is.

      It has some very interesting constructs such as closures

      So does Python, and Ruby, and Scheme. In fact, even VB has them.

      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.

      OP mentioned Visual Basic, and I presume that he meant the present incarnation of the language. Which pretty much means a fairly modern imperative object-oriented programming language with some FP features, with Javaesque object model with some tweaks to make it better, and verbose but readable syntax which tries to use self-explanatory keywords - e.g. "MustOverride" instead of "abstract" for methods, or "NotInheritable" instead of "final" for classes. Oh yes, and it has closures. And query comprehensions for map/filter/fold. And XML literals, and sugar for queries over XML documents.

      In other words, if your only argument that "X is better than Y" is that there's "no fucking way" it can be otherwise, then you should really learn the subject matter first. It's not so hard to find at least a few things in which VB is inferior to JS, but you haven't listed any, nor gave any hints that you have even the slightest idea as to what they may be.

    3. Re:Javascript IS very good by Flere+Imsaho · · Score: 1

      "It's the fastest scripting language around"

      Until you have to run it on something...

      --
      It gripped her hand gently. 'Regret is for humans,' it said.
  174. No by omb · · Score: 1

    OO is very unlike how anyone with any sense thinks, but the concept has a useful place in the toolbox. The problem is it is much overused, and the popular coding style x.hpp x.cpp for each class, too many, ill thought out classes or class-heirarchies make for obfusticated code and require a visualizer which tended to be expensive.

    The test of a really bad OO design is Singleton classes, Singleton objects and, as already been mentioned above, factories ... this is OO bullshit!

  175. Python vs BASIC/LOGO/C/C++/Pascal/4TRAN/Perl/Java by Anonymous Coward · · Score: 0

    Having been in this path of teaching others (youngers) programming a few times already,
    I recommend Python in the generic case, hands down; unless you have concrete reasons for else.

    Also, this document has interesting arguments in relation to why it can/has worked in practice:
    """
    How applicable is Python as first computer language for teaching programming in a pre-university educational environment, from a teacher's point of view?
    """
    http://arxiv.org/abs/0809.1437

    In short, Python has much of C's structure and more, without the obstacles for a beginner.

  176. Soccer by masmullin · · Score: 1

    Give him a ball and tell him to fucking go play outside!

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

  178. Dark Basic by erinacht · · Score: 1

    In my experience (nephews) Programming with Dark Basic gives them an instant ROI. It's the best modern equivalent to the Sinclair Basic that I started with. OK. Basic is a bit like programming with the training wheels on, but surely that's the point! The well intentioned posts talking about syntax etc. don't really matter and you already know that yourself. Dark Basic is a simple syntax that will allow games to be written. There are sample programs for most standard game types that means he's got a jump start into making fun stuff straight away.

  179. a 12 yr old by Anonymous Coward · · Score: 0

    to a certain extent the same way you would teach an adult, except remember the younger they are they are the easier it is for them to learn and the steeper the learning curve they can take. if your family ends up with another baby have someone in the family read serious programming and other books to them as lullabies and have foreign language tapes and other audio learning material playing at a quiet but discernible volume 24/7 around their crib, heck get rid of all your tv's and have that stuff playing 24/7 in your house and you'll soon start to notice your family's brain cells working on something besides advertising jingles and celebrity stalking "news" reports.

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

  181. erm... bash? by Anonymous Coward · · Score: 0

    why not bash? it's easy to see the results and will give you a good lead in to python...

  182. From a Windows Programmer who uses Visual by wizzerking · · Score: 1

    You did not say what OS you are using, so I will try from a Windows Perspective. First I really love GAMBAS http://gambas.sourceforge.net/en/main.html which is open source and free. There are also the Visual Studio Express downloads from Microsoft. If the child's interest is in creating games then there are specialized open source Games engine like moodle, and a bunch of other really weird sounding names. Until you are more specific it is really hard to go down a whole list of everything that is available, even if we restrict the list to Windows.

  183. Turing by goobermaster · · Score: 1

    As many above posters have stated, when trying to get a much younger person interested in something, immediate and observable results are important.

    As a result, I would recommend Turing as the introductory language. While I may be a bit biased since this is the language I learned programming on, I truly think it is an excellent first language.

    It has a very simple syntax that nonetheless teaches the basics of if/else blocks, loops, decision trees, and more and because it is so simple, it is very easy to quickly get into and program text, graphics or animated environments. It also comes with its own IDE that auto-indents and performs many tasks that help a beginning programmer, so little more than the base environment is required.

    While the person in question should of course move relatively quickly to a real and industry-utilized language like C/Java/etc Turing can teach the fundamentals of programming in a very easy to learn package. I can only speak for myself, but had I been introduced straightaway into C, I believe I would have encountered many more difficulties than I would have had I not learned programming fundamentals on Turing.

    Just my opinion.

  184. Alice by Anonymous Coward · · Score: 0
  185. PLT Scheme by xbeefsupreme · · Score: 1

    We use PLT Scheme in our introduction to programming class at college,it has a programing enviroment called Dr. Scheme which is free to download and use and there is a textbook online called "how to design programs" that is designed to be used with the language.

  186. TCL/Tk? by Anonymous Coward · · Score: 0

    How about TCL? Very readable syntax, no whitespace use, cross-platform, and a ton of ready-made widgets to give him some quick GUIs that might keep his attention.

  187. I'd love to get low-level with him by mr_lizard13 · · Score: 1

    I'd love to get low-level with him, and I firmly believe that C is the best language to eventually learn

    There's something more Basic than that.

    --
    "We live in a global world" - Harvey Pitt, former Securities and Exchange Commission Chairman
  188. small asm, C, C++, python - in that order. by fyngyrz · · Score: 0

    I suggest getting a small machine emulation like a 6800, 6809 or 8080, and teaching him assembler so he knows what's actually going on. Then teach him C, and explain what's going on there in terms of assembling and linking. Then teach him C++, then teach him python. That'll give him an expanding world he understands right down to the metal.

    --
    I've fallen off your lawn, and I can't get up.
    1. Re:small asm, C, C++, python - in that order. by squidfood · · Score: 0

      teaching him assembler so he knows what's actually going on.

      You may think I'm crazy, but I'd go even more bare metal than that. Teach him resistors and capacitors (make weird noises through a speaker), then transistors and flip-flop logic with some projects that make LEDs blink.

      Then jump asm (to learn to address the metal) to Basic/Python (to learn logic and structure and say Hello World) to C (put the two together). Use plug-together electronic kits (what radio shack used to make but is now rebranded as "Maker" type stuff or robots). The truly hands-on path worked wonders for me, kept me interested at all stages, and I tell you I was grateful to learn each new abstraction tool. My daughter is five and loves to fiddle with my scope/things on my bench; I can't wait.

      The weakness in the teaching toolchain I see at the moment is the asm-teaching stage, at my young age it was the Apples and Commodores, nowdays I'm thinking microcontrollers but I haven't really looked for good intro projects yet, any particularly good specific suggestions?

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

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

    4. Re:small asm, C, C++, python - in that order. by Eternauta3k · · Score: 1

      Then jump asm (to learn to address the metal) to Basic/Python

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

      --
      Yeah. Would you choose a neurosurgeon who pokes around people's brains in his spare time? I wouldn't.
    5. Re:small asm, C, C++, python - in that order. by tacarat · · Score: 1

      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.

      I'll 2nd this and lament my lack of mod points to numerically bestow positive reinforcement upon you.

      --
      "Common sense will be the death of us all"
    6. Re:small asm, C, C++, python - in that order. by Dutch+Gun · · Score: 1

      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.

      I'd definitely agree with this.

      My first programming language was AppleBASIC, which I learned around the fifth grade or so (from what I recall). I was entirely self-taught, as no one in my family new anything technology-wise. My dad was mechanically-proficient / my Mom good with numbers... but computers? Forget it. I inherited the Apple II+ after it didn't pan out as a business computer. I learned from a book with a big red cover written (apparently) for kids, and it was fantastic. I wish I could find a copy of it somewhere...

      I went the high-level approach. I had no concept of low-level assembly - didn't even know it was an option, and didn't know a thing about binary numbers (it was a mystery as to why the number limitation in programmers was 65,535 :). But I don't think I missed anything by learning about that later, when I decided in programming as a career. I'm now a professional videogame programmer, so of course, my language of choice is C++ today (with C# / Python / Lua for tools development).

      I've talked to some of my engineering and programmer friends... another one started in assembly language on the Commodore 64. Some of them didn't program until much later in life. Personally, I don't think I would have enjoyed assembly programming - honestly, I still don't even today. So yeah, don't try to dictate how the kid learns. Find out their interest and zero in on that.

      --
      Irony: Agile development has too much intertia to be abandoned now.
    7. 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.

    8. Re:small asm, C, C++, python - in that order. by fractoid · · Score: 1

      I suggest getting a small machine emulation like a 6800, 6809 or 8080, and teaching him assembler so he knows what's actually going on. Then teach him C, and explain what's going on there in terms of assembling and linking. Then teach him C++, then teach him python. That'll give him an expanding world he understands right down to the metal.

      If he's got Aspergers' then this will work perfectly. If he's a regular 12-year-old kid, then he will get bored of register printouts within about twenty minutes.

      Personally, at that age, I'd start by baking some cookies. Introduce programming as the act of writing a 'recipe' to explain to the computer how to 'cook' a particular thing. Probably start with programs to generate images, either using the line drawing functions in a graphics library, or by running through each pixel and colouring it based on a formula. Python should be fine (and certainly no less beginner-friendly than Pascal), if you learn it as a collection of magic words and leave the deeper stuff until later.

      --
      Rampant carbon sequestration destroyed the Dinosaurs' tropical paradise. I'm here to help repair the damage.
    9. Re:small asm, C, C++, python - in that order. by fractoid · · Score: 1

      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.

      Exactly. Well spake, sir, and I bet your students love you!

      --
      Rampant carbon sequestration destroyed the Dinosaurs' tropical paradise. I'm here to help repair the damage.
    10. Re:small asm, C, C++, python - in that order. by fuliginous · · Score: 1

      I'd agree with the go where the interest is, my thoughts were how I programmed at a younger age than that in a bit of machine code and then assembler and basic. But that was fine because it was my interest driving me (and trying to show off to my dad to whom it was all just as new that I could do it better).

      Put simply you will never get them learning if they aren't doing things that interest them.

      Once you have the subject you can choose a language appropriately (assembler, C, Java, Python and on and on). Best using the ones you know best really and just highlighting they have many choices out there to discover for themselves later.

    11. Re:small asm, C, C++, python - in that order. by msgyrd · · Score: 1

      I would suggest against ASM as a first step. Kids of the last two decades (myself included) have grown up around computers, they're already thinking several levels abstracted from the bare metal, and when they think 'programming computers' they probably want to see problems and results at their current level of abstraction and understanding, and gain knowledge they can use.

      When a person mostly understands their current "layer" is when they should move up or down in abstraction. Given a one-on-one scenario, I suggest asking about their interests and find out where they are the most knowledgable, then use that as a starting point.

      Teaching them about registers and opcodes will probably not integrate with any of their current knowledge. Much like in school, I disliked math, not because it was hard, but because teachers could rarely relate it the my world or current knowledge. Basic mental methaphors. We're not building a house, we're building a network of information. Foundations matter, but they're not always the starting point.

    12. Re:small asm, C, C++, python - in that order. by Mike+Buddha · · Score: 1

      I'm not convinced this is the best way to begin. I think you should start with the computer equivalent of an explosion. Give the student something they can manipulate nearly instantly and see results in real time as changes are made instead of the tedious non-interactive write/compile/debug rigamarole. There's plenty of time to explain the details once the hook is set. The questions as to how the underlying code works will come, and NASM will be waiting patiently. Logo was an effective starting point for many of us in the industry and it's not because the syntax of Logo is universal or even relevant to the work we do now.

      --
      by Mike Buddha -- Someday the mountain might get him, but the law never will.
    13. Re:small asm, C, C++, python - in that order. by slashdot_login · · Score: 1

      Another useful Python learning environment is RUR-PLE: http://rur-ple.sourceforge.net/en/rur.htm

    14. Re:small asm, C, C++, python - in that order. by gregmac · · Score: 1

      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.

      This is exactly correct. "Programming" is farther from a one-size-fits-all skill than it's ever been. There are so many different areas and specialties. It's nice to have a sense of certain areas, but there's no way to be an expert in everything ("jack of all trades, master of none"). Some people are just more suited to certain areas or types of programming, or just enjoy it more. No sense forcing someone who loves to design games to write print drivers. Think of some of the extremes: writing kernel code/drivers; writing music software; home/industrial automation; "business applications".

      I know people who can write great APIs, but make the suckiest user interfaces ever.. and likewise, people who can create beautiful intuitive interfaces, but have to rewrite their API every version.

      It's probably early for a 12-year old, but one of the most important things is knowing there is much more to programming than writing code. If you're writing photo editing software, knowing about color theory, how cameras work, etc will take you MUCH farther than knowing (insert language here) really well.

      This can go the other way, too. This might be good for a kid, actually. Maybe s/he loves shooting off model rockets. To get them interested, try writing software to help design them or figure out how high/where one will go (eg it can read weather forcecast off the net to get wind speeds/direction). This alone would work because it's a program that actually applies to them to solve a real problem, but it also starts teaching the value of integrating knowledge of programming with knowledge the problem domain.

      --
      Speak before you think
  189. An old-fashioned suggestion by snStarter · · Score: 1

    If he is numerical at all, a programmable pocket calculator might be an interesting place. Why do I suggest this? Because it has all the fundamentals with branching and testing with an emphasis on getting the logic right, but without all the syntax issues. Unfortunately he's a little young to have run into reasons he might need to actually use a pocket calculator.

    There is also Squeak. As I recall the designers were really interested in getting kids to work with programming. So dufus named Alan Kay is involved - what the heck does HE know? But I see you're a big C advocate and Squeak and Smalltalk are about as fall away from C as is humanly possible without going to Lisp.

    And, since Lisp came up, you might consider Logo whose turtle graphics module allows for some really neat complex graphics.

    Even a system-wide scripting language such as AppleScript on the Mac would let him work with major software packages in a programmable method.

    But, really, it's up to you to work with him. I have to think working together would be great for both of you -- any one-on-one time with your kids, showing your passion for your vocation, has to be a good thing IF you're patient, trusting, and can be playful.

  190. game programming is the way to go by Anonymous Coward · · Score: 0

    I've been teaching elementary and middle school kids game programming since 2003. It is a great introduction to programming and the kids love it. Trying to teach a command line interface language to a 12 year old will get boring. They need to see their goals. Check out www.tektoma.com. Teaches kids game programming through video tutorials.

  191. lego mindstorms NXT, by Anonymous Coward · · Score: 0

    Is he into robots then how about lego mindstorms NXT, simple graphic interface to get the basic ideas of programming and then can lead up to other languages to do more.

  192. I'm more interested in... by Schnoogs · · Score: 0

    ...how to teach my 40+ year old coworkers how to program.

  193. Scratch! by Anonymous Coward · · Score: 0

    Scratch (by MIT, http://scratch.mit.edu) teaches the basic concepts of programming in an easy way without going into specifics of traditional languages. It even has easy to use external controllers available.

  194. Love 2D by kennedy · · Score: 1

    Check this out -

    Based around LUA, and its got a full online tutorial. He could be making simple games within a few days.

    http://love2d.org/

    Very neat stuff.

  195. How to Design Programs by Anonymous Coward · · Score: 0

    http://www.htdp.org/

  196. C# XNA by Anonymous Coward · · Score: 0

    My 12 year old has done amazingly well over the past few months with C#. Like most kids he's most excited about games, so the Microsoft XNA framework has been perfect - and of course the MS C# Express Edition is free and a decent environment to learn to work in. The XNA site has a variety of tutorials that we have worked our way through. He obviously needed some help from me with explanations of various concepts and explanations of OO concepts and I do sometimes help if he gets stuck debugging, but it is amazing how quickly he picked it up and was creating original creations. At this point he's really teaching himself as he sets himself new challenges and figures them out himself. He's really excited about the fact that he can run his programs on the XBox 360. We did buy a C# book but he generally utilizes various online sites when he needs to look up how to do something. I should note that he had previously done a fair amount with HTML and Javascript using an online tutorial site (again, mostly teaching himself with help from me when he gets stuck or doesn't understand a concept) although this is much more satisfying.

  197. Not BASIC! NOooooooo!! by noz · · Score: 1

    It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.

      -- Dijkstra

    1. Re:Not BASIC! NOooooooo!! by alanmusician · · Score: 1

      Only partially accurate, but humorous. Most of the best programmers I know started with some form of BASIC, often on C64. The fact that you have to unlearn a lot when migrating to strongly typed lower level languages can actually make your fundamental understanding of the second language stronger. In other words, you have to justify everything new that you learn rather than accepting it as "how it's done."

      I would recommend learning with BASIC, but not staying with it for long and taking it with a grain of salt. It's fairly unlikely that anyone would stay with BASIC long anyways.

    2. Re:Not BASIC! NOooooooo!! by shutdown+-p+now · · Score: 1

      Dijkstra said that when BASIC required labeling every source code line with a number, and its only flow control statement was a single-line "IF ... THEN GOTO ..." - which rather explains the reason for such an opinion. Of course, BASIC hadn't been like that for almost 30 years now.

  198. Game Maker by Anonymous Coward · · Score: 0

    I started using Game Maker when I was 12, but now it just sucks.

  199. Forth by wonkavader · · Score: 1

    And buy him/her a robot.

  200. You people have no freak'in clue by whistlingtony · · Score: 1

    Come on, seriously,

    If it's not fun, he won't care. He won't give two sh1ts about libraries, OOP programming, garbage collection, etc etc etc....

    If you feed him freak'in c++, he'll hate it, and he'll hate it FOREVER.

    It's not about the stupid language, it's about what you DO with it.

    Get a fun project, in an easy language.

    Make a chat program all of your own. Then he can chat all clandestine like with his friends.

    Make a program to help him encrypt and decrypt his secret stash of porn. He's a teenage boy? He has one....

    How about a secret file sharing app he can use to share with his friends?

    Whatever.... find a fun project for a teenage boy, and do it in an easy language. If he really takes to it, he'll eventually find his way to the harder and more "serious" languages.

    Sheesh

  201. The hard part of programming ... by Frater+219 · · Score: 1

    People spend a lot of effort blathering about which programming language is best to use for teaching. But the hard part of programming is not the programming language. It's the logical thinking skills; the abstract concepts like function and algorithm and data structure and type; the reasoned approach to breaking a problem down and seeing algorithms and patterns; the ability to learn new tools such as a utility or an API and put them together usefully.

    These things transcend language. Yes, you will probably use different algorithms or data structures in Python on a Linux box than in C on a microcontroller, but you will use largely the same sort of thinking skills. You will approach writing code differently in Lisp than in Java, but in both you will be combining known parts in a new structure to accomplish a task.

    And it is these abstract skills -- especially the skill of abstracting, of recognizing and using patterns -- which separate those who learn to program well from those who do not. (And this is different again from being a successful professional programmer, which entails a quite different set of skills.)

  202. BASIC and/or Perl by EightBits · · Score: 1

    Perl is a very good language to learn as a beginner. You don't have to go into all the cool uber geek tricks to make it do incredible amounts of work. The syntax is easy to learn for simple programs.

    And I might be a bit biased here, but why not dish out a dose of BASIC on an emulator? While BASIC 2.0 on a C64 doesn't provide good graphics and audio controls, BASIC 7.0 on a C128 does. Very importantly is that this could give some pretty instant gratification to a kid who might be interested in writing a game. The VICE emulator provides C128 emulation that would be good for this.

  203. Just some points to consider by Anonymous Coward · · Score: 1, Interesting

    Having learned to program largely on my own at age 10 (on a Sinclair Spectrum with 64k ram and a ROM-based BASIC interpreter), I might offer a few points. They need or need not apply. When I started, computers were few and far between. I can't imagine that he would be at the level where I started - surely he's at least picked up an Internet browser and knows about the Internet, instant messaging and the like.

    1. The starting environment should be something simple and clean. It shouldn't get in the way of whatever it is you're trying to accomplish. Unless the kid actually wants to become a Linux hacker (and I mean this specifically), start with whatever he's familiar with. A console-based environment is fine, since he'll need to know about basic file management very early. But don't start off with shell scripting. It's not gonna hold his interest.

    2. Pick something that gets results soon. One of my proudest accomplishments in that day just let you control an 'X' character on the screen in a 'text' video mode (back when the paradigm was QAOP nod WASD). It might seem trivial, but you actually need to know a lot of basic concepts to pull it off: processing user input (hence IF statements), variables (to store your position), and dealing with the screen. In fact, I remember an 'epiphany' I had when I realized that the statement "LET x = x + 1" is a valid and important device, and not mathematical nonsense. Unfortunately, we live in the age of intricate console games with HD graphics, so doing something like that would not get the same kick today.

    3. If possible, find a 'project' that's easy to start off with, but can be readily extended - another important aspect of programming. Take the above example. Once you have that, you can add target objects on the screen to be picked up - and start keeping score. You can think about how to extend it to two players. You can add walls that you can't cross, or teleporters, or other ways to modify the available paths. Later on, you can add a monster chasing you - say making one move every time you make one, and think about how to make the monster smarter, especially once walls set in. At its most basic, this is the stuff games are made of.

    4. One can learn by example. I used to have books that consisted of collections of short programs (10-30 lines of code) that solved various simple problems. Eventually, he can learn to incorporate those into his own programs as they get more complex.

    5. Interacting with the OS, networking, and even basic memory management like malloc are advanced topics IMO, and should be glanced over at first. I would have also included Web technologies in this, but I'd expect a 12yo to know his way around the Internet. Still, I wouldn't start with HTML (unless you want to teach him scripting instead of programming). I don't know Javascript well enough to comment, but I'd start with a more standard programming language. In retrospect, I might be inclined to start with a language that requires variables to be declared, because it helps to organize your thinking at the start.

    6. Even though one no longer needs to solve IRQ conflicts, knowledge of PC hardware is still important - not to mention useful since pretty soon one can make money with it working for a local shop or freelance. Eventually, one can touch on that too. The basics of PC hardware haven't changed that much over the years, beyond the shape of our expansion slots.

    7. Really, the most important thing is to get his attention at first. If he's a bright kid, has a natural curiosity about things, and has an aptitude for logical problems, you just need to get him started and let nature take it course. However, if he's more interested in sports or chasing girls, there may not be much you can do. Not everyone needs to grow up a programmer, after all.

  204. Oblig Yoda quote: by Kvasio · · Score: 1

    YODA: He is too old. Yes, too old to begin the training

  205. FutureBasic by johnrpenner · · Score: 1

    if you've got a mac - a great place to start is FutureBasic* - it allows you to get into programming pretty easily - get your teeth wet with the basic you know and love -- and then easily lets you get all the way to C++ and the full XCode IDE -- it supports proper recursive functions, local & global variables, and a very nice integrated IDE that ties in to XCode -- allowing inline C++ and assembly language code..

    FutureBasic 4.4.3:
    http://www.stazsoftware.com/futurebasic/index.php

    lets you get into programming pretty quickly, without spending a lot of overhead time with an undue amount of UI handling & string handling code.

  206. Kid languages by Anonymous Coward · · Score: 0

    LOGO is easy to learn with - they have versions for just about every OS out there.

    BASIC is the old standby - I learned with PET BASIC, then APPLE BASIC - I'd get an Apple ][ emulator, and have at it... On the lighter side, there's a ton of kick ass games that run on the Apple ][ - sure they don't compare to the FPS, but hey - when you can play Temple of Apshai or Miner 2049'er or Karateka, what else do you need?

  207. NOT making the programming world a better place.. by omb · · Score: 1

    Every time I read something like this I want to puke: People like this dont realise how much work it is to even install such a way-from-the-beaten-track system, and support it.

    Teaching people such stuff is a huge dis-service. Further we are talking about initial languages, which should, almost by definition, be mainstream.

    Academic axe grinders should keep their experimental ideas for further study.

  208. Component Pascal by __aahgmr7717 · · Score: 1

    Component Pascal is a successor of Pascal which follows the evolutionary line:
    Pascal=>Modula=>Oberon=>Component Pascal

    Niklaus Wirth has spent his life designing clean succinct syntax and semantic systems.

    If one wishes to truly understand computer programming without unnecessary baggage then
    I would strongly recommend the BlackBox/Component Pascal development environment to a new student.
    see

    http://www.oberon.ch/blackbox.html

    Scroll down to Free Download.
    The total development environment is about 10MB
    and comes with complete documentation and examples.

    Enjoy

  209. Alice orr other (game oriented) environment? by Anonymous Coward · · Score: 0

    I agree with all the "it must be fun" comments. So what about Alice (http://www.alice.org/) or other similar (game oriented) programming environments? After that if he's still interested he should probably attempt to learn another language on his own with you as a resource to point him in the right direction. This will be yet another useful skill for learning other languages and/or skills.

  210. If price is not a concern... by Anonymous Coward · · Score: 0

    You might look into the Parallax robot kits you can build and program in PBASIC. The books are really easy to read, the program itself is very simple but you won't learn any OOP or other modern programming style. The kits are a bit pricey for my taste but they are used in many school districts. Check out the BOE-BOT kit.

  211. Anonymous Coward by Anonymous Coward · · Score: 0

    Javascript -- plain and simple; java/c++ like syntax... can be written procedurally then addapted in to OO as he learns... and you can do some neat stuff (bouncing ball demo etc) with relative ease. Also it is ofcourse free and can be written on any computer without having to download and install compilers etc.

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

  213. At age 12, I taught myself AppleScript. by nathanator11 · · Score: 1

    When I was 12, I taught myself AppleScript from this Wrox book: Beginning AppleScript .
    This is a great language because it's so much like English. You can guess a command and get it right.
    Also, that was a good book because it teaches you something and then lets you test and explore it using examples. And the book is still a great referecne.
    AppleScrpt is a good, easy way to become familiar with programming concepts. And it's got built-in tools for user interface work, so that part is easy.
    Also, there's a lot of good help on the Web for AppleScript.

    Good luck! -Nathan

  214. Anonymous Coward by Anonymous Coward · · Score: 0

    Your first programming language is much like your first young lady. It can either set the stage for wonderful things to come or can wreck you for all others. All kidding aside, learning programming isn't about the languages. Its about understanding programmatic thinking, problem solving, and conveying a solution is a manner that is both efficient and easily understood by others that will eventually need to read your code. There are two schools of programming thought. 1) Imperative programming languages like C, C++, C# and the like. Of these C is the best place to start. Mastery of it will teach you all the basic skills necessary to master all other Imperative languages. 2) Functional programming languages, like Lisp, Schema, et 'al. Of these Scheme is the best place to start. Mastery of it will insure you have all the skills necessary to learn any other functional programming language.
    Most people start with an imperative language. In many ways they are easier for beginners. Most developers find that they never need to learn a functional language because they can stay employed without learning one. This is unfortunately, a developer isn't truly complete until they have mastered a pure functional language, despite the fact that they may never program commercially in one.
    I've been programming commercially for 25 years and have been lucky enough to develop programs in dozens of different languages over the years. In my humble opinion: First C, second Scheme...... After that you'll be able to throw together some of the best software in the world with tea leaves or whatever else your forced to, if you have to, just keep in mind its all about how you put it together not the language your using.

  215. Lua is typically faster than Javascript by Anonymous Coward · · Score: 0

    Lua with a just-in-time compiler like LuaJIT is considerably faster than the typical JavaScript implementation. In some (naive) cases, the code generated by LuaJIT is faster than what comes out of gcc.

  216. WTF by Anonymous Coward · · Score: 0

    "I'd love to get low-level with him"

    Is this the new "smackdown"?

  217. Cool 2D stuff by DrYak · · Score: 1

    When I was 12, all I wanted to do was cool 2D animated stuffs.

    Doing cool animation isn't that much dependant to a specific language, as much as the *libraries* available to that language.

    Old-time BASIC had such functions (although they varied hugely across dialects. From complete graphic libraries with lots of primitives, down to do-it-your-self-with-pokes)

    Most modern language, such as Python, Perl, Java, etc... have also such library (And SDL is a popular one, and unlike older stuff, it has the adventage of being available in most modern language and on tons of platfroms, from computers to consoles).

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
  218. kid basic/256 basic by pyster · · Score: 1

    google kid basic. its neat.

  219. Split up the work, and don't force it by TikiTDO · · Score: 1

    My advice, and take it as you will; if you want to "get low level with him" by using a programming language, forget it. Low level programming is something you need to understand completely in order to enjoy. I would start off with a simple and straight forward language. My personal choice would be Ruby, for it's clear syntax, and powerful features, but obviously this may not be everyone's cup of tea. Python or Java may be a good alternative. I would not suggest Perl as your first language, since it tries to cater to too many programming styles, and would be really confusing for a beginner. Whichever language you choose, use it to teach him programming fundamentals; specifically how to construct a logical framework that will solve a given problem. Do not get too deep into implementation: he is not likely to be ready to hear about memory management at this point. If you want to get creative, you can get him used to different paradigms, such functional programming with Lisp. Of course, this may be of limited use, depending on what he expects to do with these skills.

    After that, if you, and he, truly have your minds set on low level languages, then I would start a bit lower with digital circuit design, with the basics of logic gates and memory. After that, at least cover the very basic CPU design. It should not be too hard to explain the basic RISC pipeline. In this stage it is critical not to delve into details, because while the concepts themselves are straightforward, covering all the formulas, special cases, rules, and caveats is enough to fill a four year engineering program. From then you can touch on assembler, and only after that would he actually be able to get the full benefit of knowing and understanding a low level language. If he does have a talent for it, then I strongly recommend the former method to get him familiar with the basic ideas, then the latter method to teach him how those basic ideas tie into existing systems.

    Further, if you do try something like that, I would take a day at the start to go over how it all will tie together in the end. Maybe even make a diagram. This will save you a lot of headaches in the future, since you will be able to redirect all the "Why are we doing this again?" questions.

    If he has the patience for it, this sort of knowledge would give him an invaluable step up on his classmates, so I do agree that it would be time well spent.

  220. Web vrs local programs by Anonymous Coward · · Score: 0

    He will need somewhere to run any web code (either locally or on a hosted site) vrs a standalone language like basic or .net which can be ran locally. Well you can run html locally but it is hard to show it off to your buddies or remote family members. If he is interested, I suggest getting a hosted site (free or otherwise) and getting him to work on stuff he can show off to friends.

    I suggest PHP, as you can mix html code, and it can be used to read/write flat files as well as a DB like MySQL for data storage.

    Good luck regardless of what you do, as we could use another budding programmer in the US.
    Joe

  221. Revolution 4.0 by 8086 · · Score: 1

    I haven't used it myself, but you might want to take a look at the Revolution programming language which has english-like syntax and seems to be more capable than Logo/BASIC as a beginner's language: http://developers.slashdot.org/story/09/11/26/2016255/Dumbing-Down-Programming . I hear it is being used in an academic setting to teach programming to Lit/Art majors.

  222. Time for that father-son talk by PPH · · Score: 1

    "Proggraming is like having sex, son. Make just one mistake and you'll have to provide support for a lifetime."

    --
    Have gnu, will travel.
    1. Re:Time for that father-son talk by Anonymous Coward · · Score: 0

      So is spelling.

    2. Re:Time for that father-son talk by m6ack · · Score: 1

      Corollary -- even if it's not a mistake, you provide support for a lifetime; so, learn to make simple tools that do only one thing. Make your customer responsible for building upon your simple tools to do complex things -- and make the "children" your customer's problem.

  223. What the hell is your problem? by pclminion · · Score: 0, Flamebait

    "I'd love to teach him how to program" ... "Lead him down a path" ... What the hell is your problem? It's a human being, not a parakeet. He's not a plaything to amuse yourself with or a piece of clay to mold however is most entertaining for you.

    1. Re:What the hell is your problem? by m6ack · · Score: 1

      A father molds his children and establishes an heritage. this is the meaning of being a father -- by definition. If you want to raise bastards, by all means do so by taking no interest in molding your children. Please do not discourage this father from doing his job.

      That being said, the challenge in molding is to do so in accord with the child's natural inclinations -- his "bent." Many children are not naturally inclined to proficiency in programming, but all need to learn it -- and not only to understand their heritage. The talent of instructing a computer to "do things" for humans will be the most essential basic tool for a person to learn in the next century, if not the next millennium.

      Consider a man of yesteryear -- what does he look like? My grandfather was a preacher -- but to make ends meet he worked on the first flying wing... he riveted. He plied his trade honorably with yeoman's work, but his labors are now replaced by robots controlled by computer.

      My father wanted to be independent and own his own business -- but is a man without skill... he turned to the craft of a shoe repairman. This is a job that is now being replaced by a combination of technologies including robotic repair. This trade will also not survive another generation.

      My employ is something that may last a little while, but definitely not without change. I do test engineering on wireless devices (yes, a great departure from my forebears). Most of us use tools delivered to us by our suppliers. My differentiator, is that I have learned how to program. I can manipulate the programming environment(s) that our suppliers have delivered to make our organization more efficient, and allow us to target more than one vendors' tool set -- IOW, we are defeating vendor lock-in (or are at least convincing our vendors so) to the effect that we are "comoditizing" them.

      This is the future: leveraging "machines" (in the classical sense) and the languages of machines to do the work of our forebears -- and of that illusory "cheap labor" from China, et al. Perhaps... it also means to use machines to program biology to perform the next level of programming -- but in all it will be "programming of machines ." No matter then end technology, whether biologic, radiologic, philosophic, whatever -- the man that can leverage machines to do his bidding and program in any given field will be supreme in that field -- if only to reduce economics of advanced technologies to that of comoditization.

      QED.

    2. Re:What the hell is your problem? by pclminion · · Score: 1

      It's a brother, not a father. I'm just picking up on the very salient lack of any comment about whether the kid WANTS to learn any of this stuff. When I was younger I tried several times to get my own brother to be interested in things I was interested in, and vice versa. Some of those discussions ended up in fist fights. Eventually I realized that my brother is who he is, and I am who I am.

  224. Scratch, Alice, Python, Young Programmers Podcast by Dave+Briccetti · · Score: 1

    I recommend Scratch (MIT), Alice (Carnegie Mellon) and Python, for teaching kids. I have some video lessons here: http://young-programmers.blogspot.com/ on those three, plus Jython and Pygame, Scala and Lift.

  225. Start with assembler by Anonymous Coward · · Score: 0

    If you teach him Python, PHP or Java first, you can bet he will never learn any lower-level programming language. I think the absolute best is to teach assembler, then C and after that C++ or any other OO language, maybe Python. Even better would be to first make him program with e.g. debug.exe. Why? Because this way he will understand why we use symbols in assembler. After a while, he will feel that he has to repeat a lot of idioms in assembler (conditionals and loops for example). Then he will appreciate C. After an unimaginable number of times he will have to write something like "ret = some_function(); if (ret != 0) { printf("Error message\n"); return -1; }" he will appreciate exceptions in C++ or Python. If he will also read some good C code, he will learn that it is a good practice to encapsulate data. Again, he will be happy for C++/Python objects and namespaces, plus templates and inheritance are good for avoiding code duplication.

    This is certainly a very long way to learn programming, but I am sure it is the right way. Your brother would appreciate and understand the way things are in modern OO languages. He would also have an idea of how the compiler might translate his C code into assembler, and thus, how to write efficient code. It certainly isn't the easiest way, but I can guarantee you that it would make him a good programmer. The alternative, easy way, of learning him a higher level language first would in my opinion lead to bad programming practices.

    Anyway, this is roughly the way I learned how to program. I went from 8080 assembly (hand translated into hex code) and moved to QBasic and then C, C++ and Python. When I only knew C and was reading Bjarne Stroustrup's book on C++ I immediately recognized the flaws that C had and C++ fixed.

  226. Hello World Python book coauthor did guest video by Dave+Briccetti · · Score: 1

    Carter Sande, young coauthor of Hello World, did a guest video lesson on the Young Programmers Podcast: http://young-programmers.blogspot.com/2009/11/carter-sande-presents-pythoncard.html

  227. MUDs by witherstaff · · Score: 1

    Ahh the TI calculators were great. I remember it taking hours and hours to plot out a mandelbrot set. Of course I don't think my code was very optimized, and the main image was pretty blocky. But that was way better than paying attention in class!

    But for learning C style languages playing muds in college was a fun step. You could go from the basics of functions to the advanced with lambda closures. Shame that people all want graphics so the days of the text muds are decades past. Although a friend's son started only a few years back at 12 and picked things up pretty quickly. Of course you need a test mud for the kiddies since ever kid wants to build a lightsaber right away but it's a start...

    1. Re:MUDs by Blakey+Rat · · Score: 1

      Most MUDs were a mixture of spaghetti C/C++ and some horrible BASIC-based scripting language designed by idiots.

      You learned because you were highly motivated, not because MUDs are a good environment to learn in. Actually, a MUD built in Python or some other nice language would be interesting, but I doubt anybody's working on a brand new MUD engine in this day and age. Those old ones were crap piled on crap.

  228. Have a look at BlueJ by crowne · · Score: 1

    Have a look at BlueJ http://www.bluej.org/ I think that java is a great language to learn programming and being based on C-style syntax, the transitions to C should be fairly smooth.

    --
    RTFM is not a radio station.
  229. The language does not matter. by jotaeleemeese · · Score: 1

    You should get a hint about this by reading the myriad of replies to this topic (I have counted at least 10 different suggested languages, which tell you all what you need to know: the chosen language is frankly immaterial to the objective).

    I would suggest that you use a language you are familiar with, you are bound to teach somebody better if you understand the tool used fully.

    --
    IANAL but write like a drunk one.
  230. Charles Petzold’s “Code” by Dave+Briccetti · · Score: 1

    To start at the beginning (flashlights and morse code, switches, relays, telegraphs, and, or circuits, ... modern computers, check out “Code,” by Charles Petzold.

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

  232. Linden Scripting Language by Ken+Broadfoot · · Score: 1

    Linden Scripting would be fun for the kid and it follows good programming syntax. Visuals? Not bad in Second Life. Just keep him out of the Adult Areas, or he won't do any programming ;)

    --
    Bitcoin pyramid: Join here: http://www.bitcoinpyramid.com/r/1427 it's FREE!
  233. 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.

    1. Re:Does no one get it? by inline_four · · Score: 1

      This is quite interesting for me coming across this discussion as just yesterday I happened to be talking to a K-2 educator, who has developed an introductory programming curriculum based on Alice and Scratch environments. I personally have no first-hand experience teaching kids, but was fortunate enough to be exposed to a variety materials and teachers early on. I'm still not sure if they fostered my interest or gave an outlet to something I had, or perhaps a combination of both.

      I distinctly remember one of the first things that captivated me was a translated Brazilian comic book that accurately and progressively portrayed the basics of AI and robotics. It was intelligent, humorous and seemed to be just at the right level, where I was neither bored nor overwhelmed. I read and reread it countless times, always wanting more when I got to the end. Other important moments seemed to be tied to more conventional classroom settings using programmable calculators, BASIC, Pascal and the like. Looking back, it seems not having a computer at home with very limited computer lab time, it required an intimate understanding what your program did and debug it as much as possible in your head -- very similar to the world of punch cards. I don't remember now under what circumstances I acquired a C++ book, but I remember trying to understand the concepts, reading it alone, getting frustrated, putting it away, only to come back to it months later and trying again. I think it was a year of doing it before I had a huge "Aha" moment, when I finally "got" objects. The irony was that I didn't actually get to program in C or C++ all that much later in life, but that incredibly dry and difficult book with virtually no access to a computer got me to the point, where I didn't look back and knew for a fact that I enjoyed learning about programming. What's also interesting is that while I also liked natural sciences and mathematics and did okay under lots of positive pressure and great teachers, I would get frustrated and walk away much more easily and it was that pressure that kept me in it 'til the end, whereas with programming, I couldn't get enough.

      I have no idea if this kind of path is right for anybody else, or if it can even be reproduced nowadays. But I've always had a feeling that there's something to teaching programming without computers themselves having primary focus. The teacher I mentioned told me that while he himself does use a computer lab for his curriculum, there are experimental classes, where kids are being asked to do various puzzles and problems designed to steer them in the direction of thinking in terms of algorithms. He also said that it's much more about the teaching method than the tool. Understanding age-appropriateness and keeping one's finger on the pulse of their motivation is key -- seems obvious, but not so easy to do well in practice.

      --
      Alexey
  234. Why not age 7? language isn't too important by Weezul · · Score: 1

    I started learning basic between age 6 and 7 for the purpose of writing my own games, and then learned C from K&R around age 12.

    I don't feel like the language is nearly as important as why she'll remain interested. First, you must provide a role model by visibly playing by writing programs yourself. Second, you need a medium of action which the kid will appreciate. A few possible medium are (1) lego mindstorm, (2) X10 home automation devices, and (3) video games.

    I think the language will often then be determined by your own entertainment interests.

    p.s. A major threat here is the potential distraction from more passive entertainment like better video games and television. If you play flash games, then start writing them. If you play WoW yourself, then write Lua script addons, and teach her how to write them too. If you play counterstrike, then learn how to program bots, and play games involving bots. etc. I'd seriously consider selling your wii, playstation, xbox, etc. and also avoiding the television.

    --
    The Christian religion has been and still is the principal enemy of moral progress in the world. -- Bertrand Russell
  235. Python with IDE by Dave+Briccetti · · Score: 1

    Recent versions of NetBeans do very well with Python. Eclipse with Pycon isn’t bad. Not sure why you think Python is too big and complicated. Seems ideal to me.

    1. Re:Python with IDE by Anonymous Coward · · Score: 0

      Recent versions of NetBeans do very well with Python. Eclipse with Pycon isn’t bad.

      Not sure why you think Python is too big and complicated. Seems ideal to me.

      Python has a lot of stuff built-in in the language, which makes it complex. Another complexity in the learning process is defining code blocks by indentation. I believe it's more natural to thing of start and end of block, and let the IDE do indentation (auto-format). Taking care of indentation is IMHO unnecessary micro-managing, and not having to type braces (or whatever) does not offset the trouble.

      Python's problems is enhanced by not having clear types, which makes it hard for the IDE to help the programmer. How smart is code completion in NetBeans or Eclipse for Python? For example, if there is code:

      foo = {"pos":(100,100), "label":"foo" }

      foo["label"].<alt-space>

      Where alt-space means code completion key, does either of those IDEs offer the method list for strings? If they can do this, then I'd be inclined to recommend Python as well, despite indentation, but if not... Having to read documentation for stuff like that is unnecessary complication in the learning process, compared to the alternative of getting drop down menu with possible things to do with the string.

      Sure, you and I probably learned programming the harder way, but just as advanced IDE features are a great help for writing error-free code quickly especially when picking up a new language, they are just as great a help in learning the first language and learning programming.

  236. How about something like Liberty Basic? by randomErr · · Score: 1

    What about a basic lanugage?

    You have Liberty Basic which is fairly cheap and pretty close to the Apple basic days. You could FreeBasic which is free, you would just have to setup one the free IDE's. Also Emeregnce Basic which is shutting down in a week or so is cheep and you get the source code for a $100. The first and last have decent interfaces and will support some fairly advanced programs.

    Emeregnce Basic Bundle:
    http://www.ionicwind.com/forums/index.php?topic=3823.0

    --
    You say things that offend me and I can deal with it. Can you?
  237. Programming languages are ephemeral by Anonymous Coward · · Score: 0

    If you want to go low level, consider providing some basic knowledge about computer architecture first. For example with a very simple architecture and its assembly language (emulator). However, as already suggested, robotics may be more attractive to youngsters.

  238. Scratch and Alice by ChenLing · · Score: 1
    Go with a visual programming language -- where they can see "fun" results right away, and that's age appropriate. What I just did with my 2 cousins (14 and 16 year old girls):

    That's a *much* better way to start them off. It's equivalent to BASIC on an Apple II really, but even more fun.
    Then you can start them off on something like a Facebook App, and then web pages with Perl/Javascript/HTML.

    --
    "You have the option of insanity. I do not. And that makes me crazy!" - Brian to Angela, My So-Called Life
    1. Re:Scratch and Alice by Pikathulhu · · Score: 1

      Yes, these are the ones I dropped in to recommend. Most 12-year-olds aren't going to be delighted by "Hello World" or Fibonacci sequence programs. Scratch and Alice are actually fun ways to start, giving instant, interesting feedback while teaching fundamentals of programming. Incidentally, Alice was written in Python, and one of the people in charge of it was Randy Pausch of "The Last Lecture" fame.

  239. hackety hack by cmdr_tofu · · Score: 1

    Why the Lucky Stiff created an online Ruby environment for teaching programmign to kids. It's called Hackety Hack. Here's a link:
    http://hacketyhack.heroku.com/

  240. teaching programming to a novice by Anonymous Coward · · Score: 0

    first, pick some tasks and write pseudo-programs of only comments. second, try some some c and lisp or prolog on a toy-program he has an interest in, and continue with comments and stubs. get him a primer on agile programming even though he is working alone.

  241. Hornetseye by cellurl · · Score: 1

    Teach him something fun like Hornetseye.
    Its like VB, but for images.

    I told my 12 year old that if he helped me make a Hornetseye app for a QUIZ, I would take him to Legoland.
    We had a great trip!

    Here is what we built

    -jim
    Get paid to drive around, maybe

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

  243. Make it fun, don't even attempt c/asm by mr+sharpoblunto · · Score: 1

    I think a lot of you are seriously missing the point when you're suggesting c/c++/asm, or even c#/VB.NET/Delphi as suitable languages. The idea is not to start them on the shortest path to them to become the perfect programmer with impeccable knowledge of the machine and computer science principles, but rather to spark a passion in them for programming that they will continue of thier own volition. Let them get interested first, then they can learn to program properly later.
    The problem with using low level languages, or widely used commercial languages is that the languages are too complicated, the libraries are too big (Java, .NET etc have huge base class libraries full of useful stuff but its way to overwhelming when starting off) or the tools/ides themselves are too complicated (try explaining the ins and outs of eclipse or visual studio to a kid).
    Thinking back to when I learned to program in QBasic I think the ideal language is one that is simple to make stuff happen on screen (Most kids start programming so that they can make games, so you need something which gives them the impression, at least initially that graphics and interactivity is an achievable goal),is fairly limited in its base libraries (this forces you to learn to solve common comp sci problems, or at least think about solutions to them as the libraries won't do it all for you), and has a slow execution environment (this forces you to think of better ways to do things and work within the constraints of the language).
    My suggestion is javascript/HTML, the IDE is the most familiar app to most computer users - the browser, you don't need any dev tools, its totally cross platform, you have access to a powerful and pretty easy to understand display engine with html/css and you can write anything from a picture gallery to a text adventure, to a mario clone depending on your skill level.

  244. Short and sweet by Kagetsuki · · Score: 1

    Programming is a tool. Find out WHAT he wants to make and choose the language (and libraries) that would be best to achieve that. The quicker he can get some gratification and see any spec of what he wants to make come up on the screen the quicker he will want to do more. Once he starts getting into it THEN start getting into the "why" and "how". The key to teaching anyone anything is to 1. Show them the value of the skill. 2. Show them the gratification of using and achieving something with that skill.

    As for a "beginner" language, languages that are made just to teach concepts and have limited practicality should be avoided in my opinion. If he can handle learning to program he can handle learning to program in C. Don't discount straight up Assembler either, not on the PC but rather for embedded applications like MicroControllers. Getting an LED to flash on a board is pretty easy and can be done inexpensively and simply if you have the right tools (look into AVR or H8, you can be up and running in under 100USD/10,000JPY). Say he wants to do 3D game programming or simulation; more than the language is the technology - straight OpenGL lets you do things like transformations, rotations, etc. without having to know how to build a matrix or what an affine transformation is, yet if you get more and more into it you can do your own matrixes as you please and introduce things like shaders etc. Libraries like (Free)GLUT will get you up and running demos in no time and samples are plentiful, and once you want more SFML will get you up and building full applications with no nonsense. In Java there is JOGL as well, but getting canvases set up and contexts and blah blah blah is something you may want to do for him at first if you choose JOGL as the underlying concepts are a bit too deep for a beginner.

  245. Fuck strong typing by Anonymous Coward · · Score: 0

    Strong typing is to programming what grammar and spelling are to creative writing. Which is to say they take all the fun out of it and turn it into a chore. They can only be appreciated with the benefit of experience.

    1. Re:Fuck strong typing by macraig · · Score: 1

      What is this "fun" of creative writing of which you speak, that involves no grammar or spelling? How does that work, exactly? Do you give a chimpanzee a box full of magnetic plastic letters and an iron chalkboard, and then show him that he can toss the letters onto the board and make them stick?

      I'm so very sorry that having a structure to the process takes all the fun out of it for you. You can go back to your cage and swing from the branches now.

  246. LOGO! by Jeremy+Lee · · Score: 1

    C#, Pascal, Javascript??? Sure, and while we're at it why not give him an ADA compiler and the DoD style guide.

    Logo was designed and built to teach programming concepts to kids, and excels at it. Has done for 20 years.

    I've got a CNC 3-Axis milling machine at home that I don't use much, but we still gave my 6-year old nephew LEGO for Christmas. Think about it.

    --
    Jeremy Lee | Orinoco
  247. Unfortunately not Logo by bar-agent · · Score: 1

    I'd suggest Logo, but the poster said he wanted a language to lead into C/C++, and Logo will lead into a good language instead. :-)

    --
    i'd hit it so hard, if you pulled me out you'd be the king of britain [bash.org]
  248. I started with C when I was 11... by spiffmastercow · · Score: 1

    ---And I'm a damn good coder today. That being said, I would suggest teaching the kid something he can do something neat in, or he'll likely lose interest. Maybe GameMaker or those robotic lego things.. Then move him into Python when he grows past those.

    1. Re:I started with C when I was 11... by Anonymous Coward · · Score: 0

      Damn good coder, huh ... do you know Lisp?

    2. Re:I started with C when I was 11... by spiffmastercow · · Score: 1

      No, and I don't see a point in learning it, unless I want to be uber in emacs. Prolog was okay though, and learning Haskell is on my new years resolution list. But really, the point isn't what language you program in, but what you build with it. The language is just a tool.

    3. Re:I started with C when I was 11... by Anonymous Coward · · Score: 0

      > The language is just a tool.

      Hey! Just like you!

    4. Re:I started with C when I was 11... by spiffmastercow · · Score: 1

      Because I prefer syntax that doesn't make my eyes hurt, or because I don't care about a programming language that is only used by RMS and 6 of the crums on his beard? But hey, if knowing lisp helps you cope with your small penis and the fact that nobody likes you, then more power to you.

  249. I did it with Visuals First by Anonymous Coward · · Score: 0

    Lego ->
    Lego Mindstorms ->
    Delphi 3 ->
    Java ->
    C and other "more basic" languages.

    In the Delphi stage I spent most of my time designing GUI's with the nice GUI designer that comes with Delphi. I then realized that each GUI element has properties (and other stuff) and that kind of introduced me to classes (Java). Java took me a while to learn but it was worth it. After Java I taught myself more basic, or older languages although I don't often use them.

    So I suggest going from Visuals to text only Programming.

  250. Try something very easy to start off the basics by Anonymous Coward · · Score: 0

    Before you dive into anything majorly complicated, maybe give Scratch a try. You can download it at scratch.mit.edu. It has a very kid friendly interface, and to program you snap blocks together to form code. I started using Scratch at about 12 and it really helped me understand some of the coding concepts, and I am now moving on to C#, and I'll tell you it is easier because I started by using Scratch.

  251. python gaming book by Sark666 · · Score: 1

    Just stumbled upon this today. Not sure how good the book is but found it linked today on http://pygame.org/

    http://inventwithpython.com/

  252. A gentler suggestion by Blackjax · · Score: 1

    I see a lot of posters here suggesting things like Python and, god forbid, Perl & C. I think people suggesting things like that are forgetting that this is a 12 year old he is trying to interest in it, not a teenage geek already interested in it as they probably were. Your best start is probably something where they can see instant gratification in the form of something the kid might be interested in accomplishing with technology. Lego Mindstorms might be a good start, and then if they latch onto that heavily perhaps you could move them to an Arduino in a year or two. You might also consider something like this:

    http://en.wikipedia.org/wiki/Scratch_(programming_language)

  253. Processing by Anonymous Coward · · Score: 0

    I think Processing (processing.org) is worth a look.

    It is an easy step from Processing to Java, it is a brilliant way to learn to look at the ways to make raw data understandable, and is inherently graphical.

    Dave

  254. Shoes... by Anonymous Coward · · Score: 0

    Shoes (a Ruby environment) is a great concept. If only the great why hadn't left it behind in its current messy state. Here's a short article about Shoes and two more programming environments for kids.

    Captcha: kinder

  255. You're best bet by scire9 · · Score: 0

    Just may be finding a way to get him interested in programming. Find something the kid likes and (if applicable) relate it to programming. If the kid's personality has developed enough to where you can tell if he's an Introvert or Extravert it may make it easier on you. Introverted personality types (such as INTJ or INTP) tend to have the interest in subjects like programming which may drive them to excel at it.

  256. BASIC by Anonymous Coward · · Score: 0

    Basic is quick and easy, and its Turing complete. Some might now start to say ...but it can't... and I reply: AND ITS TURING COMPLETE! Easy to learn, quick enough to code, immediate feedback, gets you up and running fast. Even if you haven't coded in a while, you can prototype in a language like BASIC debug fast, and then recode in a lower level language like C. You keep learning during the transition. Toss in libraries and modules and suddenly you have apps that you can publish. KEWEL!

  257. Javascript is an idea, but... by Jiro · · Score: 1

    I'll have to go with Javascript. Along with some HTML, which isn't a language, but works with Javascript and introduces the concept of having computers follow instructions. Of course I'm by no means the first person to suggest it, but it does have some attractions for a beginner:

    -- language is actually used nowadays (you'd think this is an easy criterion, but people suggesting Logo or ancient home computers because that's what they programmed on 20 years ago fail at this one)
    -- no compiling needed
    -- you already have something that runs it
    -- results immediately obvious, does things that are immediately useful, even to a 12 year old
    -- existing body of programs all over the place that you can examine for yourself (just look in a bunch of web pages and you'll eventually find something)

    I would watch out, however, for trying to push programming in any language on someone who it isn't right for. Not all people can, want to, or need to, program, and I see an undercurrent of "of course he's going to program" in the original article. You can't push your little brother into programming unless he wants to.

  258. make it easier with a good IDE by Anonymous Coward · · Score: 0

    Whatever you do, please don't start the poor kid using a text editor. That is just a plain stupid way to turn someone off from programming. Real story - I took COBOL programming language course at our community college in my senior year of high school. I loved the portion of making logical flow. But the environment so turned me off I stayed away from the next 21 years.

    The stupid instructor could tell that I had potential. But in his stupid way of showing superiority he insisted that I spend the semester writing code with an editor that made edlin look user friendly.

    The point is to use an environment that relieves as much of the syntax burden as possible. If the IDE lets him know that something is right (or wrong) that is a good thing. And if it supports syntax completion that is a good thing. If this sounds like big bucks, then download Visual Studio Express with either C# or visual basic. Let the new person focus on making something that does stuff before introducing the brass knuckles, I can suffer through this crap that many programmers love.

  259. Start him off with Python. by iammisc · · Score: 1

    Having first started programming in the second grade (completely self-taught), I remember first starting off with BASIC. However, since that's not really around anymore and there's no real equivalent, I'd recommend python simply because it doesn't require you to initialize variables, the indented syntax is extremely intuitive, and most of the operation are easily understandable. Start him off with simple console apps, like an adventure game, and then move into trying to imitate other apps, at which point he will almost definitely want to start pursuing more low-level languages like C. For me, I went from BASIC directly to C and then from C to python. The transition from BASIC to C was really difficult due to the many differences but it goes to show you that no matter what you start off on, you'll do fine.

  260. rogueseven by Anonymous Coward · · Score: 0

    Try the Boe-bot from Parallax with the pBASIC language ($150). And the rugrat will see the code actually doo stuff, blinky lights, bump into walls with touch sensors, avoid objects with IR and cool stuff like that. Or try the LEGO NXT ($250), very cool also. The NXT G programming language is fairly easy learn and fun to work with. Great for you and the little tike and it LEGO's so he/she can rebuild into another configuration. No blinky lights but you do have sound, sonar, touch and light sensors.

  261. Basic Stamp board of Education or BoeBot kit by ThePawArmy · · Score: 1

    Look at one of the Parallax.com basic stamp board of education kits or a BoeBot kit. The manuals that come with the kits are really well written and teach not only introduction to programming but also a bit of electronics. It's one thing to teach a kid how to write a program to move a dot on the screen but watch what happens when you teach them how to write a program to move a robot around.

  262. Learned to program when I was 7-9 years ago myself by DaphneDiane · · Score: 1

    I got introduced to computers december '79 on the old commodore pets. Since most stuff was in basic back then I started messing around with existing programs, and quickly learned how do stuff like edit the number of lives in the pac-man and asteroid clones we had for the machine. I messed with other programs and typed in programs from the computer magazines of the day, and eventually wrote my first complete program at 9 (an learning tic-tac-toe program), which I ended up showing off at a computer show. Found out about copyrights at the same fair when I got in trouble for printing out the source-code for someones robotron-style game because I wanted to see how it worked. After basic I learned 6502/Z80 and Pascal (nothing quite like going from 3rd grade to a college class studying pascal on teletypes and old dec terminals), and eventually played with Logo, C, Fortran, C++, Occam etc.. through out the rest of my primary school years.

    Anyways my suggestion is start with existing open source programs (games or amusement type software would be great) and let your brother mess around with them for a bit. As much as C / C++ are powerful and useful an interpretative language were the results of any changes made can be seen quickly is good. Old school emulators with some basic programs, or stuff written in javascript may be good starts, or better yet if they play games that support scripted addons let them play with some of those. For example addons for World of Warcraft are written in LUA.

    Getting used to programming is more important than which language, once one language is learned jumping to a new language is only a little more work, especially for similar languages. The biggest differences when switching languages are language type (procedural, object oriented, or data-flow), type strictness (loose/strict typing), memory management (garbage collected, manual or mixed), structure (structured or spagetti), parsing (compiled, or interpretive). While it's better to learn stuff like memory management, structural and object oriented programming early, it can still be learned after getting a feel for programming. At least that was true for me, my earliest programs were horrible spagetti with mixtures of basic and assembly.

    I'd wait on stuff like design patterns and other meta concepts of programming, they make a lot more sense after someone has learned to program and wants to hone their craft.

  263. What is he interested in? by Anonymous Coward · · Score: 0

    My first languages were LOGO, BASIC (Atari, C-64, GW-BASIC), and I moved on to C and many others.

    What's important is exposure to /ideas/ about computing. I would first, of course, see if he's even interested at all. Then, try several different languages and see what he likes.

    There are systems designed specifically for teaching, such as LOGO, Alice, and others. You can get "modern" LOGO systems. Try an ALGOL-based language, like Pascal.
    Try an Object-Oriented language, like Simula or Smalltalk. Try ... you get the idea. :)

    My point is, essentially, that he won't be programming for a living for a long while, if ever. It's much more important to understand what can be done with computers, and how,
    then to worry about any particular language. If he's destined to be a geek/nerd/whatever, he'll do a lot on his own. Commercially "hot" languages change with great frequency,
    so don't worry about that too much.

  264. Smallbasic project from MS by dagarath · · Score: 1

    Work through the included PDF document examples, it basically does what the old qbasic provided, a quick IDE / interpreter and easy access to some text functions ( for the classic 'Hello World' and then easy access to some graphical drawing functions, even includes a turtle).

    http://msdn.microsoft.com/en-us/devlabs/cc950524.aspx

  265. Re:First place to start isn't even near a computer by Anonymous Coward · · Score: 0

    Teaching someone program, and teaching someone to program well (logically-organized code, readable code, maintainable code, etc.) are two different things.

    How many write-once, correctly-modify-never Excel macros exist in the world?

    I don't believe kid-failure at Legos, etc., means they won't be able to program; not all kids are that coordinated, or that interested in physical media (I liked Tinkertoys and Legos, but I wasn't bug-nuts about them; they were simply toys).

    I'd recommend starting with LOGO, then going to Pascal, then something SmallTalk-like.

    The point is to teach the concepts, combined with reaonably fun feedback, and not overload the kid with needless detail. This way, the kid can extrapolate and also ignore things as needed.

    Noobies can drown in GW-BASIC, Perl, and Java. If you wanna kill his brain, get him started on MFC and ATL.

  266. Alice by akayani · · Score: 1

    http://www.alice.org/

    That's commonly used as a starting point. It's Java, but not as we know it.

  267. Anonymous Coward. by Anonymous Coward · · Score: 0

    As a teacher, I found simple problem solving steps should be taught first before moving to powerful languages. the concept of sequence, selection and loop and applying that knowledge to several of his home work should be taught.BASIC is the simplest way to start those problem solving steps. As a bonus he can move to VB(even if we may not like) which uses BASIC under the hood. If he survives, moving to C will be easy in six steps to take care of the sequence, selection and loop. If he continues show interest he can take whatever language classes are given at his school. Adults way of learning programming is different from those of children. Their decision making ability from the frontal lobe does not mature quickly to teach them all details about programming. Very carefully if you teach a child rest will be easy. Don't think what language use now. Languages change based on applications.

  268. Anonymous Coward by Anonymous Coward · · Score: 0

    Why not try Scratch? You can get it at
    http://scratch.mit.edu/
    It's promoted by the ACM

  269. Java by SplashMyBandit · · Score: 1

    Java is actually fairly simple to start with. Certainly a lot simpler than C/C++ to start with. As long as you don't make it do JEE then he'll be fine, and he can even do some basic graphics which gives instant gratification. Once of the nice free IDEs (NetBeans ot BlueJ, NOT Eclipse for a beginner) can help to build something that will run (with a little bit of your help). And there are plenty of jobs if he continues Java. Many universities and polytechnics/technical schools start beginners with Java and with good reason. It scales from small simple problems up to big ones and you don't have to worry too much about string/memory management to begin with.

  270. When I was a teen... by sesshomaru · · Score: 1

    When I was a teen I was mainly interested in Adventure Game Toolkit and before that, Player-Missile Graphics. Of course, that brings up a point, how do you get a child interested in programming? In my case, I had my own computer (well, I mostly shared it with my Dad, which occasionally led to arguing) and a supply of cool computer hobbyist magazines. So, if I were going to get a kid interested in programming, the first think I'd do is get him a cheap, linux netbook and the next thing would be a magazine subscription. Hmm, but what magazine? Well, before it got axed, I like Maximum Linux, but there seem to still be a few good Linux magazines around. Oh, someone is probably thinking, at this point, why Linux? Why not Windows? Mainly because Linux is an OS aimed at programmers and Windows is aimed at non-programmers. There are a lot of free tools for both, ymmv.

    --
    "MIT betrayed all of its basic principles."
  271. Klik and Play by Lunatrik · · Score: 1

    I hope whoever is writing this sees it, but when I was growing up my parents turned me on to an oolldd program called "Klik and Play", designed for exactly this.
    http://www.stevenchan.us/programming/klik

    1. Re:Klik and Play by Lunatrik · · Score: 1

      Hate to reply to my own post, but I found a great wiki entry on this - apparently the company made a few other products as well
      http://en.wikipedia.org/wiki/Klik_%26_Play

  272. I recommend whatever your Brother is interested in by sourICE · · Score: 1

    I am a self-taught programmer and I have been programming for over 12 years. I started my interest in programming when I was 12, but wouldn't consider myself into programming until I was 14.

    When I was 12, I got a C++ programming book and went through it fairly quickly. My interest was in developing video games like Doom, Quake, etc. At the time I was young and lacked the knowledge or dedication to look into this any further and became attached to HTML/JavaScript, PHP and AS2/3 as a web developer and 2d/3d animator/modeler/artist.

    Slightly off-topic bg info: I actually went to school for Media Arts and Animation(Where I flunked out with 1 class to graduate due to financial issues and turned to programming permanently) and while I did take a couple minor programming courses based on AS2, I found that I already knew more than the teachers at my school on the subject from reading through the docs when I was 15-18 and ended up serving as a tutor in the classes(as I did in virtually all classes with nearly straight A's and still unable to graduate from final class, almost laughable if it hadn't cost so much) even though I would now consider my knowledge of AS2 at the time to be infantile. I should have expected as much since the school was dedicated to art students, many of whom could barely work a computer.

    Back to the subject: I think the best way to get a new person into programming would be to teach them the fundamentals of object oriented programming first and make sure that it is taught around something they are interested in. For example, if the noobie is interested in games I would suggest teaching them to program in UnrealScript - Unreal Engine 3 - UDK or XNA Game Studio 3.1. If he is into 2d graphics and animation try AS3 or Silverlight(I do not really have experience with Silverlight past a few documentation glimpses and tutorials). If he just likes dealing with data try PHP/MySQL.

    The important thing here is to make sure that he grasps the techniques needed to produce reliable, extend-able, clean and well documented object-oriented code. If he's really interested in programming he's probably already good with math and will pick up on the algebraic and geometrical side of things easily in school math classes and be able to relate them to the object-oriented ideas you have already instilled in him allowing him to be able to generate code producing quick visual results with any of the previously suggested packages. All of the languages I have suggested are extremely well documented.

    I hope I have been helpful.

  273. Java + Science by Anonymous Coward · · Score: 0

    Try out http://www.funsciencewithyourcomputer.org
    It's for teenagers. The programs are useful and original, with step by step instructions to modify them. It uses Java and Eclipse.

  274. Ease into it in a fun and graphical way by Anonymous Coward · · Score: 0

    Scratch. http://scratch.mit.edu/

  275. JAVA by dezekiel · · Score: 1

    The colleges around my area want you to know Java, Java, and more Java. So my vote would be JAVA!

  276. Scratch, Alice (and variants), Stratch NG, Unity3d by cazwax · · Score: 1

    I've found Scratch to be very accessible for kids starting around 7. http://scratch.mit.edu/

    The visual programming language was used by Lego for the Mindstorm platform, as well as others. I believe there is an Arduino front end too.

    Scratch TNG is a 3d version of Scratch tilted to simulation.

    Alice, Storytelling alice, and Alice 3 are all nice. Alice3 has an onion-skinning mode where the visual programming language can be peeled down to the underlaying Java code in a series of discrete abstraction steps.

    Unity3d, recently made free, would be another step along. A non programmer can get somethings to happen pretty easily. Underneath you are scripting in a javascript variant, python, or C.

  277. here's my take by buddyglass · · Score: 1

    First off, my background is pretty similar to the progression you mention: BASIC, Pascal, then C/C++ and Java. Here, then, are my general suggestions:

    • Limit yourself to languages that are widely used to do "real work", whether in the marketplace or in a scientific setting. That's not to say these the best options from a teaching standpoint, but they give the added bonus of the kid learning something practical in addition to fundamental concepts. This would exclude languages like BASIC, Pascal, Scala, Ruby, Lisp/Scheme, Miranda, Haskell, etc.
    • Exclude languages that, while still widely used, are largely employed only for legacy work. This would exclude VB, COBOL, perl, Ada, etc.
    • Pick a language that lets you teach the object-oriented paradigm.

    Based on these, I'd go with Java or C# to start. Maybe C++, but Java would be easier to learn. If you do go with Java, I'd strongly suggest he follow it up with plain-old C, just to get a feel for what life's like when you have to do your own memory management, don't have objects, don't have built-in synchronization primitives, don't have strong typing or type safety, etc. etc.

  278. from my own expierence by kdemetter · · Score: 1

    Well , i started with QBasic when i must have been about 10-11 years old.
    Which was a pain at the time , because you could program , but not build your programs ( the compiler i had didn't have the option to create exe's . later ones did ) .

    Then i moved on to Visual Basic 4 , than Visual Basic 6 , and eventually Visual Basic.NET ( much later )
    I think i most have been 14-15 years old when i started playing around with C++ . I also looked into Java but only really started programming in it when i was studying informatics .

    In hindsight , it would have been better had i started with C++ and then moved on the Java. The Basic language seems so useless to me now . Then again it was easy to create some fun graphical effects with it ( putting dots and lines in various colors on the screen , etc ... ) . But you can probably do that in C++ was well .

    So i would go for C++ , though i remember the syntax ( the for in particular ) being frightfull at first . It's good for learning the basics though.
    Then move onto Java or C# later.

  279. Or by amazingxkcd · · Score: 0

    You just screw all this software languages and do some hardcore hdls and play with fpgas all day

  280. Start from Physical Stuff by Anonymous Coward · · Score: 0

    PICkit2 Debug Express comes with everything(IDE,Writer,Board with headers) for just $50. It lets you learn every basics you need. I think that topmost-layer things, like python with GUI, is too much complicated to master for a boy in 12.

  281. C++ good base and easy to learn for the youngsters by cdmoly · · Score: 1

    My son taught himself C++ at the age of 12. He still uses it now (He's 15) and it has helped him with game coding which is what he really likes to do. there are some books available to for youngsters to start with simple tasks. Try an amazon.com search for coding or software development for kids. Hope that helps.

  282. Its the economy stupid... by flyingfsck · · Score: 1

    Maybe, if you want him to be a programmer, you should first teach him how to say: "Ya want fries wizzat?"

    --
    Excuse me, but please get off my Pennisetum Clandestinum, eh!
  283. Don't forget the lessons! by my2iu · · Score: 1

    There are lots of great languages for starter programmers, but a lot of these languages don't have extensive lessons available for beginner programmers. If you're providing guidance or if the student is highly motivated, it's not a problem, but sometimes it's useful to have some lessons and exercises available. I created a website called Programming Basics that provides some basic but thorough tutorials for teaching JavaScript to beginner programmers.

  284. Symbols and Pointers and Bears - Oh My! by bessie · · Score: 1

    Yeah - I taught myself Basic. Then I was told that C was the language to learn next. But the symbols scared me (I was 13 or 14), so I took the next recommendation, which was to learn Pascal.

    Learning C was very exciting for me, as it seemed all arcane and mysterious. You're right that the symbols were difficult to understand, but pointers were worse. I'd ask one of the programmers at the university I hung out at (to use their PDP-11/70s and Vaxen) what a pointer WAS. Their answer was invariably something like "It's something that POINTS to something else" or "It's a variable that holds a value that points to something else."

    It would have been nice if they could have said something like "You know how a variable can hold, say, an integer or a character value? Well, that variable is stored in memory. All bytes (don't confuse a kid with the concept of word-size please :-) ) have an 'address'. *draws typical picture of a memory layout* So any variable you create has an address. What if you want to know the address of that variable? In C, you can say '&variableName'; the value that you get from that is the address of the variable. If you store that value in ANOTHER variable, THAT variable is a POINTER to the 1st variable."

    THAT, I would have understood, but nobody seemed to want to take the time to explain it to me.

  285. small basic by nerdyalien · · Score: 0

    I started off with GW-Basic.

    I know we slash-dotters to some extent dislike M$. But they have something just to address this issue. They call it the "Small Basic"

    http://msdn.microsoft.com/en-us/devlabs/cc950524.aspx

    Syntaxes are pretty similar to C# style. Overall, not bad. Good documentation too. I managed to get my little sister hands on with programming using Small Basic.

  286. Traditional BASIC by Casandro · · Score: 1

    I would recommend a traditional BASIC Interpreter with line numbers, then later Pascal. If you want to go further, Assembler and then maybe C.

    It's no use trying to teach someone C without him having a firm grasp of Assembler. And Assembler is best beeing taught via traditional BASIC.

    Asside from C, the worst popular language to start would probably be PHP, because you already need to know what you are doing, when writing in PHP.

    As for Operating Systems, I would definitely go for Linux as it makes things like networking a _lot_ easier to learn.

  287. Arthur by Anonymous Coward · · Score: 0

    You might want to check out this:
    http://en.wikipedia.org/wiki/Hackety_Hack

    It is a Ruby environment aimed at the beginners, specially teens, with tutorials and such.

  288. Forbid him from programming! by fredrickleo · · Score: 1

    If you want your brother to learn programming, tell your parents to forbid him from doing so. That ought to do the trick ^^

    --
    Yay me! ^^
  289. C remains the best by far by BugHappy · · Score: 1

    30 years ago, I learned to program at 11 (in asm).

    When I discovered C it was a revelation: everything I could do in asm (with the help of 1% of inline asm in C code) -without the pain for the rest of the program.

    No other language is as simple (32 keywords!) not as pure as C is, not as powerful.

    No wonder why ALL other programming languages are written in C...

    And, if a kid is willing to learn, why go for a bloated, slow and buggy language rather than a 40-year old established open-standard?

    1. Re:C remains the best by far by emilper · · Score: 1

      40-year old established open-standard

      ... then how about a lisp dialect :P ... he won't know enough to be annoyed by the parens.

  290. Some years ago... by Anonymous Coward · · Score: 0

    I learned to program before I was 12, but I was really interested in web development, so I started with Visual Basic (for ASP) and PHP. I'd say see what they're interested in, and teach to that!

  291. Lyesmith by Anonymous Coward · · Score: 0

    hmm, if he is 12 I think I would start with Actionscript 3. That is not a real programming language but the best tool to learn the basic principals of OO programming and in the same time it is fun for a 12 yer old. He can get visual results really fast. In a month he can start making games, there is a couple of extensive 3D library where he can understand the basics of 3D. There is also a sense of framwork and SDK-s. Use text editor and CLI so he understands the idea of toolchain. The syntax is ECMA which is C like enough so later most of the language syntaxes will be familliar. He can make desktop applications with AIR, learn about SQL databases, filesystems. And there is a clear path towards web development, java, javascript, databases etc

  292. Begin with CS fundamentals by Anonymous Coward · · Score: 0

    I'm not sure about a 12 year old - and it depends on how adept they are at mathematics - but I'm teaching my 16 year old bro.-in-law right now. We spend ~4 hours/week and have been doing so for the past several months. We started out by learning binary and how to count in binary, add, subtract, etc. Then boolean logic (logical and, or, not, nand, xor) using the proper CS terms and symbols. Then we moved on to studying computer architecture and hardware (how CPUs work - registers, program counter, etc., how memory works, how hard drives work, etc.). Then a simple introduction to assembly - load, store, add, jmp, etc. and how they're encoded into instructions the CPU uses. We wrote many programs in pure assembly. And then we moved into higher level ideas such as while loops and if-then branching constructs and then pointers. We then practiced hand-creating the assembly from the high-level while/if/switch statements. Having the assembly background made things a lot easier to understand. It was pretty easy to explain what a compiler is and how it works after that. Then we moved into discussing procedural programming (pointer arithmetic, scalar data types such as int, float, double, short, char, etc.) in C. Then object-oriented programming: inheritance, polymorphism, encapsulation, etc. And we're using Java for that. At this point we're just getting comfortable with OOP techniques and making meaningful programs. But we've discussed arrays, objects, linked lists, stacks, queues, hashtables, bubble sort, merge sort, linear search, and binary search.

    I've found that taking a CS approach really helps to understand the big picture and provides insight into why things are done the way they are.

  293. Re:Try what Alice has ! by Anonymous Coward · · Score: 0

    There is this language called Alice, I haven't tried it, but it got a captivating interface that would definitely catch the interest of kids and can really help to introduce him to proper object oriented programming and stuff in a nice interesting way... I read that they are using it in some universities to encourage female-students to take programming courses since they probably are not inclined towards programming...

  294. Processing.org by Anonymous Coward · · Score: 0

    Try the processing language at processing.org

    This is by far the easiest way to pick up basics. It uses java language as a base, but leans more towards visualisations, graphics, interactions and sound.
    You can write an arcade-style game in this using little more than imagination and simple code. The forum is active, books (with pictures) have been written to help along,
    it's open source, there are libraries for all the 'cool' stuff that's out there at the moment. It has a related project called mobile processing to write mobile apps,
    another related project for electronic hardware apps called arduino - all of these are used a lot in Sweden to teach high school and entry level programming.

  295. Don't just teach. Help build. by v(*_*)vvvv · · Score: 1

    You shouldn't look at programming strictly from a "writing code" perspective. No matter how fun or friendly a language is, if it doesn't do anything, it is not interesting. And you will not be able to persuade most people into finding code alone interesting. Maybe scheme code is "interesting."

    Instead, you need to focus on the results of the code. If the student is familiar with Windows, then teach them how to build windows apps. If they love their iPhone, then maybe how to write iPhone apps. If the kid loves blogging, then maybe how to build his own web site.

    Give them the tools to fulfill *their* imagination, not yours.

    And it is all about the tools. If there is anything a child has, it is time. Give them the tools to make their dreams come true, and they will work on it tirelessly on their own. That is how we learn the things we remember.

  296. programmers game by Anonymous Coward · · Score: 0

    If you decide in favor of Java, definitely try http://robocode.sourceforge.net/ - idea is that you have to program a tank. It will drive, shoot, scan for opponents etc.... There is even lighter API for junior programmers.
    This is very fun, even for adult programmers :)

  297. It's easy by Dr.Syshalt · · Score: 1

    Q: How to teach a 12-year-old to program?

    A: It's easy. Just tell them they shouldn't do it.

  298. Solve a problem by blake182 · · Score: 1

    Well, here's what I'd advise:

    Solve a problem.

    My background is that I got an Apple ][+ in 1979. I was 11. Today I'm a professional programmer, and I've worked in lots of different languages. The first things I remember doing "solved a problem":

    • I modified the PHONE LIST program to say DATE LIST. Like I pawed through the BASIC code and found where it printed it, and changed it to say DATE LIST. And I used it to try and impress a girl (I put her phone number in it). I'm not kidding about this.
    • I had a paper route. I used VisiCalc to figure out my margin from my paper route. Like I knew how much I paid for my papers, and I knew how much I charged, so I figured out what my margin was.

    But the point is that I didn't start with "I want to program", I started with "I'm gonna solve me a problem."

    And then I started keying in programs from the BASIC Computer Games and More BASIC Computer Games books. Which is actually how I learned BASIC, because the dialect of BASIC in the books wasn't the same as Applesoft BASIC, so I had to learn how to fix it.

    And I just spent a lot of time finding new programs and playing with them.

    I wasn't pressured by my dad to program a computer. It was just lying around. I responded to it. If you wanted to do anything cool, you better get to typing some BASIC. So I did.

    My daughter is 11 right now. She hangs out on the Neopets website. A large portion of participating in that community is doing stuff in HTML, Javascript and CSS. She makes pages in order to participate in the community, and she understands how the changes in CSS work. Some of her designs are pretty clever. She has taken HTML from other places and modified it to suit her needs. She's showing very programmer-like behaviors.

    In my day, I wouldn't consider a BASIC -> Pascal progression. That's if you're going to get a CS degree. Pascal wasn't a practical operating environment on the Apple ][. Professional programming in general was done in 6502 assembler, which I learned when I started making more advanced stuff that I wanted to use personally. In my teens, I started working at a software company part-time after school, and I had to maintain 6502 code, which is where I ultimately thrived.

    So anyway, solve a problem that your kid wants to solve, and let the problem dictate the tool. Much as with professional programming. Don't just hunt around looking for tools to learn at the outset. Make the learning evolve naturally from the problem.

  299. Anything with instant visible results by Anonymous Coward · · Score: 0

    Provided that he is actually interested in programming, basically any language with visible results will do, as long as it's not too simple or restrictive.

    Lego Robotics would be a good idea. Robots are fun. Although I as a kid hated the puzzle block style of scripting in Lego Mindstorms.
    Things like Pygame and gamemaker are also a good choice, maybe even flash if you have the bucks for it.
    Things like HTML are not really programming, but it does teach how a computer requires very specific instructions and coupled with javascript it is very easy to see results and it's easy to learn.

    Another interesting thing is Second Life. In there you can create objects out of primitive shapes and have them move, change appearance, follow their owner, talk, all kinds of things. I've seen some pretty amazing stuff there. It uses LSL which is an event based language and is a bit similar to javascript and quite easy to learn.

  300. Agreed 110% on Delphi... apk by Anonymous Coward · · Score: 0

    "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." - by sopssa (1498795) * on Sunday December 27, @02:48PM (#30564852)

    Agreed, 110%, on Borland Delphi (and, on ALL accounts noted in your quote above)... & you are COMPLETELY CORRECT on interest: If someone does NOT have it? They'll never be "driven" to excel @ it, or to get any good @ it.

    APK

    P.S.=> I have been programming personal computers since 1994 professionally (& midrange - mainframe units for years before that in the mid to late 1980's to the early 1990's professionally & academically as well), & fairly "fluently" in:

    1.) C
    2.) C++
    3.) VB.NET
    4.) ASP.NET
    5.) VB 3.0 - 6.0 (16/32-bit)
    6.) Pascal (Turbo, or Delphi)
    7.) JAVA
    8.) X86 Assembly (via MASM usually)
    9.) SQL (in DB oriented tools like Access or in the other RAD tools I use to talk to DB engines like ORACLE, DB/2, & SQLServer)
    10.) COBOL
    11.) Fortran
    12.) DOS Batch & WSH/Powershell scripting

    And, to this very day? I'll say the SAME THING as you did quoted above about Delphi, vs. the others!

    Especially since Delphi "piqued my interest" as far back as 1996-1997 (after I had programmed in 16-bit Delphi 1.0 on Win3.x) in 32-bit in the Sept.-Oct. 1997 issue of "Visual Basic Programmer's Journal" entitled "Inside the VB5 Compiler".

    There, that competing language's trade magazine had a competition between VB5 (with its new watered-down MSVC++ 5.x compiler engine), MSVC++ 6.x, & Borland Delphi 2.0? Well...

    That's where Delphi ABSOLUTELY "SWEPT THE FLOOR" with BOTH VB &/or MSVC++ in performance of the code generated, & by 2-3x or more in MATH & STRINGS WORK (which every program does, mind you), & won 4-7 tests (downplayed though this fact was, you could not hide it on the bar charts generated & the editors tended to downplay this only noting it in 1 line of a 5++ page article there no less).

    (Especially since its projects in Windows are pretty easily "ported instantly" to Linux also, via Kylix (Delphi for Linux), if you avoid diff.'s between Linux & Win32, such as drive letters vs. mounted devices + some of the diff.'s in socket programming between Linux &/or Win32)... apk

  301. Basus by sverrehu · · Score: 1

    I made Basus not long ago. Successfully tested on about 50 kids. Read about the idea behind the programming language here: http://basus.no/idea.html

    Get it here: http://basus.no/

  302. Try Game Maker by Anonymous Coward · · Score: 0

    It doesn't really start out as programming, with it's drag and drop 'actions', but teaches programming perfectly. What's more; it's fun, and you see directly what you're doing (creating epic games without too much hassle). Later on, he can use the programming language of Game Maker, GML, which is loosely based on C++.

  303. Re:NOT making the programming world a better place by jopet · · Score: 1

    Maybe you should inform and educate yourself before you puke. These languages are as easy to install as C or C++, and it is more easy to write programs that is portable to many systems. Languages like Scala and Ocaml have been used successfully in large-scale projects and by companies who value the increased productivity and easier maintenance. But most importantly, if people would finally stop using languages that are nothing more than a macro assembler language with a terrible syntax, it will get much easier to avoid endless pathetically simple security issues and memory leaks, it would reduce the lines of code and it would make code easier to understand and modify.

    The problem is people like you who cling to what they have learned and try to avoid the intellectual challenge of learning something that includes the development of the last 20 or so years in that area. With people who call themselves "programmers" because they can hack code in C, the amount of software that some day needs to get ported to some proper language just grows.

    People like you are like those who did not stop using, promoting and teaching COBOL a couple of years ago. Do the world a favor and find another job. I am sure you will find an oportunity to puke there too.

  304. Of course Pascal is still viable by Anonymous Coward · · Score: 0

    There is nothing wrong with Pascal. Get him Lazarus or a free Delphi (if you can find it anywhere which is unlikely). He can then start writing some simple UI stuff without getting too frustrated. And it allows him to get into the itty gritty low level (meaning Windows or Linux api) stuff as well. If he likes it and understands the concepts, he will find the programming language of his choice faster than you can say JavaScript.

  305. Scratch! by Anonymous Coward · · Score: 0

    I suggest looking into Scratch (http://scratch.mit.edu/). It's a fine graphical programming environment developed for precisely this purpose. Each control structure is given a graphical "shape" with "connectors" on each end to show how individual structure work as well as showing how each structure interacts with those around it. Give it a review!

  306. Autohotkey - The Good and Bad by Mr+Pleco · · Score: 1

    I always always tell people who want programming experience to pick a language that they can do something with.

    I'm assuming these things based on that he's 12 and interested in programming:
    1) He's interested in computers so probably spends a lot of time on them
    2) If he's spending a lot of time on them then he's likely got a favorite game or two
    3) If he spends any significant time playing these games then he's likely interested in making tools/macros for these games

    AHK (autohotkey) is probably one of the easiest game macro languages out there and that's beside the fact that you can use it for other stuff. My favorite feature is that it's loosely typed, so it's much easier to master initially, though debugging can be a pain because of this. The forums are very useful with a very dedicated community and the API is EXCELLENT, but there's no tutorials that I know of extensively devoted to learning to program using AHK. The most important thing I think you can note about this is that it can help him teach himself how to program, which is very important if he wants to move into other languages later. If memory serves it's also coded and extendable in C, so there's a natural extension into "real world" languages there.

    So there's good things and bad things about using AHK, but it's the one I pick for people looking to learn the basics of programming.

  307. LISP by keean · · Score: 1

    I think a simple LISP interpreter would be a great way to get started in programming. You can move on from basic maths (1 + 2) pretty easily to LISP. LUSH looks good http://lush.sourceforge.net/screenshots.html as it provides a complete environment including graphics and combines LISP with inline C, in a similar way to the way BBC Basic has inline assembler.

  308. 2 cents by Anonymous Coward · · Score: 0

    BASH/Command Prompt -> LOGO -> HTML -> BASIC -> Pascal(Delphi) -> Assembler -> C -> Java

  309. Basic-256 for kids by Leafwiz · · Score: 1

    I have been teaching some youngsters programming with Basic-256 for kids they really liked it. Because it has a very easy syntax, and it has an inboard drawing pane. So the kids could draw stuff like a circle and get it moving.

    From the Reference

    Format circle x,y,r
    Example
    color red
    circle 100,100,50
    // Will draw a red circle of a radius of 50 with it's center at (100,100).

    For kids this is a ZOMG!!! "Look dad! I made this!!!" *shows a circle that is moving*

  310. colobot by Anonymous Coward · · Score: 0

    find a game called colobot, it's fun and it teaches a c "style" language.

  311. www.alice.org by Anonymous Coward · · Score: 0

    Hi,

    I'm not sure if this environment is more suitable for girls than boys. I believe Alice was specifically designed to get girls interested in programming. Having said that the fact that you can drag and drop objects into your environment and then animate them with C/C++/Java like syntax is interesting. The last time I looked at Alice http://www.alice.org they were taking about a deal with EA Games to allow the Sims animation engine to work with Alice which would be really cool.

    On the regular language front I learned to program in Basic via punch cards in the early 70's when I was 12 so absolutely no harm in trying Basic. Another good alternative is Logo. Or for physical feedback of what you are programming there is nothing better than Lego Mindstorms.

    Good luck.

    Fergal Dearle
    http://www.dearle.com
    I'm not an anonymous coward. I just did not bother loging in before commenting :-)

  312. Colobot by ouin · · Score: 1

    Have a look at Colobot or other games from Epsitec: http://www.ceebot.com/

    The purpose of Colobot is to program bots to help an astronaut to colonize a new planet, starting by the Moon.

    The language is very similar to C++ and you can design your own levels.

  313. re by Anonymous Coward · · Score: 0

    I started programming Visual Basic (acctually vba) and html when I was 10.

  314. something interesting to program, e.g gaming by peter303 · · Score: 1

    Most coding is rather dull to non-prgogrammers. Perhaps something motivational would be scripting or add-ons to a game engine to add your content.

    1. Re:something interesting to program, e.g gaming by cptnapalm · · Score: 1

      This is a good idea. I think a LOT of people got their start in programming with QuakeC.

  315. my "first" was a graphics program in 1970 by peter303 · · Score: 1

    That was an interesting feat considering vector graphics wasnt invented until the mid 1970s and raster graphics closer to 1980.
    We had teletypes made available in our school connected to some local college. Basically it was just a BASIC interpreter. Aroudn that time Conway posted his infamous "game of life" column in Scientific American - one of several times he paralyzed the world's computers with trivial (Mandelbrot too). Life was both graphical. Also it leads to deeper levels of sophisticated data representation shoul you want to get any speed on the kilo-flop machines of that era.

  316. Look synecdoche up by Nicolas+MONNET · · Score: 1

    Yes Mr Pedantic, I meant the "implementations of the JavaScript language are faster than any other implementation of other scripting languages." It's called a synecdoche.

    v8, Tracemonkey and Safari's JS engine run circle around Python, Perl and, needless to say, Ruby.

  317. Perl by motorhead · · Score: 0

    Read the camel book and have some fun.

    --
    Employee Of the Month - Cyberdyne Systems Corporation - September 1997
  318. a word about pascal... by eexaa · · Score: 1

    One of the above post clearly says it: all you want to do in 12 is to see a nice 2D animated stuff.

    As I've found, we don't have many "real" languages that make the simply-looking black drawboard easily accessible. In my 12, it was Borland Pascal with ega/vga BGI driver. I wrote stuff, pressed F9, wow it worked.

    Today I'm seeing only various (unusuable) python libraries and several bad Logo implementations. C libs don't count, because kids can't compile them correctly (the magic F9 keypress ruled.)

    So there I'm asking: is there some "use graph;" substitute for today Pascals (most suitably for FPC compiler, and probably running on redmondOS too?) or at least some nice IDE with run-the-magic button? I don't even care whether it's pascal or not, that one has just proven itself.

    Sadly, I didn't found any.

  319. First... by ivandal · · Score: 0

    You'll have to start from scratch. Find an isolated basement or a garage...

  320. A few ideas by chrysrobyn · · Score: 1

    You don't teach a kid programming. They learn it.

    If the kid is interested in (his|her) own computer, then some Cocoa or Visual Basic will get the GUI baubles up pretty quickly. Pressing buttons and causing things to happen is possibly what's going to light the fire.

    If the kid is fascinated with the outside world, I agree with ebbe11. Mindstorms is the way to interact with the outside world.

    If the kid is interested in Facebook and Myspace and other web trappings, Greasemonkey is the way to go. Try to get a copy of the MWAP (Mafia Wars Autoplayer) as an indication of what you can do if you're interested. Greasemonkey can help script all manner of things with web pages, and the foundations of variables and function calls are all there, and easily portable to other languages.

  321. my 2 cents (maybe 5 cents) worth... by lavaticus · · Score: 1
    Much like everyone else here I'd suggest seeing if your brother is interested
    I had my brother ask me where to start recently because he was interested in making his own games and already was fluent in 2d and 3d animation.

    For him flash programming was a no-brainer as he'd already experimented and I so I found a good book that went over the basics that I knew he could build on.

    I would suggest one of the following as a good starter:
    • Flash (instant gratification and lots of tutorials)
    • Ada (learnt this one at university, fantastic starter as it's very strict but limited application outside of education)
    • Java (good language with lots of applications but can be tricky for a starter and I feel can lead to sloppy programming)
    • C#.net or VB.net both of which are great as they are strict and have loads of applications once learnt.

    Also html+javascript+css isn't going to teach programming unless they want to be a webhead.

    python I haven't touched but by the sounds of everyone on here it would be another good starting point. I'd only say look around for online tutorials and see what's out there before starting.

    get him to learn the basics - we all have been there and then start getting into the more fun projects like simple games and build on the skills he learns as you go.

    Programming is hard but it can be very rewarding to see something you built working efficiently... and then making it work better!

  322. AHA --- Forward to the Past by Anonymous Coward · · Score: 0

    COBOL!! Great future for invividuals to fall back on when all the glitzy jobs dry up (completely) at Wall Street. Ka-zillions of lines of code to maintain, always have a job from the world's biggest, best, deepest-lined pockets. So obvious that I'm surprised everyone else missed this easy to learn, and high-paying, route!

  323. Python+pygame by Anonymous Coward · · Score: 0

    The instant gratification part is the really important bit if you want to keep his interest up.

    That is part of the problem with children today. They want instant gratification and are unwilling to put forth the effort and time necessary to learn proper practices. If BASIC was good enough for me, it sure as Hell is good enough for the children of today. Most of the IT people I have worked with during the last decade cannot programme something as trivial as "Hello, World!" in any language.

  324. I'm using K&R by Anonymous Coward · · Score: 0

    With the right book a competent person can learn the fundamentals of programming in the C language. After programming in Commodore BASIC and 6502 Assembly Language, using pokes and peeks initially, I moved on a teach myself FORTRAN and C. The "C Programming Guide, 2nd Edition" written by Jack J. Purdum still has a place on my bookshelf after more than 20 years.

  325. Processing anyone? by Anonymous Coward · · Score: 0

    Nice and easy to get some moving things onscreen, free, skills easily applied to other C-like languages later.

  326. plenty of options out there by Anonymous Coward · · Score: 0

    Scratch 2D http://scratch.mit.edu/ & Alice 3D http://www.alice.org/
    Pleos - http://www.pleoworld.com/Home.aspx
    http://csunplugged.org - teach without a computer, such as counting binary on your fingers

  327. Python + Head First Programming by Anonymous Coward · · Score: 0

    I'd recommend Python. It has the features of most languages and it's a good introduction to general programming concepts. Best to start with a book. Head First Programming has just come out and I believe that uses Python as the teachine language.

  328. Other Suggestions by AP31R0N · · Score: 1

    If you want your kid to be happy and generally successful in general have him learn:

    1) An instrument - Guitar or maybe piano. Something that will get him laid, something cool. Singing counts.

    2) A foreign language - Anything but Mexican.

    3) A martial art - ideally a -itsu, rather than a -do. Itsus are combat systems, dos are sports. Do will do in a pinch, but an itsu is more about taking the fight out of someone than scoring honorable points.

    4) Financial management - Start with Monopoly. Teach him accounting, how to calculate interest and all that crap. Have him run a tiny kid business. There's a kid's version of the Cashflow game.

    5) Dance - Let your son be the one straight guy who can dance.

    6) Cooking - A great chance to show class.

    7) Etiquette - Not which fork goes where, but not to offer his hand to a lady.

    8) Flirting - This is a skill that can be learned. Also, teach him that girls come and go, that a kiss isn't a life long binding contract.

    9) Fitness - A sport will suffice but the more important lesson is to stay fit. Start the habit early.

    10) Leadership - Not sure how to teach this... but learning how to be a leader is a great asset for all aspects of life. Dudes will respect him, chicks will want him.

    --
    Utilizing the synergization of benchmark e-solutions to pre-workaround action items!
  329. LEGO by HikingStick · · Score: 1

    Get him hooked on Lego robotics sets. Logo (if they are still using it) is not that hard to master), and it can be a doorway to broader programming interests.

    Helping him start his own web page with some JavaScript or other dynamic items could be another way.

    --
    I use irony whenever I can, but my shirts are still wrinkled...
  330. Let me guess.... by Capt+James+McCarthy · · Score: 1

    The housing and banking failures where put on to faulty software because it did not stop the idiot carbon-based units from committing acts of stupidity.

    So there are programmer(s) unable to predict future unforeseen events in his/her/their code and it's considered a failure. You can never predict the actions of idiots.

    --
    There are no loopholes. It's either legal or it's not.
  331. Programming How-To Rollup by r0wan · · Score: 1

    get him to learn the basics - we all have been there and then start getting into the more fun projects like simple games and build on the skills he learns as you go. Programming is hard but it can be very rewarding to see something you built working efficiently... and then making it work better!

    To piggyback on this...and roll up a few aforementioned key steps:
    1) See if he's got an interest first
    1a) See if there's a program he wants that's not available for x platform.
    2) Start with what he's interested in
    3) Start with something easy in what he's interested in.

    I started out with BASIC on an ATARI when I was about six(?)...then dropped programming until about two or three months ago when I got frustrated with the lack of Blackberry apps and decided to write my own instead of waiting for someone to do it for me. I didn't know object-oriented programming, much less Java or JavaME, to save my life (and most would say I probably still don't) but I hit up the Java tutorials and RIM API documentation. It was hard work, and I froze my own Blackberry a number of times, but three/four months later I have a working Blackberry app that wasn't out there before. I can confirm what the quoted poster said...it is very rewarding to see something you wrote work...and use it.

    --
    If you're not outraged, you're not paying attention.
  332. perl by dalesyk · · Score: 1

    perl would be a good starter language because it's syntax is fairly simple and it has similarities to C.

  333. Any of the Visual Series by g0bshiTe · · Score: 1

    Why not just go the MS route. Yeah I know it's M$ but you have to admit with the Developer edition tools the learning curve is non existent. Visual C++ would be a good start, he could almost instantly begin to code, and the projects he could make would be easily distributable.
    I only say this because you never mentioned specific OS platform.

    --
    I am Bennett Haselton! I am Bennett Haselton!
  334. Ruby by Anonymous Coward · · Score: 0

    I think you should see if any ideas peak his curiousity and then think of the easiest way to write that code...

    The earliest programs I wrote were just simple things on my graphing calculator b/c I had it with me all the time, could give them to friends, etc.

    I also think ruby isn't a bad first step since you can do O-O or scripting, and it is not very cryptic! They also have a nice little web based gui to introduce you to ruby.

    Eventually you could either switch to C or embed some C code in the ruby, to show how to get to a lower level of abstraction

  335. lead him down a path towards C/C++ by Smallpond · · Score: 1

    Really? You hate your brother that much?

    Language choice doesn't matter. You can do simple things in any language. If it takes some magic to make it work, he won't care. The important thing will be to do something that's interesting. I would start off by developing a scene in POV-Ray. Then get into program flow using OpenGL and whatever language binding is handy.

  336. It's not the language by houbou · · Score: 1

    So many languages... myself, like you, started with Apple Basic/Integer Basic, then moved up to 6502 programming and now.. well.. let's just say I've probably most languages out there. If I was a parent today, I would want to kill 2 birds with one stone. Use programming to further his maths skills as well as new computing skills. If you have Microsoft Office, go that way and get him to do some VBA with Excel for his maths skills, that's especially good to get the graphs and pie charts and the algebra. That being said, ASP (not the .net) version is available as part of the personal web server that comes with XP, so, VB comes to play again, he can leverage that as a fun introduction to web page. Finally, get some Javascript to further his web programming skills and since JavaScript's core roots are in C/C++, eventually, you can jump to C/C++ to show him where all this high-level stuff comes from. Anyway, I'm sure there are a lot of opinions on this, but this is what I would do.

  337. Microsoft small basic by Anonymous Coward · · Score: 0

    This is a pretty neat tool for a new programmer:

    http://smallbasic.com/

  338. Java -- That'll Keep Him Out of the Biz by Baldrson · · Score: 1

    Probably the best thing you can do for the kid is to have him start with Java.

    That way he won't be tempted to become a programmer.

  339. QBasic is a good start by Stregano · · Score: 1

    I am amazed about how many others started with QBasic like myself. That is not a bad thing, I was just unaware and think it is cool.

    If the dude is interested, maybe start on QBasic. If your brother wants to just do cool looking stuff, maybe show him how to do flash or something of that nature.

    --
    The world is how you make it
  340. Definitely NOT python by coolgeek · · Score: 1

    No sense teaching him the weird indentation fetish that comes with it. Just too fucking bizarre.

    Personally, I went from BASIC to C in high school. It was about 28 years ago. And then had to learn Pascal when I took a course in community college. After I dropped out, I took my first job as a wiz kid, and had to learn PL/I and assembler.

    --

    cat /dev/null >sig
  341. Most 12 year olds aren't ready... by ResidentSourcerer · · Score: 1

    They don't think abstractly yet. There is a reason that Algebra isn't usually taught until grade 9.

    All the success stories I've heard with teaching programming to 'little people' have been using an interactive graphical language such as Logo. Initially you use it as a keyboard controlled etch-a-sketch. When you show that you can define a subroute 'Box' that draws a square, then a subroutine 'window' that draws a 4 pane mullioned window either the eyes light up, or you get a 'so what, I want to play hockey' look.

    Sure there are some kids who would dig programming right away at age 12 -- I suspect that a large fraction of /. readers are from that group. But most kids aren't.

    If you don't work with something like LOGO, wait a couple years. Mean while, show him examples, and give him stories where the hero is a programmer. (Short list that...)

    --
    Third Career: Tree Farmer Second Career: Computer Geek First Career: Teacher, Outdoor Instructor, Photographer.
    1. Re:Most 12 year olds aren't ready... by narcc · · Score: 1

      What on earth are you talking about? You may want to go back and review your Piaget.

      Trust me, kids can handle programming well before the formal operations period -- which, btw, starts at about 12 years. Check out some of the research carried out by Hatfield & Kieren for some early work and Papert for a more modern take.

      The Logo language in particular has been used in classrooms as early as kindergarten. The language's highly interactive nature makes it well suited for students of virtually any age. (Granted, I wouldn't call the logo exercises you'd have a 5-year-old perform programming.) It's worth noting here that evidence for advance planning (which increased over time) was observed in first graders writing simple logo programs.

      You know, there is just too much research on the subject to even try to mention here. I've said enough to give you a start. Go do some reading, you'll be glad that you did!

    2. Re:Most 12 year olds aren't ready... by ResidentSourcerer · · Score: 1

      And that's why I said LOGO. It's visual enough to engage. The ability to interpret commands then automate them makes a nice bridge to the concept of abstraction.

      My claim is that without a direct visual bridge is that programming is too abstract -- too much disconnect between what you write and when you get it -- for most 12 year olds.

      Yes LOGO should be introduced to young kids. I've read it, I've seen it used. It's wonderful. In many ways it works better with young kids than it does with middle school.

      Yes I took the same classes in getting my Ed degree that everyone else does. But after having dealt with junior high kids for twenty some years I would NOT want to teach them programming with a non-direct visual model.

      Piaget is held up as the model. But real kids have a lot more variability. There is huge variation in both the timing and the sequence of the Piaget stages. In addition education is so ridden with fads that the research is suspect. Way too many 'researchers' get the results that a in fashion. If they don't they have a hard time getting published.

      I found at one school I worked with that just getting the grade 10 kids to write a simple html page was pulling teeth. Sure, 50% of the kids could do it, but most of them didn't want to. The rest were incredibly frustrated by the need for matching tags, for proper syntax.

      Mind you -- this was a school for the guys that failed in the public system -- over 3/4 of these kids didn't want to be in school at all.

      Writing perl or C code to teach programming to a 12 year old?

      With the 12 year old's I've worked with, I think I'd prefer to try teaching my border collie.

      --
      Third Career: Tree Farmer Second Career: Computer Geek First Career: Teacher, Outdoor Instructor, Photographer.
  342. awk by Anonymous Coward · · Score: 0

    awk is pre-installed on unix boxen, has all the standard loops and operators , is easy to use.

  343. ActionScript by CobaltBlueDW · · Score: 1

    Python is a fair suggestion with something like pygame. It has the upside of teaching them a language they can use in future endeavors, AND will seem interesting to a youngster by peaking their interest with graphics and sound. How ever, there is some overhead to using pygame, and python's syntax isn't all that similar to other standard oop languages.

    I'd suggest starting with a language that can easily offer graphics/sound/etc. for sandbox play, AND uses a syntax simular to the ECMA java-like standard. I believe that will help with the transition to OOP C++.

    ActionScript is probably the most enticing language you could teach to a youngin' since it is tide to a graphical editor. If you start with AS2, you can skip all the complications and make a game by jamming a few small lines of code in strategic locations in a few minutes. You can then continue to concentrating on key rudimentary ideas while making playable games, or extending a game by expanding on previous example. You can slowly start bringing in proper structural elements that make make it more and more like AS3, until you basically ARE using AS3.

    As languages go, AS3 has a very nice structure, so it's a good environment to teach proper practices. and it is easy to start AND complete projects that would actually seem interesting to a younger audiences. As an interpreted language that also compiles, there's quite good error handling, both at compile time and during run-time. Troubleshooting can be a major deterrent to a learner's progression, so useful error messages for all errors is important. Also, having the ActionScript help bible embedded into the IDE is quite handy.

    Downsides:
    You need to buy the Flash Suite to get the proper experience out of it.
    ActionScript isn't a very applicable language in that, you can't use it anywhere other than in Flash applets.
    It doesn't have a very simple file IO system, which is often helpful in many teaching examples.

  344. Dreamweaver and Scratch by Anonymous Coward · · Score: 0

    If he is interested in programming, I would recommend getting a copy of Dreamweaver (you can get last years version for next to nothing on e-bay) and get him started learning HTML and CSS. Creating something that he can show off will be a great motivator.

    If he is NOT interested in programming, I would recommend starting with Scratch (scratch.mit.edu). It's an OOP that is designed to create games and simple apps, but you can add structured code to it to create more sophisticated apps. They have a public area where you can share apps that you have created. I started my son on it when he was 10 and he still uses it.

  345. Consider Ruby by Nerdposeur · · Score: 1

    Consider Ruby. 'The Well-Grounded Rubyist' is an excellent (new) book that I'm currently working my way through. Very good teaching of a fun language.

  346. Why "HTML is programming" mindset sticks by jonaskoelker · · Score: 1

    HTML hardly constitutes "programming" in any reasonable sense.

    I know that full well, but it always gets brought up in these kinds of discussions. We might as well stop and think about why.

    What are the similarities between writing HTML and programming? (Let's just assume there is _one_ HTML, and I'll get back to why that assumption is okay to make).

    • It has a formal grammar and syntax
    • You're telling the computer what to do (and it responds)
    • You're creating a "computer-something"*

    * (a bit string that makes computers do something more or less exclusive to computers; i.e. not an mp3 bit string or a jpg bit string, but a web page bit string** or an ELF bit string or a ...)

    ** (yes, it's really just text; it's really the internet/browser medium and its peculiarities that're interesting here)

    What's the main difference? HTML can't really compute anything. There are computations involved in rendering it, sure, but you can't say <add>2, 2</add> and expect $BROWSER to render 4. I think this is the part which people who say "HTML isn't programming" like to point at.

    Going back to the similarities: what do you learn by writing HTML? You learn that you can bend the machine to your will, if and only if you pronounce the right magic spell in the correct way. Some mispronounced spells just do the wrong thing (what does 'bgcolor="ff00fff"' render as?), while others make your magic lab explode (no body text gets rendered).

    These lessons are fundamental to programming (and, really, writing instructions in any formal grammar; Apache configuration files spring to mind, as does sendmail line noise).

    I think this is the first important reason why it always gets lumped in. The second is that it tends to attract the same kind of people: people who like creating "computer-somethings"; some of these will transition into doing real programming.

    How about writing BAT files (windows shell scripts, for those who might not know ^_^)? The DOS(-ish) shell is rather limited in what computations you can express. You get to manage control flow, but the only data you really get to manipulate is text. Is that programming? I think it may be fair to lump it in, but just barely (or I only learned a subset?)...

    When you hear "$PERSON wants to learn programming. What do I teach them?" and next hear "HTML", you might appreciate why that answer isn't (necessarily(!)) stupid or wrong: you do learn something that's useful for programming from doing not-programming.

  347. Try Scratch for something fun. by Anonymous Coward · · Score: 0

    http://scratch.mit.edu/

    Scratch is designed to help young people (ages 8 and up) develop 21st century learning skills. As they create and share Scratch projects, young people learn important mathematical and computational ideas, while also learning to think creatively, reason systematically, and work collaboratively.

  348. I think BASIC should be first, really. by AlphaBit · · Score: 1

    I strongly recommend old-school BASIC. It's a fairly straightforward imperative language that will introduce people to boolean logic, branching, and loops. It works really well as a simple platform for writing algorithmic code.

    Later on, the transition from writing GOTO based code to GOSUB based code will be a good introduction to functions. And before anyone says that GOSUB != f(), I want to point out that it's surprisingly similar to the way function calls are implemented in machine language.

    I think you should avoid strongly typed languages, there's no need to get tripped up about the differences between int and float until the student gets more serious. I also think you should avoid object oriented languages in the beginning also. No one would recommend learning VHDL before learning gate-based logic circuits, why are so many people advocating learning very high level languages before learning algorithms?

    If the student really takes to programming, they'll probably transition themselves off BASIC in a month or two and go pick up all those other techniques and concepts on their own.

  349. Only things I can recommend are: by dwiget001 · · Score: 1

    1. Teach the kid HTML first (Teach Yourself HTML in a Weekend book).
    2. Then, teach him JavaScript. A number of good basic books on it in stores and libraries, plus a lot of online resources. It gives some programming basics, but removes the overhead of a compiled language.
    3. From there, with a little bit of work on how a computer handles memory and executes programs, teach him C.

    Note: The above is route I taught myself to program in C (eventually) and then C++ and Java. HTML did not take long at all, and I found it useful later on for other things I wanted to do in or with web pages/sites. A gradient approach, yes even the gradient approach of typing in HTML in a formatted and easy-to-read way, pays off when you then have to write C or other code.

    Caution: After I learned HTML and JavaScript, I took a stab at Java, that was too much of a leap at the time, I got good enough in Java to create endless exception errors, yeah! However, I then moved to C and that was an easier transition. Once C was done, I then tackled C++ and eventually got back to Java. I tell you, having C under my belt when I went back to Java helped a lot, despite the differences in the language and how Java operates (virtual machine) compared to close-to-bare-metal C.

  350. SimpleJ by chochos · · Score: 1

    You should take a look at SimpleJ, which was made precisely for teaching kids how to program. It emulates a simple 80's style game console and has its own language, with a Java-like syntax (but it's not OOP). The IDE allows you to run code immediately, it has a very decent debugger which shows you graphic representations of data structures such as linked lists, as well as all local and global variables, etc.

    There's even an eBook, but it's in Spanish (SimpleJ is Made in Mexico). But it's free software and really cool, try it out.

  351. How to teach a 12-year old to program? by jarome · · Score: 1

    The real problem with teaching kids to program in to get a problem they want to solve.

    You should try Alice. At SC08, I saw a room of 8-14 year-old kids doing Alice, and you could not tear them away from the computer. The original Alice was designed for middle-school girls, but Alice 2 has all the Sims characters, so kids can create a virtual world. And even better, the new Alice spits out a NetBeans project and Java code, so you can make the jump to "real" programming.
    http://www.alice.org/

  352. Start with his interests, not yours by Kensor · · Score: 0

    Software development begins with the question "Is there a problem?", and proceeds given an affirmative answer. Does you brother want to learn to program? If yes, then "Why?" "To solve what problem?" "To satisfy what creative urge?" At age 12, he may not have answers that suggest C coding, thus providing you with a reason to show him your C programming skills. Perhaps you could show him how he can gain a greater degree of control over the program he uses most. This might be a game, or the text editor he uses. It may be that the most appropriate language with which to start is the one embedded in his application of choice, which might lead you down a path such as Word Basic, Visual Basic for Applications, Visual Basic, then C++. On the other hand, he might enjoy a blank editor screen, a simple problem, and the process of figuring out how to make the computer do what it must to present the correct solution. His call. Your mission. It's great that you're willing to be of service.

  353. Recommend Ruby by Anonymous Coward · · Score: 0

    Ruby. Chris Pine has a nice site that helped my son start. Short tutorials that gave instant results to maintain interest.

    http://pine.fm/LearnToProgram/

  354. Scratch from MIT by Anonymous Coward · · Score: 0

    MIT makes a programming environment called Scratch that is designed to introduce kids to programming (http://scratch.mit.edu/). There are a few things Iike about scratch as an introduction to programming:

    1. First scratch is designed around 2-D graphics (game style) programming. You start with a background that you can add sprites (characters) to. Each of the characters comes with a set of built in commands. You can build you own scripts for each character. It is easy to get started quickly in scratch and see the results. More satisfying in my opinion than "hello world" or text based programs.

    2. In scratch you build programs from graphical building blocks which you drag onto a script window. For example, a loop command looks like a c clamp into which you can drag other commands. Syntactic errors are not possible, so the focus becomes programming structure. I think there is an advantage to learning how organize commands to do what you want, and learning the value of different programming structures before having to deal with finding syntactic errors, since these can be quite frustrating when you are just starting.

    3. Several important programming constructs are available such as if statements and loops. Generating and listening for event is supported. You can write fairly sophisticated programs with Scratch.

    I think Scratch is a good way to help kids feel successful quickly, and has interesting things to keep their attention. It also has enough 'programming structure' to teach them several useful programming techniques that carry to many languages. Another option is the programming environment 'alice' (http://www.alice.org/). This is a 3-D graphical environment for programming. I found this to be more complex to teach my kids. Alice also uses graphical drag and drop programming. The characters (objects) in alice 2.0 have less high level functionality built in that scratch and it required a lot more work to get a simple interesting programming running. There is a version called 'story telling alice' that you can download that has more built in functionality for the characters. I liked this much better than alice 2.0, but it is still harder to teach than scratch. I had to give up on story telling alice because of stability problem on my vista machine. Alice 3.0 is under development, and adds more interesting behavior to several characters. However, last I checked it was in alpha stage and also had various stability issues. Note that you can download characters for alice 2.0 that have more functionality from the wiki (ones that people have contributed).

  355. programming languages by Anonymous Coward · · Score: 0

    HTML, to JavaScript, to ActionScript/Flex

  356. Try Scratch by sputnik_b · · Score: 1

    It's visual, promotes imagination, and has a fantastic online community where your kid can share his project, get feedback, ask for advice, etc. http://scratch.mit.edu/ great article from ACM to whet your appetite: http://cacm.acm.org/magazines/2009/11/48421-scratch-programming-for-all/fulltext good luck!

  357. Just Make sure to do it Right by Anonymous Coward · · Score: 0

    I started teaching myself how to program when I was 9. Unfortunately, the only books on programming languages I found in the school library back then were BASIC. Whatever you do, start the 12 year old off with something good. Like C, or at least C++. In the order of Data Types, Console I/O, then math operations (plenty of toy programs can be created from the above three).

    Then, if statements, loops, and if they're following well, file I/O.

    IF they're still into it, get to the good stuff like pointers, data structures, methods, pass by ref/val, function pointers, etc.

    I wish this was the way I learned, I would have done much better in college instead of relying on the really bad habits I picked up using M$ QuickBasic45. Ugh! Goto! SUBS and FUNCTIONS on entirely different screens with no real passing management, bleh!

  358. Kodu by Anonymous Coward · · Score: 0

    I recommend looking into Kodu, a visual programming environment from Microsoft Research tailored for game development (disclaimer, I'm a dev on the Kodu team). Kodu uses a visual programming language, and is a very gentle introduction to progamming using only the xbox controller for input. It's free for the PC, and a $5 download from the Indie Games Channel on Xbox. Here's the project page: http://research.microsoft.com/en-us/projects/kodu/

  359. Ceebots! by Anonymous Coward · · Score: 0

    I am learning programming myself right now, and we use Ceebots. I find it to be fun, intuitive and (hopefully) a good teacher for when I get into real C.

    http://www.ceebot.com/ceebot/index-e.php

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

  361. The best language? by tonyt3 · · Score: 1

    I remember once asking the best programmer I knew about which language he thought would be the best one for a particular problem I was working on. He said that he thought the best language to use would be the one that I knew best.

  362. The Little Schemer by binq · · Score: 1

    Have him read: The Little Schemer.

  363. Python without a doubt by jocknerd · · Score: 1
  364. pascal by Anonymous Coward · · Score: 0

    I honestly think that Pascal is the best first language because of the way it enforces the concept of datatypes. If you dive into C as the first language, the concept of pointers and all that might be a bit unclear, with Pascal it's pretty explicit because it won't let you point to any other datatypes. It creates a good habit. I would just make sure to have him move on relatively soon to OOP though.

  365. Sooome Advantage by ClosedSource · · Score: 1

    So as long as you use Emacs as if it were notepad, it won't be complicated.

  366. Let them do what they enjoy. by msgyrd · · Score: 1

    I'm a software developer, and having done it for a few years now, I spend my free time brewing beer and baking bread. Sometimes dealing with less rigid systems is far more enjoyable.

  367. Why not PHP? Srsly! by Bobb+Sledd · · Score: 1

    Why doesn't anyone mention PHP?

    OK, now that you've stopped laughing...

    Really! With PHP you can kill two birds with one stone: You can teach HTML so you can be productive right away, and you can just embed some small PHP in the page wherever you feel like it... rather than programming a page to spit out HTML.

    Now you want to make it do more complex stuff? Just add more tags into a working project. Now you have a powerful language that you can branch out and learn how to connect to a database, for example -- way beyond simple scripting stuff. Database is where its at!

    --
    "They said I probly shouldn't fly with just one eye," "I am Bender. Please insert girder."
  368. Arduino by Xamusk · · Score: 1

    Get him an Arduino. That way you can kickstart him in both programming and electronics.

    Also, the Arduino was actually built for people that don't already know how to program.

    And kids love blinking lights :D

  369. AutoHotKey by aaycumi · · Score: 1

    When I started a while ago before actually starting python and raking my brain out on project euler, I started with a simple scripting language called AutoHotKey for Windows (any). It is extremely easy and took next to no time to learn. It helped me get my head around programming rather than throwing someone in the deep end.

  370. 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 phorgan1 · · Score: 1

      This sounds like great fun, but programming in Scheme won't help him move to C. It will put him into a off the main path eddy in the computing world, where only AI and lilypond (both of which I love) live. I wish you'd redo GNU robots in C++.

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

  371. Try Alice by Anonymous Coward · · Score: 0

    Try Alice - http://www.alice.org - it has everything from loops to objects to object and class interactions, all within the premises of making animation movies.

  372. I would opt for Python by Anonymous Coward · · Score: 0

    I would start him off on Python. No, it's NOT a snake... :-)

    I was wearing my PyCon t-shirt, when some moron asked me if it was a herpetologist conference!!!

    Python has the purest and simplest syntax possible, although you DO have to pay attention to indentations.
    It runs on just about every platform, highly interactive, uses same basic function names as C and other languages. No complex "make files"
    to make or deal with, and it glues to just about everything. Its free "python.org". It's Object Oriented...

    From there, you can go anywhere. Client side applications are usually programmed in C or lower level compiler related languages,
    where Server side software (WEB, CGIs, etc) are written in PERL, python, or PHP, or Java.

    J

    J

  373. C# by Anonymous Coward · · Score: 0

    At 12 I was learning assembly and found it the most fasinating language, it is raw, powerful and unresticted. However I'd show my children C# as a very good starting language simply because it is very easy to get something interesting up and running fast.

  374. Make him work around filtering by Anonymous Coward · · Score: 0

    Write an internet filtering system that blocks porn and install it on his comp. He'll learn programming to hack around it in no time.

  375. Scratch from MIT (previously on /.) by amonroy · · Score: 1

    You might want to check Scratch: http://scratch.mit.edu/ It's free, runs on Linux, Mac and Win and let's people share their videogames and animations on the web. It was discussed before here: http://tech.slashdot.org/article.pl?sid=07/05/15/1420238 For those interested in connecting to the physical world you can get the PicoBoard or the LEGO WeDo which interface with Scratch

  376. Just learn C if you want to learn C by phorgan1 · · Score: 1

    Why not learn C? It's as easy to learn as basic and pascal or python, or php.

  377. How to teach a 12 year old to program? by ignavus · · Score: 1

    Easy. Teach an eleven year old to program, and wait until he turns twelve!

    And before you ask the obvious question: you teach a ten year old and wait until he turns eleven.

    Sigh. Some people just don't get recursion.

    --
    I am anarch of all I survey.
  378. Tools by omb · · Score: 1

    Yes, lots of us have helped to port good stuff to Windoze, including a number of For Profit outfits like ActiveState who do Python, Perl and TK/TCL, and lots of ports sit on Cygwin which provides a POSIX api on Windoze. You CAN assemble a tool chain on Windoze by hand (more easily with MINGW), especially if you know Win32/64 api, POSIX ... and the xtool you want to port, and best have done this 2-3 times, to put together a usable tool kit on an enterprise locked down machine takes, maybe half a day, if you bring all your tools on CD or stick.

    My original point is that is MUCH harder than learning programming, Linux distribution vendors do the dependency resolution and packaging, and because Bill cant tell them how and why to screw their own users, the entire ball-of-wax works. So DUMP Windoze if you can, else use Linux as a virtualized system, or if all else fails use Cygwin.

    One other advantage of Linux is that it offers multiple desktops, and since it dosnt crash much, you can have contexts open for months ...

  379. Visual Basic by trelamenos · · Score: 1

    I started as a child to program with Visual Basic 6.0 about 10 years ago.... i think its the best choice for a child.... it get me very fast to the graphical development but also show me the basics about variables, function etc etc i think it going to be the best choice but try to find version 6.0 cause newer version are very complicated..... :)

  380. does he have any interest in programming? by rhendershot · · Score: 1

    The kick I got from modifying Commodore VIC20 BASIC programs was that I could easily make it do things. For me, creating a loop where x was incremented and printing out the correct final value was just fascinating all in of itself. If the little-brother has no interest in such minutae he'll likely be a very poor programmer.

    If I allow myself to assume that the whole point is a reaction to a request from the 12 yr old, and not as it appears simply another of those HowToTeachKidsProgramming.post("/.") or worse a misguided attempt to make the little-one into a facade of the older-one then I would advise this course of action:
          Ask him to describe delivering a newspaper (or some other manageable short task). First thing you'll notice is he thinks about delivering newspapers, not just a single newspaper. Then he'll spin about with monster robotic solutions. He'll not initially notice that there is an address lookup to the routine. Probably traffic avoidance will be his focus but properties have boundaries and some customers get really aggravated when you don't keep to the concrete walks. Point is, it's fairly hard. And harder to explain.

    In short, the best language to start a pre-pubescent or adolescent into programming is his native spoken language.

    If I allow myself a further extension and consider how to nurture a beginner who has interest and maybe has poked (see what I did there?! ;) around a little with programming environments or tools and has been mostly unsuccessful, I would suggest a shell, even command.com if necessary. I think being able to list and manipulate files and iterate through file directory hierarchies poses enough of a challenge to assess the student's organizational and motivational resources.

    I would urge that an early lecture would cover Leverage (effort vs. work done). The right tool and language for the right job is an unbeatable combination. He should know early-on that C++ is not something to ftp files into your database, usually.

    Do put him in front of the environment early on, even if you advise that it may seem too hard at first. The newspaper example can be redirected as a copy a file shell script. And you can show him how to stub out the address lookup (and explain that such 'hard-coded constants are a bad thing'. And you can grow that into a full-blown model of the domain, actually.

    It's not about language.

    1. Re:does he have any interest in programming? by Anonymous Coward · · Score: 0

      mod parent up

  381. If he is indeed interested in learning programming by Anonymous Coward · · Score: 0

    Just teach him QBasic, it is nice, easy and fun language, it is straight with graphic and sound, and it doesn't need to compile to run programs.

  382. Hackety Hack by BlueCodeWarrior · · Score: 1

    I'm maintaining _why's Hackety Hack, which was built specifically for this purpose. It's still in "not quite 100% ready yet" mode, but you can at least keep your eyes peeled. I'm also quite open to thoughts and suggestions. http://hackety-hack.heroku.com/ http://github.com/steveklabnik/hacketyhack

  383. Re:LOGO then Python by m1xram · · Score: 1

    Spend a little time on LOGO to show some basic concepts and then onto Python.

  384. How about by Anonymous Coward · · Score: 0

    assembler :P

  385. Microsoft Visual Studio by fordfanboi · · Score: 1

    Have him start with mainstream languages and tools - the ones whose sole purpose is to make programming life easy. Visual Studio > Visual Basic Express. Loads of examples and tutorials out there geared toward youth. The migration to Visual C++ will be easy since he will already know the IDE.

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

  387. Game addiction + Possibility to modify game by Inyu · · Score: 1

    1. Make him or her like a challenging game.
    2. Show that he or she can win by changing the game from the inside

    At least, this is what happened to me when I was 11, playing games that were written in BASIC.

  388. Re:Python (or My Butt) by Niobe · · Score: 1

    Which all counts for absolutely zero if the kid isn't motivated to learn it. Find me a 12yo that gives a crapola about anything on your list and I'll show you my butt. Yes, my butt.

  389. Teach him/her how to meet girls/boys instead! by Anonymous Coward · · Score: 0

    Not a troll, I'm completely serious.

    Nobody told me how to meet girls, how to date them, or anything else. Like most Slashdotters, remaining a virgin until my 20s is a fact that has scarred me for life.

    I know people - even people who are very much of the "Slashdot type" - who were having sex at age 14. I didn't get laid until 11 years later. And it now pisses me off that I was so led and allowed to follow the path of geekiness at the expense of love and sex.

  390. Re:Python (or My Butt) by Simon80 · · Score: 1

    If a given 12 year old isn't motivated to learn Python, they're probably not going to be motivated to learn much else, which would make the whole argument moot. See http://www.pygame.org/docs/tut/chimp/ChimpLineByLine.html for a short justification of this.

  391. Logic should be in built ! by shimbi · · Score: 1

    Does your younger brother really want to learn anything about programming as teaching programming is not about teaching a chapter in school !You have to be a born programmer!!

  392. Squeak - Learn Programming with Virtual Robots by Anonymous Coward · · Score: 0

    http://www.amazon.com/Squeak-Programming-Robots-Technology-Action/dp/1590594916

    check this book out. its a great book, and tons of fun

  393. Try scratch programming by Anonymous Coward · · Score: 0

    scratch programming (http://scratch.mit.edu/)

  394. Visual Basic? by gravis777 · · Score: 1

    Yeah, its a Microsoft product, but its not half bad. Has exactly what you asked, an easy to learn language (BASIC) that is actually usable in real-world scenarios.

    NEVER teach C or Java or Assembly to a first time programmer unless they are really bright. You need to teach a person how to develope reasoning and logic first before they start worrying about syntax and object oriented stuff, and Basic is a great stepping stone. The advantage of Visual Basic is suddenly you are in a GUI enviornment, and once you learn the easy stuff, you can actaully get into object oriented stuff.

    But yes, in the end, stick to Basic, GWBasic, or Visual Basic. You have got to have that foundation of understanding programing Logic first and formost. After you have that foundation, you can fairly easily jump into any other language.