Sign in to follow this  
TechnoCore

Language for 9-year old?

Recommended Posts

Hi! I was asked by a friend where to start with programming if you are 9 year old. His son wants to learn programming, and he himself don't know anything about it. I dont have any good idea what would be the best programming language to start with... 9 year old is kind of young :) Anyone knows a where to start? /T

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I really recomend BYOND,the language is very powerful for what its for,making online multiplayer 2D games,its very easy to understand its in english

For a 9 year old this is good cause:

1-Makes Games
2-As long as he knows english its easy
3-Fast prototype possibilities
4-Great comunity!

Share this post


Link to post
Share on other sites
He might want to check out one of a handful of programs the let you create games(The Games Factory, Stagecast, Game Maker, etc.) if he is more into making games than learning programming.

If, however, he really wants to learning a language, theres always all the different Basics. I have no idea which one would be good, but they can't be *that* different. Another possibility could be Python(python.org).

One of my friends started programming in 4th grade. I don't know what he started on, but he did move to c++ pretty quickly. I'm also sure that other people around here have started at about that age, too. So it is doable.

Good luck to him!
-Ezbez

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I could use QBASIC when I was 9. There are a lot of old books for kids still clogging up libraries around that were originally for the ZX Spectrum era of BASIC, full of relatively simple games that will mostly run with no modifications perfectly in QBASIC (graphical games won't run). I managed to pick a book up for around 10p (It was Usbourne's 'Computer Space Games', there was another in the series 'Computer Battle Games'), a snip compared to the £30+ you can pay for real programming books which certainly aren't aimed at kids.

And folks, I had no problem learning other programming languages afterwards.

Share this post


Link to post
Share on other sites
How motivated is he? If he just wants to make games and isn't profoundly interested in math/logic/etc. one of the various game maker tools might work. But if he's really interested in programming or wants to emulate the way professionals do it and you think he'll be able to remain motivated, not to mention extremely patient (programming can be very, very painful, and sometimes you just get completely stuck for a while), there's no reason to assume he can't start with C++. I was about 9 when I started learning C++ and somehow (I really don't know), I've held on to that motivation for six years.

It's important to have some guidance, though, which can be difficult if neither parent programs (unfortunately, elementary schools do not offer classes on programming). I actually got pretty lucky in this situation, because my older cousin had started taking programming classes in college shortly after I started trying to program, and I also stumbled upon the (now defunct) forums at cplusplus.com. I'm not sure I can really recommend online forums for a someone who's nine (particularly since this one has an age limit of 13. In some ways that bothers me, but it makes sense), but it worked for me (and I didn't get murdered by insane stalkers). Even so, I followed quite a few dead ends trying to learn (though I did learn things from all of them) and probably could easily have given up the whole thing.

Share this post


Link to post
Share on other sites
As someone suggested, if he wants to program, I'd also suggest the BASIC variants, a good one that I love to promote is freebasic, its a relatively simple language being based largely on QBasic, but as its name implies, its 100% free, and it has alot more power open to your son as his skill progresses.

Share this post


Link to post
Share on other sites
See if he would be interested in learning the basics of C++ and try writing some text-based games using the standard input/output libraries.

This is what did around that age, but in BASIC (blah).

"You have entered a very dark cave. You hear lions. Which direction do you want to turn? (N)orth/(E)ast/(S)outh" ... :)

Share this post


Link to post
Share on other sites
Quote:
Original post by BleedingBlue
As someone suggested, if he wants to program, I'd also suggest the BASIC variants, a good one that I love to promote is freebasic, its a relatively simple language being based largely on QBasic, but as its name implies, its 100% free, and it has alot more power open to your son as his skill progresses.


I'm really not a big fan of BASIC. It's true that I didn't learn it when I was 9 (and the fact that I did fine probably shows that there's really no need for a language to be simpler), but I've since learned more of it than I ever wanted to know and I'm just slightly underwhelmed. It's true that FreeBASIC looks better than any I've used before, but I'm still just not convinced as to what makes it the best choice.

Share this post


Link to post
Share on other sites
I'd second BASIC. My brother tried to teach me C (or was it C++ - it was a bit of a different language then) when I was about 11 but I just found it too confusing. BASIC I managed to pick up quite easily and I moved on to C a couple of years later. And I recommend DirectQB if he wants graphics, no idea if it'll work on modern PCs though.

Share this post


Link to post
Share on other sites
What I like about freebasic is that it keeps the simple basic language, like

sub whatever(this as integer, that as string)
dim anotherVar as byte

