views:

1680

answers:

15

OK, so I've read through various posts about teaching beginner's to program, and there were some helpful things I will look at more closely. But what I want to know is whether there are any effective tools out there to teach a kid Java specifically?

I want to teach him Java specifically because (a) with my strong background in C I feel that's too complex, (b) Java is the other language I know extremely well and therefore I can assist meaningfully without needing to teach myself a new but (to me) useless language, and (c) I feel that managed languages are the future, and lastly (d) Java is one of the simplest of all the languages I know well (aside from basic).

I learned in basic, and I am open to teaching that first, but I am unaware of a decent free basic shell for Windows (though I haven't really searched, yet since it's not my first choice), and would anyway want to progress quickly to Java.

My son is 8, so that's a couple of years earlier than I started - but he has expressed an interest in learning to program (possibly because I work from home a lot and he sees me programming all the time).

If no-one can suggest a tool designed for this purpose, I will probably start him off with text/console based apps to teach the basics, and then progress to GUI building.

Oh, one last thing, I am not a fan of IDE's (old school text editor type), so I would not be put off at all by a system that has him typing real code, and would likely prefer that to a toy drag/drop system.

EDIT: Just to clarify; I really am specifically after ways to teach him Java; there are already a good many posts with good answers for other language alternatives - but that's not what I am looking for here.

EDIT: What about Java frameworks for 2D video games - can anyone recommend any of them from personal experience? I like the idea of him starting with the mechanics in place (main game loop, scoring, etc) and adding the specifics for a game of his own imagining - that's what I did, though for me it was basic on a Commodore VIC-20 and a Sinclair ZX-81.

+17  A: 
VonC
This looks interesting - thanks. Downloading the PDF eBook now.
Software Monkey
Wow very cool, I especially enjoy the graphic packed post :)
Cervo
Wish I could mark multiple answers as the "accepted" answer!
Software Monkey
No problem: with the upvotes, this answers will be right after the one you choose :) Plus, they are other interesting points in other answers below.
VonC
+2  A: 

Find something that would be interesting to him as a project, particularly if you can work out a way of it not involving a GUI. I believe that GUIs help to get people interested, but they're fundamentally hard - trying to learn both a GUI framework and a language at the same time is too much, IMO. I like console programs - a short console program has everything right in front of you, so you can understand every single character relatively easily.

For instance, if he's interested in football you might have a text file with results in, and make a project which read in the data, worked out who had how many points etc.

EDIT: Another thing to think about based on VonC's point about "let's try ..." - perhaps start with an interactive language such as Groovy (which is very like Java) or find a "Java shell" of some description to allow your son to "explore" the language by executing things immediately.

I'll be very interested to watch this thread - I really want to teach my kids to program in a few years, and I'd like to write an introductory C# book before then...

Jon Skeet
I just found the link to the ebook on java I mentioned in my answer. That document may be of interest for your c# project...
VonC
I have looked at Groovy myself in recent months; it's similarity to Java and ability to interact with existing Java libraries is attractive to me - this is a good alternative in my mind, and I will give it some thought.
Software Monkey
+3  A: 

I know you asked for Java, but I am going to go out on a limb and suggest looking at the Ruby-based Shoes: http://shoooes.net/ and http://hackety.org/press/

I believe it was originally written as a teaching aid.

If I was a kid learning to program, this would interest me.

AlexJReid
A: 

This question is similar to http://stackoverflow.com/questions/165905/how-and-when-do-you-teach-a-kid-to-code#165909.

My oldest is also 8 and I know he has the right brain for programming but he takes his time. I think you should keep the assignments small but they must have early results. Else they can get disapointed.

Gamecat
+3  A: 

i would try python because
1) Python comes with a decent REPL - Idle .. rather than writing long files of code, javacing and then javaing it.. having your expression evaluated the moment you put it in might better suit the attention span of an eight-year old... u can still make functions and modules and stuff.. but in a more interactive environment
2) python does not have strict typing and allows you to play with dictionaries and variable-sized linked-lists with very little syntax.. that way.. you could teach him some of the big ideas behind programming first and leave learning lots of syntax for later when he is already very involved in this stuff
check out http://openbookproject.net//thinkCSpy/

adi92
+10  A: 

Have you looked into BlueJ? I know you said you're leaning against IDE's but it is an IDE specifically geared towards teaching Java. Also it seems to have some things that an 8 year old might find cool like graphical representations of class structures.

That's the kind of thing I am after - thanks.
Software Monkey
This looks very promising - wish I could up-vote more than once!
Software Monkey
Actually, Greenfoot, by the same people, is perfect for an 8 year old.
Software Monkey
+3  A: 

I know its not java but a friend of mine homeschools his kids and he's using

alice - teaching programming in 3d

Scott Cowan
it does use java under the hood: http://en.wikipedia.org/wiki/Alice_(software)
Ray Tayek
cool I don't have kids yet or I'd be asking this too
Scott Cowan
+1  A: 

