What's a good way to teach my son to program Java [closed]

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.

Asked by: Charlie171 | Posted: 28-01-2022

Answer 1

You may find some inspiration in this project:

Teaching Kids Programming: Even Younger Kids Can Learn Java

Java Programming for Kids, Parents and Grandparents.

You can find here at the faratasystems web site (direct link here)

Amongst the lessons learned during such a project, the author mentions:

  • Most of the programming tasks require minimal knowledge of arithmetic and algebra skills. To start programming, a kid needs to understand what x = y+2 means. Another important concept to understand is an if statement.

  • Kids develop the abstract reasoning abilities by the fourth-fifth grade, and they also easily perform such tasks as browsing the Web, downloading and installing software. Dave have learned how to type, compile and run Java programs in Eclipse IDE in no time.

  • Kids learn much faster than adults, but they do not have "previous programming experience", which may actually be a good thing, because they do not have to switch from a procedural to object-oriented way of thinking. After learning about inheritance, Dave called my wife a superclass.

  • Adults are responsible creatures, and they can keep doing boring operations much longer that kids. Programming lessons with kids have to be short. One or two 45-minute lessons per week is enough. High school kids should be able to study more, but I do not have such experience yet.

  • Illustrations help. In my book I've included lots of color cartoon-like characters that are like a Java-fabric softener.

  • Kids like to see immediate results and enjoy playing with shorter programs, for example a class Fish has a method dive(int howDeep). Let me try to call this method several times with different arguments...

  • Graphical programming is the most fun, and even a fairly large program like Calculator, Tic-Tac-Toe or Ping Pong can be explained to children.

Answered by: Abigail285 | Posted: 01-03-2022

Answer 2

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.

Answered by: Wilson733 | Posted: 01-03-2022

Answer 3

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

Answered by: Stella919 | Posted: 01-03-2022

Answer 4

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)

Answered by: Emily835 | Posted: 01-03-2022

Answer 5

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

alice - teaching programming in 3d

Answered by: Paul716 | Posted: 01-03-2022

Answer 6

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.

Answered by: Edgar762 | Posted: 01-03-2022

Answer 7

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/

Answered by: Chelsea869 | Posted: 01-03-2022

Answer 8

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

Answered by: Anna991 | Posted: 01-03-2022

Answer 9

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.

Answered by: Julian771 | Posted: 01-03-2022

Answer 10

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.

Answered by: Oliver510 | Posted: 01-03-2022

Answer 11

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

Answered by: John435 | Posted: 01-03-2022

Answer 12

I randomly noticed today that Sun/Oracle 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.

Answered by: Miranda293 | Posted: 01-03-2022

Answer 13

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

Answered by: Ted518 | Posted: 01-03-2022

Answer 14

Once you got your son started you can try CodeInvaders, competition can be very useful to get him thinking, maybe even father-son competition.

CodeInvaders @ IBM

Answered by: Maya322 | Posted: 01-03-2022

Answer 15

This question is similar to https://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.

Answered by: Dexter563 | Posted: 01-03-2022

Similar questions

swing - Java program won't run, I've no clue what's wrong

I've been trying to figure out why this Java program I am trying to run won't do it. It's not finished yet, but I'm just trying to make sure I got all the GUI aspects the way I want them to be. Netbeans wont even tell me whats going on no matter what I do, but it will run other programs just fine. package TheGameCorner; import java.awt.*; import java.awt.event.*; import java.util.Random; import javax.swin...

what's wrong with my java program?

Closed. This question does not meet Stack Overflow guid...

java - What's the proper way to write this program?

I'm writing a program that allows your to enter four numbers & print out two pairs, if the input consists of two matching pairs. I know that arrays is the quicker way to perform this but I am not allowed to use them. Here's my code so far: new scan = new Scanner(System.in) int n1 = input.nextInt(); int n2 = input.nextInt(); int n3 = input.nextInt(); int n4 = input.nextInt(); System.out.print("P...

java - What's wrong with my program?

This question already has answers here:

java - Can you please help in what's going wrong in my last for loop of this array program

This question already has answers here:

Why can't my Java program read Perl's STDERR?

We have a Perl program to validate XML which is invoked from a Java program. It is not able to write to standard error and hanging in the print location. Perl is writing to STDERR and a java program is reading the STDERR using getErrorStream() function. But the Perl program is hanging to write to STDERR. I suspect Java function is blocking the STDERR stream completely and Perl is waiting for this stream to be rele...

java - what does it mean when a bug doesn't crash the program

Sometimes Eclipse comes up saying "hey you should debug this line!!!" but doesn't actually close the program. I can then continue to play big two, and even go through the same events that caused the error the first time and get another error box to pop up! The bug is simple, I'll fix it, I just want to know why some bugs are terminal and some are not? What's the difference?

scala -> use .net (linq) and java code base in the same program?

Newbie here...can I write one program which incorporates .NET LINQ and also various Java frameworks in the same scala program? Or when I compile, at that time the decision is made either one or the other, .NET or Java Thanks.

java - How can I get this program to also print the first entry in the list too?

I can't display the first entry from my query that returns multiple answers. For example, a search with a result set of five will return the second to fifth and miss the first entry. If I search for something that has one entry as output it doesn't return anything but just hangs because it is the first and only entry in the database. When I debug it and search for something that I know has only one entry in the DB, it g...

java - please tell me where i made error in this jsp program

<%@ page import="java.io.*" %> <%-- <%@ page contentType="text/html;charset=ISO-8859-1" %> --%> <% int iLf = 10; char cLf = (char)iLf; File outputFile = new File(generate.xml); outputFile.createNewFile(); FileWriter outfile = new FileWriter(outputFile); outfile.write(" <?xml version='1.0' encoding='UTF-8'?> "+cLf); outfile.write(" <playlist version='1' xmlns = 'http://xspf.org/ns/0/' &...

How would you read image data in from a program like Image Magick In Java?

I am working with ImageMagick and am wondering what the best way to read image data in from StdOut of the ImageMagick process. I an invoking the command to the process like so: /opt/local/bin/convert -resize 8000@ - - and then piping a byte array to the process for processing. what is the best way to read data from a process like this?

java program to divide an image file into 4 parts

I want to divide an image file into 4 parts using java i tried it but i am getting exceptions and also i want to store all the pixel values of image into an array. for this i used pixel grabber class but of no use.please help me

java swing program with multi lingual support

I want to create a TextArea in java where i can write data in chinese. How can I achieve this Thanks Bapi

Java socket program unable to read large amount of data at a time

I have written a socket program using read() and write(). Whenever I want to send large data using write(). I am unable to recieve data at a time. Means my data is divided into two sections so how can I send large amount of data? or read the data at 1 time? Also I am unable to know whether this is the problem of write() or read() Thanks Bapi

java - Why does my Jnlp program not working with log4j?

I have the following problem: I've deployed in Tomcat a JNLP and an executable JAR files. JNLP file should automatically download the JAR file and execute it. The JAR file is signed and verified. This is done (the downloading part). But when to execute the JAR main class (specified in the JNLP file), a problem occurs: A part of the main class code is executed. Afterwards, when it tries to load a class that has a static fin...

Still can't find your answer? Check out these amazing Java communities for help...

Java Reddit Community | Java Help Reddit Community | Dev.to Java Community | Java Discord | Java Programmers (Facebook) | Java developers (Facebook)