if this = that then
anotherVar = anotherVar +1
end if
end sub




Which I think is a much more obvious syntax then


void whatever (int this, char* that)
{
char anotherVar;
if (this == that)
anotherVar++;
}




Even despite having a much more natural feeling syntax, it supports things like pointers quite easily, though not yet as effectively as C, they are still there.
Freebasic is also in early development, and although its fairly young, its already quite powerful.

Share this post


Link to post
Share on other sites
Quote:
Original post by Ezbez
He might want to check out one of a handful of programs the let you create games(The Games Factory, Stagecast, Game Maker, etc.) if he is more into making games than learning programming.

Seconded.
I helped my brother (about the same age) with Game Maker a month or two back, and I was surprised at how powerful it actually was. It combines simple drag & drop functionality with the ability to "script" the game logic. It's basically like a small graphical programming language embedded in the program. I'd say it's a very good introduction to programming, especially for 9 year olds, who, to be honest, are more interested in making games than in learning the syntax for a programming language.

Share this post


Link to post
Share on other sites
Quote:
Original post by BleedingBlue
What I like about freebasic is that it keeps the simple basic language, like
*** Source Snippet Removed ***

Which I think is a much more obvious syntax then

*** Source Snippet Removed ***


Well, while it's true that BASIC has syntax that reads slightly more easily, in the long run that really doesn't help, because the goal is to write, rather than read, the syntax, and so it's really just a matter of whether you remember the word "integer" or "int" when you're writing the program. Also note than in your C code, there's really not much reason to do things like "anotherVar++" (you can do it exactly the way you did in your BASIC example, too) or use "char*" rather than the simpler std::string or omit the braces to open or close the if statement. From a beginners' standpoint, all of these things do nothing but add needless confusion.

If a nine year old can learn C++, then I'd say "why not" as this worked out perfectly well in my case. If C++ isn't what he wants, then you can go to simpler languages or game makers or whatever.

On the subject of game makers, the problem I had was flexibility. In general, I think they're a good thing, but they have limits. When I was learning to program, as soon as I stumbled upon a limitation or thought "years from now, this won't be able to do what I want, so why waste my time with it now?" and didn't bother with it.

Share this post


Link to post
Share on other sites
Standard ML.

EDIT: I guess I should qualify that. Standard ML is very strictly typed, meaning that once a program gets past the type checker, it will work with a decent probability (no messing around with debuggers to try to find what's causing a crash). It's also implicitly typed, the type system automatically infers the types for you (although you can explicitly state them if you like). It has an interactive top level. A 9 year old can start using it as a calculator almost immediately and then slowly work his way up from there. ML requires no manual memory management. It's a relatively small language, so few keywords need to be learned, yet, when the time comes, it has a powerful module system that will help properly structure programs.

[Edited by - MDI on November 12, 2005 7:21:40 AM]

Share this post


Link to post
Share on other sites
I think what I found good about QBASIC was that it was totally procedural - no worrying about event loops or anything even remotely complicated to start off with. Just SCREEN 13 and... well I've forgotten the keyboard input command, but getting going with a program which I could understand and see the results of, instead of having to copy-paste most of it and try not screw it up when I wanted something a bit different. In a lot of ways DOS programming was very easy to learn compared to Windows.

Share this post


Link to post
Share on other sites
I second FreeBASIC. It's a very powerful language, despite being young, and the syntax is quite simple. Also, you can use most of the APIs that C uses, and it also supports stuff like pointers, function pointers, etc. Also, OOP is planned for later releases.

I started with QBASIC when I was 9, also, and FB is so similar to QBASIC that for the most part, you hardly have to make changes. It's basically 32-bit QBASIC++.

Here is the compiler itself, but that's commandline, you can also get both the compiler and the IDE for it here.

There are some QBASIC tutorials here, but they will work with FB AFAIK.

Share this post


Link to post
Share on other sites
Quote:
Original post by cowsarenotevil
How motivated is he? If he just wants to make games and isn't profoundly interested in math/logic/etc. one of the various game maker tools might work. But if he's really interested in programming or wants to emulate the way professionals do it and you think he'll be able to remain motivated, not to mention extremely patient (programming can be very, very painful, and sometimes you just get completely stuck for a while), there's no reason to assume he can't start with C++. I was about 9 when I started learning C++ and somehow (I really don't know), I've held on to that motivation for six years.

