Slashdot Mirror


How To Encourage a Young Teen To Learn Programming?

Anonymous Hacker writes "I'm in a bit of a bind. My young teenage son is starting to get curious about computers, and in particular, programming. Now, I'm a long time kernel hacker (Linux, BSD and UNIX). I have no trouble handling some of the more obscure things in the kernel. But teaching is not something that I'm good at, by any means. Heck, I can't even write useful documentation for non-techies. So my question is: what's the best way to encourage his curiosity and enable him to learn? Now, I know there are folks out there with far better experience in this area than myself. I'd really appreciate any wisdom you can offer. I'd also be especially interested in what younger people think, in particular those who are currently in college or high school. I've shown my son some of the basics of the shell, the filesystem, and even how to do a 'Hello World' program in C. Yet, I have to wonder if this is the really the right approach. This was great when I was first learning things. And it still is for kernel hacking, and other things. But I'm concerned whether this will bore him, now that there's so much more available and much of this world is oriented towards point-n-click. What's the best way to for a young teen to get started in exploring this wonderful world of computers and learning how to program? In a *NIX environment, preferably." Whether or not you have suggestions for generating interest or teaching methods, there was probably something that first piqued your curiosity. It seems like a lot of people get into programming by just wondering how something works or what they can make it do. So, what caught your eye?

