Good language for a 12yo to learn with?

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

douglasb

Diamond Member
Apr 11, 2005
3,157
0
76
Well I was at the public library today with my 4yo (I had thought about naming him SQL but my wife frowned...oops there's no smiley for a 'rimshot'.) Anyway, I found they had a decent beginner book on Python, so I got that for my son, and he has been working through the 1st 6-or-so chapters this afternoon. He seems quite absorbed and the new syntax doesn't seem to bother him at all. So I'm encouraged by that.

I don't want to throw too much at him at once, but rather let him work his way through this Python book, then maybe see what I can find for C# or Lua or JS or even VB. Hopefully, he'll get enough depth to deal with the projects he's working on, as well as starting to imagine new possibilities. With exposure to a couple different languages (we have a long summer vacation coming up after all) I expect he'll learn more about the general practice of programming (not least the inclusion of plentiful comment lines and documentation—at least if he wants Dad to help with debugging!) I don't plan to rush him along or anything, just let him delve into Python and try to be attuned to when he's ready to try something else.

Python is a pretty good choice for a starter language, IMO. Java was the one I was going to recommend, but either one should be fine.

VB and Javascript are interesting choices. As someone with a Computer Science degree, I think they are both horrible choices. However, my first exposure to programming (when I was 9 or 10 years old) was first through BASICA and Logo (anybody remember that language?). So, in that sense, I do see some value in a language that is simple to learn and quickly shows you the results of your work.

I guess it really depends on you and your son's goals. If it is simply to see if he is interested in programming, then any language will work. BASICA and Logo were enough to get me interested, and the structured languages came later. However, if he is already interested and he wants to start developing some CS skills, I would steer him away from VB and towards one of the C-derived languages (Java, C, C++, C#, etc.) for his next language. VB probably isn't the best language for teaching good programming habits, and it also has lots of little quirks that are specific to VB and don't make much sense if you are used to other languages. Javascript is also very weakly-typed and has no debugging to speak of, so I would probably avoid starting with that one if he is getting serious about programming.
 

beginner99

Diamond Member
Jun 2, 2009
5,235
1,611
136
While I mainly work with Java I'm not really convinced it would be great for a 12 year old. I agree what was said that it is good to teach Object Oriented Programming and in the end lead to better code but then he is just a kid and it doesn't really matter.

The thing with Java is he will have to learn how to compile, manage classpath and dependencies and so forth. just a lot of boring stuff. Or to "avoid" that learn an IDE.

Python is much easier. Or JavaScript (especially with Firebug for debugging).
 

calden

Junior Member
May 14, 2013
10
0
66
I also have 13 year old daughter, she was interested in web development and I started her out with PHP. PHP is a great for young people to start with as it encourages them to learn other technologies like Apache, Javascript, MySQL, HTML, secure sockets, Unix, FTP, SSH, ect. My daughter has already built over 5 websites, all database driven and even has her own domain now which she maintains. I found a used Sun Sunfire X4200 on eBay for only 120 bucks with two quadcore CPU's and 16GB of ram that she uses as a webserver.

The suggestions above are all good but going my route has a better chance of snagging their interests as they use the internet everyday. I think it's great trying teach him C++, Python or Java but it's also kind of boring for the kids. When I first started to teach my daughter I used Facebook to really spark her interest as it's a PHP driven site. What's great about going this route is they get to see their creations being built in almost real time without the hassle of compiling. They also get to share their creations with friends which also makes them interested, my daughter has already hooked 4 of her friends. They actually get together for development sleepovers, I couldn't be more proud.

You can setup a develpoment enviroment in less then 20 minutes by using XAMPP http://www.apachefriends.org/en/xampp.html . I gave her my older Dreamweaver CS2 license for a IDE but their are many free ones available, try Eclipse, Netbeans, Aptana or Bluefish.
 
Last edited:

Syran

Golden Member
Dec 4, 2000
1,493
0
76
I also have 13 year old daughter, she was interested in web development and I started her out with PHP. PHP is a great for young people to start with as it encourages them to learn other technologies like Apache, Javascript, MySQL, HTML, secure sockets, Unix, FTP, SSH, ect. My daughter has already built over 5 websites, all database driven and even has her own domain now which she maintains. I found a used Sun Sunfire X4200 on eBay for only 120 bucks with two quadcore CPU's and 16GB of ram that she uses as a webserver.

The suggestions above are all good but going my route has a better chance of snagging their interests as they use the internet everyday. I think it's great trying teach him C++, Python or Java but it's also kind of boring for the kids. When I first started to teach my daughter I used Facebook to really spark her interest as it's a PHP driven site. What's great about going this route is they get to see their creations being built in almost real time without the hassle of compiling. They also get to share their creations with friends which also makes them interested, my daughter has already hooked 4 of her friends. They actually get together for development sleepovers, I couldn't be more proud.

You can setup a develpoment enviroment in less then 20 minutes by using XAMPP http://www.apachefriends.org/en/xampp.html . I gave her my older Dreamweaver CS2 license for a IDE but their are many free ones available, try Eclipse, Netbeans, Aptana or Bluefish.

Only problem with PHP for this (and personally, I use a ton of C/C++ knowledge to code my php) is that he was looking for something to learn that could be gaming oriented, and I just don't see that on the PHP side of it.

That said, LAMP is actually pretty cool, and very useful, and FREE! :)
 