It's important to have some guidance, though, which can be difficult if neither parent programs (unfortunately, elementary schools do not offer classes on programming). I actually got pretty lucky in this situation, because my older cousin had started taking programming classes in college shortly after I started trying to program, and I also stumbled upon the (now defunct) forums at cplusplus.com. I'm not sure I can really recommend online forums for a someone who's nine (particularly since this one has an age limit of 13. In some ways that bothers me, but it makes sense), but it worked for me (and I didn't get murdered by insane stalkers). Even so, I followed quite a few dead ends trying to learn (though I did learn things from all of them) and probably could easily have given up the whole thing.


I COMPLETELY did NOT read the whole thread. But accoring to the OP's problem, I totally agree with what I quoted.

If he wants to learn to program and make games(or just program, hehe) I suggest C++. I started with it from the beginning(11 years old, well, not exaclty 9...) and I'm still with it. Go C++. I have heard good things about python, too, though I never tried it.

If he is more into making games, try game maker or something.

EDIT: Dont try logo. Many say it's a good starter, and heck, in my high classes in elelmentary school they taught it. I wasnt in the high classes, but it's not that hard... But it's nowhere as good as C++.

EDIT2: No, C++ syntax is much, much, easier.

I reccomend that he try's some text's based games in C++. Then he should buy(well, not he, if he doesnt want to, but you) Beginning C++ Game Programming. This book teaches C++ from a gaming perspective, and you can learn many things from it. I learned from it. Once he buys the book he should try some things like a number guesssing game:

#include <iostream>

#include <ctime>
#include <cstdlib>

using std::cout;
using std::cin;

int main()
{
cout<<"\t\tNUMBER GUESSING\n\n";

cout<<"\t\tGUESS A NUMBER FROM 1 - 50!\n\n";

int guess = -1;

srand(time(NULL));

int theNum = (rand() % 50) + 1;

do
{
cout<<"Your guess: ";
cin>>guess;
cin.ignore();

if(guess < theNum)
cout<<"\nGo higher!\n";
if (guess > theNum)
cout<<"\nGo lower!\n";
}while(guess != theNum);

cout<<"\n\nYou got it!!!\n\n";

cin.get();
return 0;
}



(Note: If he wants to learn he should learn. When he learns a lot, he can write this game in less than 3 minutes[like me], too)

Good luck!

[Edited by - agi_shi on November 12, 2005 10:44:33 AM]

Share this post


Link to post
Share on other sites
I taught myself the basics of programming (loops, control structures etc), as well as english, with GW-BASIC on an 8086 when I was 9. What really helped were the gfx routines (SCREEN 2, LINE, CIRCLE etc) - otherwise I would have lost interest very quickly.

So, what I suggest is some version of BASIC (probably QBASIC, since it is very easy to use), and a good book. Another possibility might be Python with some gfx module, though it would probably be harder.

Share this post


Link to post
Share on other sites
Well, I'd say that good, old, plain C is a good idea. It was my first one, If I recall correctly I mastered it when I was 12. I found some book with big C (that was my brother's) and decided to read it, got interesed and eventually finished it. If he *is* motivated I'm sure he will manage. I'm would not recomend learning C++ straight away, IMO, it is harder than C. (classes, inheretance, vitrual functions, namespaces, templates).

Share this post


Link to post
Share on other sites
Quote:
Original post by Kiput
Well, I'd say that good, old, plain C is a good idea. It was my first one, If I recall correctly I mastered it when I was 12. I found some book with big C (that was my brother's) and decided to read it, got interesed and eventually finished it. If he *is* motivated I'm sure he will manage. I'm would not recomend learning C++ straight away, IMO, it is harder than C. (classes, inheretance, vitrual functions, namespaces, templates).


Not to start a flamewar, but C++ isnt harder.

C macros - C++ templated functions
C structs - C++ classes
C inheritance - C++ inheritance (this I'm not so sure, but I managed to inherit a struct from struc, so most likely it works).

C++ is just safer, with typesafety, rather than what macros use. And namespaces dont really make a difference, if you hate them you can just do using namespace foospace; and vuola!

Share this post


Link to post
Share on other sites
I learned BASIC when I was like 5-9 on a Commodore 64, in that time period I picked up QBasic and decided it was time to put in storage the ever so ancient Commodore 64. Unfortunatly there is much work involved making BASIC do anything fun and exciting.

Share this post


Link to post
Share on other sites
Quote:
Original post by agi_shi
and vuola!


Wow, that has to be the worst butchering of the word voilà I've seen. I have seen viola (which in french, is to rape, past tense), but putting a 'u' in the word is a first.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this