15 of 1,095 comments (clear)

  1. Start him off here... by blahplusplus · · Score: 4, Informative

    C++ primer plus by stephen prata.

    http://www.amazon.com/Primer-Plus-5th-Stephen-Prata/dp/0672326973/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1216718603&sr=8-1

    It is one of the best ways to learn programming from absolutely knowing nothing! Because it explains in very accurate, precise and simple language that is very well expressed.
    This is where I learned to program years ago, and I'd challenge anyone to find a better place to bring an absolute know nothing about programming into the fold.

    It explains all the simple functions and whatnot for console programming, etc, if he can't dig that then he's not fit to program, the book makes C++ as easy as something as python, or the old visual basic.

    The old visual basic 6 is not a BAD place to start if you can find some good programming books, because the old VB gave "immediate" results that kids often look for.

  2. Low-level game programming by 4D6963 · · Score: 2, Informative

    Video games are fun, and making your own video games is fun too.

    Start by making him learn text game programming, like the price is right. That's both on the very basic level of programming, and a quickly gratifying game to learn.

    Then, maybe I suggest low level game program. And by low level I mean no SDL (well, maybe a wrapper), but writing your own pixels to a frame buffer is more gratifying. As in, teach him how to make a function that write a rectangle on a frame buffer depending on the rectangle's size and the coordinates of its center, then make him move the rectangle around by pressing keys.

    Build on top of that by making he do a very basic game like pong. My first graphical video game was a pong and I coded it in two days, that's how easy it is.

    From that point on, he will probably start to get ambitions. As in, he'll want to draw lines, load sprites, rotate them, use physics, learn about tcp/ip network, signal processing theory and techniques, etc, to achieve a precise purpose. All of these things will fuel his interest towards mathematics and physics, and give him a good reason to learn about and understand these things.

    Finally, introduce him to more "real world" type of programming, by giving him some of the stuff you have to do at work, for uhh.. the sake of his education!

    --
    You just got troll'd!
  3. Re:No ShortCuts !!! by hobbit · · Score: 5, Informative

    I'll feed the troll today.

    So he can learn how important white space is

    Indeed. Unlike most other programming languages, Python mandates readability, which is an excellent discipline for a youngster to learn.

    and write entire apps with a single line of code

    This is possible in most languages, but somewhat less likely in Python owing to the aforementioned discipline.

    and no idea how it happened

    This is impossible in most languages, and Python is no exception.

    and learn to program with no job prospects?

    You just keep telling yourself that; the world will change around you.

    I have nothing against Python

    In that case you need to brush up on your writing skills.

    but as a learning language I put it down there with Perl.

    A lot of people cut their teeth on Perl. I am not one of them, so I can't comment.

    --
    "Wise men talk because they have something to say; fools, because they have to say something" - Plato
  4. Re:PHP will ruin your mind by Anonymous Coward · · Score: 1, Informative

    There are so many reasons not to start with PHP, that I'm not even going to start listing them here. PHP is a HORRIBLE first language, and a horrible second, third or forth language. It corrupts minds, and makes it harder to learn other languages. It's a lot worse than corrupting someone by teaching BASIC as a first language.

    You should be ashamed of yourself for suggesting teaching PHP to a kid.

    -Don

    To be quite honest, you are terribly wrong, PHP looks alot like C or C++ is syntax, it has somewhat OK OOP (will be even better with php6), yet provides alot of functions for most things, it has tons of interfaces to UNIX-like enviroments and is easy to grasp.

    Ofcourse like most languages intended for webdevelopment, it is not optimal for system programming, even tho it provides alot of functionallity for it. I have no idea why you think its horrible, its really not. Want languages that will make it hard to learn other langugages if you learn them first? Look into Visual Basic or Python.

  5. From NAND to Tetris by STFS · · Score: 3, Informative
    I guess this really depends on how interested your kid actually is in learning the internals of computers. It might be a good idea to start with a "high level" tool, and I'm not talking about using Python or some such thing, but using Alice and/or LEGO Mindstorm. I've played with Mindstorms myself in a robotics course and I can vouch that you can do a lot of fun and interesting things with it. There's even a C-like programming language and compiler that you can switch to when the "block interface" becomes boring and your kid gets interested in learning more "orthodox" programming.

    Once he has a solid knowledge of basic programming and if he's still interested in learning more of the basics of how computers work and if you are willing to dedicate quite a lot of time and effort to destroying the social life of your kid once and for all and turning him into a full blown geek I'd recommend that you take a look at a course that has been called "From NAND to Tetris" in which students are given a NAND logic gate and must construct their own (simulated) computer out of that by gradually building on top of that NAND gate. Eventually they end up implementing a simple game, such as tetris or snake in a computer that they build from the ground up.

    Here are some links for this material:
    A short introduction to the course: http://www.youtube.com/watch?v=JtXvUoPx4Qs
    A long introduction to the course (Google Tech Talk) http://video.google.com/videoplay?docid=7654043762021156507
    The course material itself: http://www.cs.rpi.edu/news/colloquia/December8_2005.html

    Above all else I think you need to be sensitive to your kids needs and longings. Who knows, maybe he will not be interested in all about learning the internals of computers but more interested in the usability and design of interfaces (I know, your worst nightmare I'm sure). My point is, don't push him into a direction that isn't to his liking.

    --
    You don't think enough... therefore you better not be!
  6. Re:Javascript by TheRaven64 · · Score: 3, Informative

    JavaScript has some horrible syntax, but semantically it's a very clean Self-derivative. If you learn JavaScript well, you learn about Lieberman prototypes, closures and late binding. It also has the advantage that it's easy to write JavaScript code for the web that actually does something useful. I'd still probably recommend Squeak over JavaScript, because Smalltalk has much simpler and cleaner syntax, but JavaScript isn't a bad second choice.

    --
    I am TheRaven on Soylent News
  7. Re:python by croftj · · Score: 2, Informative

    You know what they say about presumptions...

    --
    -- Many men would appreciate a woman's mind more if they could fondle it
  8. Let Infocom be your shepherd by spyrochaete · · Score: 2, Informative

    Games are what got me interested in programming. I used to read Creative Computing BASIC games compilations in bed as a youngin'. They had the source code of a game along with a couple of printed-out test runs. I found this an interesting application of programming that spoke to my hobby of video games.

    Why don't you write a game with your son? A text adventure a la Infocom, or a slot machine or dice rolling board game?

  9. Re:python by Cal+Paterson · · Score: 2, Informative

    Hmmm...as someone learning Smalltalk at the moment, I cannot agree with this post. Smalltalk itself is actually relatively straightforward, but actually learning OOP is very difficult indeed. There are tough, abstract concepts here, and OOP has a higher barrier to entry than functional languages (which I learned first) or proceedural languages.

    Additionally, there is only one book currently suitable for learning Smalltalk (Squeak by Example), and while it's a good book and not exceedingly hard, it would assume to much of someone who doesn't already know how to program. There might be a text I don't know of, though.

  10. Re:PHP will ruin your mind by SimHacker · · Score: 5, Informative

    If you're a PHP programmer, you're irresponsible if you're not already aware of its flaws, because you have not educated yourself by reading any of the following well publicized articles. Once you understand the flaws of PHP, you can't honestly make the statement that it's a well designed language suitable for teaching programming to kids.

    First there is this classic article, Edwin Martin's "What I don't Like about PHP", which goes into detail about the following fundamental flaws:

    1. Bad recursion
    2. Many PHP-modules are not thread safe
    3. PHP is crippled for commercial reasons
    4. No namespaces
    5. Non-standard date format characters
    6. Confusing licenses
    7. Inconsequent function naming convention
    8. Magic quotes hell
    9. Framework seldom used
    10. No Unicode
    11. Slow

    Then there is the mind-set of the PHP language designers and community, which is deeply flawed. Ian Bicking's "PHP Ghetto" article sums up the problem with PHP's design and community pretty well:

    I think the Broken Windows theory applies here. PHP is such a load of crap, right down to the standard library, that it creates a culture where it's acceptable to write horrible code. The bugs and security holes are so common, it doesn't seem so important to keep everything in order and audited. Fixes get applied wholesale, with monstrosities like magic quotes. It's like a shoot-first-ask-questions-later policing policy -- sure some apps get messed up, but maybe you catch a few attacks in the process. It's what happened when the language designers gave up. Maybe with PHP 5 they are trying to clean up the neighborhood, but that doesn't change the fact when you program in PHP you are programming in a dump.

    Jonathan Ellis' "Why PHP sucks" article makes a lot of good points and links to many other sites with more information to back up the claim that PHP sucks.

    He perfectly summarizes the yapping of the PHP apologists when he says: Basically these all boil down to, "I don't have enough experience to recognize PHP's flaws because I haven't used anything better."

    He summarizes:

    In short, PHP sucks because, PHP's authors are prone to confuse "pragmatism" (a fine design goal, if done well) with "adding random features without considering how they impact the language as a whole." Thus, its authors have found it necessary to correct obvious flaws in both minor and major releases, with the result that the recent PHP5 breaks with the past to an unprecedented degree while still leaving many fundamental flaws un-addressed. I don't know if this is because they didn't recognize those flaws, or more likely, because they were willing to impose "requires a lot of pain to upgrade" but not "requires a complete re-write."

    There is also a lot of great stuff about why PHP is so bad on http://www.ranting-wolf.info/category/technology/programming/php/ including a concise description of why the "Smarty" templating system is such a horribly ill conceive and terribly implemented idea.

    And if you're still not convinced the design of PHP is deeply flawed, because language design is HARD and should only be attempted on purpose by experienced people, here's what the Father of PHP Rasmus Lerdorf himself said in an ITConversations interview, quoted in "Why PHP sucks, Part III":

    "I don't know how to stop it, there was never any intend to writ

    --
    Take a look and feel free: http://www.PieMenu.com
  11. Re:Son? by ShieldW0lf · · Score: 5, Informative

    I can't comment to a teenager, but I've been having success getting my 7 year old daughter interested in programming with Scratch. She's been using it to make movies and games. The thing that really captured her attention was that she could publish her work through Scratch and get positive feedback from the community on the Scratch website. The idea of building a fan base really appeals to her. I've also told her that if she develops the skills, when she's ready for her first job, we will give her part time work instead of her having to get a job in some fast food joint or convenience store, and that seems to have made an impression on her.

    Seems to me the best thing you can do to get your teenager involved in *nix programming is to get them involved in an online community that will give them some positive feedback and the possibility of celebrity, then show them some of the success stories out there that started in just that way. And, of course, let them know you're genuinely proud of them when they create something.

    --
    -1 Uncomfortable Truth
  12. Re:Make it about programming and something else by wcboyd · · Score: 2, Informative

    I would tend to agree that this is a great way to provide immediate feedback and still give someone a basic enough knowledge of programming. Another alternative would be REALbasic (www.realbasic.com) It is about as platform independent as you can get and will also provide immediate feedback. Plus, for Linux users the standard version is FREE!

  13. Re:Son? by rapierian · · Score: 2, Informative

    Along those lines I would point out that Smalltalk was designed to be easy for children as well, so you might want to take a look at http://www.squeak.org/ It's never too early to pick up good programming habits.

  14. Python 3.0 in months, bad time for teaching Python by leftie · · Score: 1, Informative

    This is the wrong time to pick Python for teaching. Python 3.0 is coming out in months. It's going to be incompatible with all the 2.x versions. There's going to be major changes that effect everything all the way down to "Hello World."

    That sounds like a big confusing mess to deal with explaining to a student.

    Link to python 3.0 info...
    http://www.python.org/download/releases/3.0/

  15. Instant Gratification. by NoobixCube · · Score: 2, Informative

    Try teaching something that will instantly set off the endorphin rewards. You certainly know a whole lot more about what makes him tick than anyone on Slashdot, but most teenagers, myself included (though I'm 20 now...) play games. Get him started on Python and PyOpenGL, that way he can easily get some 3D graphics on screen.

    For some reading on education in general, in case you're curious, Dimensions of Learning is a good place to start. It's a relatively current teaching model. I have the textbook on it, but you can find general outlines of it everywhere; though, curiously, it doesn't have it's own Wikipedia page. I might need to do something about that, unless it's in another article.

    --
    Admit it. You post strawman arguments as AC so you get modded Insightful for refuting them, rather than Troll