calden

Junior Member
May 14, 2013
10
0
66
Only problem with PHP for this (and personally, I use a ton of C/C++ knowledge to code my php) is that he was looking for something to learn that could be gaming oriented, and I just don't see that on the PHP side of it.

That said, LAMP is actually pretty cool, and very useful, and FREE! :)

Oops, missed that, maybe I should read before posting. I still think a kid should start with PHP though. Like you said the syntax is pretty close to C++ and I'm a big believer in learning how to fold a paper plane before building a rocket.
 

BigDH01

Golden Member
Jul 8, 2005
1,631
88
91
Oops, missed that, maybe I should read before posting. I still think a kid should start with PHP though. Like you said the syntax is pretty close to C++ and I'm a big believer in learning how to fold a paper plane before building a rocket.

PHP... ugh. I know it's popular and Google just added PHP support to GAE but as a language I just can't stand it. If the desire is to learn something C-like that has a lot of other usages (web dev, enterprise, etc), I would choose Java or C#. Personally, I like C# over Java, but that's personal preference. If the desire is to learn something with a very wide range of application, it's tough to go wrong with Javascript even if people don't particularly like it. You could then learn Coffeescript which will help you learn Ruby. Python is also a good choice, but probably won't be applicable to gaming development all that much.

As far as developing games, as a career that's a tough path. Not only is it difficult to really break into, game devs work long hours for pay no better or worse than counterparts. There's huge turnover in that area. I think many find it's a better hobby than career.
 

bdazzled

Junior Member
May 9, 2013
6
0
0
He's still working through the Python book for now. He wrote a little 'Pong'-type game today, and I told him it would be more fun if it was his own face bouncing around, so a couple minutes with Irfanview and Paint, and there it is. Trying to keep it fun and seeing what is possible. It should definitely be a fun summer for him. He's saving up lawn-mowing money for a new computer, since the cracked-LCD-blob on his laptop is kind of distracting. Maybe C# next, and give him a linux distro to set up. That should keep him occupied for a while. Many thanks for all your advice.
 

CZroe

Lifer
Jun 24, 2001
24,195
857
126
No reason to avoid BASIC. It's not like the latest IDEs are BASIC replacements. There is nothing new that serves the same logical teaching function as BASIC while completely replacing it.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
No reason to avoid BASIC. It's not like the latest IDEs are BASIC replacements. There is nothing new that serves the same logical teaching function as BASIC while completely replacing it.

Much of BASIC's attraction was the immediacy of the interpreter. You could execute a single line, or enter a complicated multi-line program, run it, and immediately see the results and continue editing. Is it available today in any form that preserves those characteristics?
 

Ichinisan