I suggest "Programming Video Games For The Evil Genius" by Ian Cinnamon. The author was 15 at the time he wrote the book..... Anyway the book is relatively easy to follow and teaches you how to do some gamelike things with Java. Because let's be honest, most kids want to make video games. Back when I was 10 or so I was making Visual Basic programs that were text based adventure games. This dream of making video games sticks throughout high school. Anyway the book shows a lot that you can do with Java on that front.... Nevermind what a 29 year old would be doing with a book written by a 15 year old whistle. I was 28 when I bought it......

Anyway Java having so many libraries makes it fairly easy to get graphics up. Qbasic had sucky graphics but it had fairly simple calls to turn pixels on and off and draw lines and when I was 12 or 13 a lot of us would just make weird effects with the graphics in QBasic using loops, etc... While it was a complete waste of time, it further helped to strengthen the concepts of iteration, arrays, etc....

So anyway based on my experience and the experience of my friends who could program at the time, I'd say kids like bells and whistles graphic effects and to create video games. Even text games count. The fact that Java has tons of libraries that do a lot and free the programmer from the implementation details means that if Java was around when I was that young, I would probably have been tinkering with it. Add in a book written by a 15 year old on simple video games in Java (note he's not a normal 15 year old, the kid was a Sophomore at college at the time....so think Child Prodigy) and you have a recipe to hook your kids interest.

If Java's verbosity is too much to keep your kid's interest, try Python. I think I remember seeing a library for making 2d games there....... But at the very least it can probably make much better text adventure games than qbasic :)

Cervo
Again, just what the doctor ordered - thanks.
Software Monkey
+3  A: 

I'd go for scheme. Anyway, take a look on this site, it has some Java and pedagogical resources: http://www.teach-scheme.org/

A: 

Once you got your son started you can try codeinvaders, competition can be very usefull to get him thinking, maybe even father sun competition

[link text][1]

[1]: http://www.alphaworks.ibm.com/tech/codeinvaders CodeInvaders

Peter
+6  A: 

I think Greenfoot is better than BlueJ, for 8-years old. It is developed by the same people that made Bluej, but it is way more graphical, still allowing full Java programming of the applications.

http://www.greenfoot.org/getting-started/ 1- download and install JDK 2- then download and install greenfoot, and you are ready to start 3- check out the nice and easy tutorial CrabWorld: http://www.greenfoot.org/scenarios/files/crab.zip

I recently used GreenFoot to discuss Java programming in a very short introductory course for high-school students at our university: http://aaue.dk/~av/brobygning2008-software/ (if it could be of any use).

If supporting Java is not a fundamental feature, you could also try MIT's scratch (a stand-alone version of squeak): http://scratch.mit.edu/ It is very good for starting, and I used it 2 months ago in a PR activity involving 2 13-years old. After less than 1 day of fiddling with scratch they made their own videogame: http://aaue.dk/~av/personal.html (the "Damn" game, they called it like that :> ) but it is programmed in its own (visual) programming language...

Andrea
+1  A: 

There is an interesting Google Tech Talk on Teching Kids to Code - it covers a piece of software called Greenfoot which is an introductory programming tool that uses Java. It uses drag-and-drop and other visual methods of interacting with classes.

Colonel Sponsz
My next step is to play with Greenfoot and BlueJ myself and see what I think; Greenfoot, on the surface, seems like it might be a nice compromise between instant gratification and actually writing real code.
Software Monkey
+1  A: 

I randomly noticed today that Sun has a page dedicated to young developers. I thought it might be a useful reference page.

It has links to BlueJ, Alice, and Greenfoot (all already discussed), as well as a couple of other resources.

Joshua McKinnon
+1  A: 

I would not start a child with Java. Teach him something more conceptually clean first. Something like LISP, or Logo. Logo is a surprisingly powerful programming language, and it's a blast to learn since it's visually engaging right out of the box.

Apocalisp
I can't stand LISP and wouldn't wish it on my worst enemy, much less my own son.
Software Monkey
You are a sad and strange little man.
Apocalisp
Why? Because I disagree with you? If I wanted to teach my son a functional language, it would most likely be Haskell, or one of the others which does not have syntax from the dark-ages.
Software Monkey
No, because you believe in fairy tales like the distinction between "functional languages" and otherwise. For a LISP with a nicer syntax, try Logo, or Python, or Ruby. Inflicting Java on a beginner is just cruel. A child doubly so.
Apocalisp
+1  A: 

Just make the learning fun and all the rest will follow ! Amazingly Scala might be the easiest language if you try Kojo (Scala is better Java, you have access to all Java libraries of course)

Łukasz Lew
I tried Kojo, and it *is* excellent. As well as installing it on my son's laptop, I've put it on mine to learn Scala.
Software Monkey
Don't forget the book: http://www.kogics.net/sf:kojo-ebooks.It was emphasized by author that it is important as Kojo is not yet self-documenting enough.
Łukasz Lew