Lifer
Oct 9, 2002
28,298
1,235
136
Much of BASIC's attraction was the immediacy of the interpreter. You could execute a single line, or enter a complicated multi-line program, run it, and immediately see the results and continue editing. Is it available today in any form that preserves those characteristics?

The last time I used Visual Basic, I could pause / break / step-through to debug.
 

Turbonium

Platinum Member
Mar 15, 2003
2,154
82
91
I also have 13 year old daughter, she was interested in web development and I started her out with PHP. PHP is a great for young people to start with as it encourages them to learn other technologies like Apache, Javascript, MySQL, HTML, secure sockets, Unix, FTP, SSH, ect. My daughter has already built over 5 websites, all database driven and even has her own domain now which she maintains. I found a used Sun Sunfire X4200 on eBay for only 120 bucks with two quadcore CPU's and 16GB of ram that she uses as a webserver.
This is incredible. I feel so behind.

I'm almost 30 and I still don't really know how to use PHP, beyond doing a tutorial and randomly doing stuff. I just don't naturally think in PHP terms.
 

Train

Lifer
Jun 22, 2000
13,572
66
91
www.bing.com
Much of BASIC's attraction was the immediacy of the interpreter.
While a nice feature, I'm not sure I would call it the major attraction.

I learned to code on a C64, out of the box you had basic and assembly (well, machine code, not assembly)

Both had the ability to start from any point in the program. In basic it was by line #, in machine code it was a specific memory address to start executing from.

This came in handy when I was building my sprite heavy game. With several sprites loaded into memory at startup, it took a good 20-30 seconds before you could start your game loop. After the first run, I could just Run 200 or whatever line, to skip that part, assuming I never overwrote that portion of memory.

Back on topic, I think the "attraction" of basic was that it was for beginners, and was all purpose (the B and A in the name)

On early PC's, built in interpreters meant it was very low barrier to entry.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
While a nice feature, I'm not sure I would call it the major attraction.

I learned to code on a C64, out of the box you had basic and assembly (well, machine code, not assembly)

Both had the ability to start from any point in the program. In basic it was by line #, in machine code it was a specific memory address to start executing from.

This came in handy when I was building my sprite heavy game. With several sprites loaded into memory at startup, it took a good 20-30 seconds before you could start your game loop. After the first run, I could just Run 200 or whatever line, to skip that part, assuming I never overwrote that portion of memory.

Back on topic, I think the "attraction" of basic was that it was for beginners, and was all purpose (the B and A in the name)

On early PC's, built in interpreters meant it was very low barrier to entry.

I'm not sure I would either, which is why I didn't :). But I do think that the simplicity of the environment made it extremely approachable. All you had to do was type basic (or basica or gwbasic or whatever) at the command prompt and start entering code.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
The last time I used Visual Basic, I could pause / break / step-through to debug.

I'm not sure Visual Basic falls into the same category. It's an IDE, and right off the bat there is a lot more to do/learn to get "print 'Hello World'" to work than back in the day when BASIC was on rom in every PC.
 

Train

Lifer
Jun 22, 2000
13,572
66
91
www.bing.com
All you had to do was type basic (or basica or gwbasic or whatever) at the command prompt and start entering code.

pshh, too much work. All the Commodores, the Tandy, and I can't remember what else, all started you at a basic prompt.

I can't find the link, but there is a site that lets you run any language (like nearly 100 languages to choose from, including the original Fortran) immediately, in the browser.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
I can't find the link, but there is a site that lets you run any language (like nearly 100 languages to choose from, including the original Fortran) immediately, in the browser.

Yeah I assume something like that must be out there. Would be cool if they simulate the various display modes available to BASIC, because making stuff happen onscreen was fun, and a larger part of what got me into programming.
 

bdazzled

Junior Member
May 9, 2013
6
0
0
Progress Update after a few weeks with Python:

My son: He worked through the library book I got for him, "Hello World! Computer Programming for Kids and Other Beginners" (Sande.) This is a Python book, though the title doesn't indicate so. It seemed well-balanced to me&#8212;easy to follow, well-written and not as cutsie or dumbed-down as some other mass-market intro programming books IMO.

After finishing the book and its exercises, he was very inspired. He jumped right into re-formulating his 'Text Adventure Game' project from scratch in Python, and it's grown to something like 1200 lines already. His friends volunteered as 'alpha-testers' and came round with their keychain drives for copies. So he's very excited with what he's been able to do so far. From learning the basics, he was able to start immediately into realizing his own creation, and produce working results very quickly.

My impression: I was really impressed with how easy it was for my son to get started without any help from me. I, lacking any formal CS background, found Python extremely easy to pick up at glance: readable syntax and structure, very friendly treatment of variable typing, modularization, list/arrays (lots of convenient built-ins for List management), and objects. I realize that certain features might appear 'soft' to some. [I felt a vague unease and almost superstitious dread, when I saw the casual data-typing and list allocation and resizing in action, but this is just my old habits.] I can imagine some people thinking that this might create "bad habits" or crippling programming practices, but I am blissfully unconcerned! It's made it very easy for me not to focus on the arcane details, but instead on teaching programming ideas, like adding error checking, exception-handling, objects, modular code, neat and appealing i/o, user-friendliness, etc. So far, it's been easy for him to grasp these concepts and quickly implement the ones he chooses.

Python is working out great for the task at hand as well as providing a lot of 'teaching moments.' I hope others will find this useful.
 

MrDavid

Junior Member
Jun 13, 2013
14
0
0
When i was in school we used to start with Pascal and Delphi. i think its quite easy to understand. There are no "shortcuts" and the language is clear to read. Anyway, for today Visual basic would be a great starting point as you can also use it in excel.
 

owensdj

Golden Member
Jul 14, 2000
1,711
6
81
Set him up with Visual Studio Express for Desktop(it's free) and have him learn C#(pronounced C Sharp). C# gets rid of the troubles beginners might have with pointers in C and C++, and C# does automatic garbage collection.
 

Obsoleet

Platinum Member
Oct 2, 2007
2,181
1
0
OP- Once I read your son's story there is only one way for you to go. But other than learning solid programming fundamentals, the language doesn't matter.

Like many here, I started programming in QBASIC around your sons age. I also made text games, I wish this existed for me like it does now for him- http://learnpythonthehardway.org/

It will ease him into making text based games, and even show him how to put them online, step by step with all the information he needs to get solid start into programming.

Also, buy him the videos for a measly $30. You can't make a better investment than that. After he completes that, I'd let him do whatever he wants. It won't matter at that point, he'll be kicking out real code at that point. I'd probably move onto JS next. Between those two he's going to have learned programming properly (and while Python syntax is easily readable and kind of its own thing, JS syntax is more Java/C vein), and be ready for a career let alone college. If he wants to learn it before great, but let him learn legacy stuff like C++/Java there (or before if he wishes but Python/JS will do it). JS has a future as bright as C did back in 1975.

I would say simply go JS, in theory it's the best choice for everyone due to being the assembly language of the web, and now a server side language. But you need to go where the learning materials are and I think for all ages the link I provided can't be beat. Not to mention its my (and many people's) goto tool for small automation scripts and what I use for a small GUI application. Something like Python is mandatory in a programmers toolbox. Ruby is an option but not as easy to get working in a Windows environment as Python is, which is basically seamless. Ruby is more web-based like JS as well- but Python is more general purpose and allows for local application development and web.

After LPTHW, point him to PyGame or Pyglet. With Python he'll see results fairly quickly.
Wanna sell the book to your son? 580 lines of Python code using Pyglet-> http://www.youtube.com/watch?v=kC3lwK631X8 Try to do that in LUA (nothing against Lua, it's just not in the same league as Python).

I'd suggest you work through LPTHW at the same time he is. You'll enjoy it, and no matter what your career is right now it'll boost it significantly.

Good luck and I'm glad you asked this question because I know once you think this information over that you'll realize I'm not just recommending a language like most, I'm giving you all the tools you need to teach him the right way. I know I'm going to help some kid out here.
 
Last edited: