Teaching kids to program (in Java)

Discussion in 'Java' started by Mark, Apr 12, 2012.

  1. Mark

    Mark Guest

    Hi,

    Does anyone know any good resources to teach Java programming to kids.
    I know the theory but I don't know how to make it interesting for
    children. When they realize they won't be writing the next FPS game
    within the first half hour they often lose motivation ;-)
    --
    (\__/) M.
    (='.'=) If a man stands in a forest and no woman is around
    (")_(") is he still wrong?
    Mark, Apr 12, 2012
    #1
    1. Advertising

  2. Mark <> wrote:

    > Does anyone know any good resources to teach Java programming to kids.
    > I know the theory but I don't know how to make it interesting for
    > children. When they realize they won't be writing the next FPS game
    > within the first half hour they often lose motivation ;-)


    I don't know if it helps or not, but you might look at:

    http://webster.cs.washington.edu:8080/practiceit/

    -- glen
    glen herrmannsfeldt, Apr 12, 2012
    #2
    1. Advertising

  3. Mark

    Roedy Green Guest

    On Thu, 12 Apr 2012 09:12:39 +0100, Mark
    <> wrote, quoted or indirectly
    quoted someone who said :

    >
    >Does anyone know any good resources to teach Java programming to kids.
    >I know the theory but I don't know how to make it interesting for
    >children. When they realize they won't be writing the next FPS game
    >within the first half hour they often lose motivation ;-)


    I taught computer summer camp circa 1983 with spectacular results vis
    a vis motivation. I am sure I wrote an essay on my techniques, but I
    cannot find it.

    After interviewing each camper, I discovered they nearly all wanted to
    write video games. Astoundingly the 7 to 15 year olds wrote primitive
    ones in a week.

    I promised them I would not tell them anything that was not needed to
    write video games. They would have to trust me.

    I never demanded their attention for more than 15 seconds at a time.

    I presented everything as a puzzle to be solved, rather than methods
    to be memorised. They were NOT supposed to understand. I just gave
    hints. They have to figure it out. For example the opening exercise
    was to figure out what each of the keys on the keyboard did. They
    figured it all out far faster than I could have explained it to them,
    and without the tedium.

    I leaked information to advanced students. Other students seeing the
    benefits of this knowledge would chase me around demanding to be
    taught too. Some professional teachers went bug-eyed seeing some ten
    year olds DEMANDING to be taught trigonometry.

    Pandemonium is normal and should not be discouraged. I relaxed every
    normal rule of school I possibly could, including demanding respect.

    There were handouts in the form of simple program listings students
    could, key, understand and then do theme and variation. They never saw
    anything put properly commented structured code, and so it never
    occurred to them to write anything else. Visual elements, especially
    reusable visual element lead naturally to logical structure.

    The idea to start the student did almost nothing, but got a huge
    payoff, e.g. a giant flying helicopter. Over time to get more subtle
    control they had to master more and more. None of this boring learning
    to do arithmetic. That was left to the very end when they were
    motivated to demand it. Lots of use of canned random number generation
    to clone and randomly position.

    I had a dream team of tutors who worked with the kids. Mostly what
    they had to do was keep kids who were falling behind the others from
    freaking out. The kids expected so much of themselves.

    The kids were insanely motivated, pouring over listing every waking
    moment.

    I had some "experienced" older kids who were resistant to learning
    anything. I just let them go. It was so fun when the little kids
    quickly surpassed them and their spaghetti methods.

    I poured a jug of orange juice over one brat's head. I was legendary
    ever after ever though the backers were terrified the kid's parents
    would sue.

    We had spectacular food. Even the kids commented how good it was.
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com
    When you were a child, if you did your own experiment
    to see if it was better to put to cocoa into your cup first
    or the hot milk first, then you likely have the programmer gene..
    Roedy Green, Apr 12, 2012
    #3
  4. Mark

    David Lamb Guest

    On 12/04/2012 7:36 AM, Roedy Green wrote:
    > I presented everything as a puzzle to be solved, rather than methods
    > to be memorised. They were NOT supposed to understand. I just gave
    > hints. They have to figure it out. For example the opening exercise
    > was to figure out what each of the keys on the keyboard did. They
    > figured it all out far faster than I could have explained it to them,
    > and without the tedium.


    BTW, this is now standard educational theory even for university
    students; our Centre for Teaching and Learning is big on problem-centred
    learning, among many other ways of engaging students. The trouble for
    the OP is that Roedy doesn't have a textbook to point you at, nor do I.

    Since he's a freelance, I suppose you could hire him! :)
    David Lamb, Apr 12, 2012
    #4
  5. Mark

    Lew Guest

    Roedy Green wrote:
    > I taught computer summer camp circa 1983 with spectacular results vis
    > a vis motivation. I am sure I wrote an essay on my techniques, but I
    > cannot find it.
    >
    > After interviewing each camper, I discovered they nearly all wanted to
    > write video games. Astoundingly the 7 to 15 year olds wrote primitive
    > ones in a week.
    >
    > I promised them I would not tell them anything that was not needed to
    > write video games. They would have to trust me.
    >
    > I never demanded their attention for more than 15 seconds at a time.
    >
    > I presented everything as a puzzle to be solved, rather than methods
    > to be memorised. They were NOT supposed to understand. I just gave
    > hints. They have to figure it out. For example the opening exercise
    > was to figure out what each of the keys on the keyboard did. They
    > figured it all out far faster than I could have explained it to them,
    > and without the tedium.
    >
    > I leaked information to advanced students. Other students seeing the
    > benefits of this knowledge would chase me around demanding to be
    > taught too. Some professional teachers went bug-eyed seeing some ten
    > year olds DEMANDING to be taught trigonometry.
    >
    > Pandemonium is normal and should not be discouraged. I relaxed every
    > normal rule of school I possibly could, including demanding respect.
    >
    > There were handouts in the form of simple program listings students
    > could, key, understand and then do theme and variation. They never saw
    > anything put properly commented structured code, and so it never
    > occurred to them to write anything else. Visual elements, especially
    > reusable visual element lead naturally to logical structure.
    >
    > The idea to start the student did almost nothing, but got a huge
    > payoff, e.g. a giant flying helicopter. Over time to get more subtle
    > control they had to master more and more. None of this boring learning
    > to do arithmetic. That was left to the very end when they were
    > motivated to demand it. Lots of use of canned random number generation
    > to clone and randomly position.
    >
    > I had a dream team of tutors who worked with the kids. Mostly what
    > they had to do was keep kids who were falling behind the others from
    > freaking out. The kids expected so much of themselves.
    >
    > The kids were insanely motivated, pouring over listing every waking
    > moment.
    >
    > I had some "experienced" older kids who were resistant to learning
    > anything. I just let them go. It was so fun when the little kids
    > quickly surpassed them and their spaghetti methods.
    >
    > I poured a jug of orange juice over one brat's head. I was legendary
    > ever after ever though the backers were terrified the kid's parents
    > would sue.
    >
    > We had spectacular food. Even the kids commented how good it was.


    Don't worry about finding that essay; this one is fine. I am so in awe of your
    methods then, and courage to use them, that words fail me. Bravo.

    --
    Lew
    Honi soit qui mal y pense.
    http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg
    Lew, Apr 12, 2012
    #5
  6. Mark

    David Lamb Guest

    On 12/04/2012 4:12 AM, Mark wrote:
    > Does anyone know any good resources to teach Java programming to kids.


    I passed this question along to our intro programming profs and they
    uniformly said don't use Java. Recommendations included

    (a) Logo (presumably with turtle graphics)
    (b) Python. One example: http://coweb.cc.gatech.edu/mediaComp-plan/27
    (c) The Alice environment (Alice.org)
    David Lamb, Apr 12, 2012
    #6
  7. Mark

    David Lamb Guest

    David Lamb, Apr 12, 2012
    #7
  8. Mark

    Arne Vajhøj Guest

    On 4/12/2012 1:09 PM, David Lamb wrote:
    > On 12/04/2012 4:12 AM, Mark wrote:
    >> Does anyone know any good resources to teach Java programming to kids.

    >
    > I passed this question along to our intro programming profs and they
    > uniformly said don't use Java. Recommendations included
    >
    > (a) Logo (presumably with turtle graphics)
    > (b) Python. One example: http://coweb.cc.gatech.edu/mediaComp-plan/27
    > (c) The Alice environment (Alice.org)


    I would say that it depends a bit on the age of the kids.

    If they are old enough to learn serious math in school, then
    they are old enough to learn Java.

    Arne
    Arne Vajhøj, Apr 13, 2012
    #8
  9. Mark

    David Lamb Guest

    On 12/04/2012 7:16 PM, Arne Vajhøj wrote:
    > On 4/12/2012 1:09 PM, David Lamb wrote:
    >> On 12/04/2012 4:12 AM, Mark wrote:
    >>> Does anyone know any good resources to teach Java programming to kids.

    >>
    >> I passed this question along to our intro programming profs and they
    >> uniformly said don't use Java. Recommendations included
    >>
    >> (a) Logo (presumably with turtle graphics)
    >> (b) Python. One example: http://coweb.cc.gatech.edu/mediaComp-plan/27
    >> (c) The Alice environment (Alice.org)

    >
    > I would say that it depends a bit on the age of the kids.
    >
    > If they are old enough to learn serious math in school, then
    > they are old enough to learn Java.
    >


    Hmm. I suspect "old enough for serious math" might be a tad older in
    North America than in Dennmark.
    David Lamb, Apr 13, 2012
    #9
  10. Mark

    Roedy Green Guest

    On Thu, 12 Apr 2012 07:42:09 -0700, Lew <> wrote,
    quoted or indirectly quoted someone who said :

    >
    >Don't worry about finding that essay; this one is fine. I am so in awe of your
    >methods then, and courage to use them, that words fail me. Bravo.


    Kids ten years later would come up to me and tell me that week at
    summer camp had encouraged them to take up programming as a living.

    I started from a different premise. I was not teaching kids, I was
    trying to find a way to make them have a wonderful time involving
    computers. He had paid primarily to have fun.

    The problem is this style of teaching is utterly exhausting. I was
    burned out by the fourth week group.

    But from an efficiency point of view using student time, I have never
    seen anything like it. I had my exercises planned for the first
    group, but they had vacuumed them up in the first two days. Every
    night my team worked to prepare something to try to stay ahead of
    them.

    The big problem now is we bore students to death. Only a few of them
    are resilient enough to retain curiosity.

    We try to force students to learn things without convincing them first
    there is any practical use for the knowledge. This is really dumb.
    It is not just any practical use, but something THEY care about.

    I remember in grade 1 being motivated to read by a picture of a pet
    rabbit. I was convinced that once I learned to read, I would find out
    something terribly interesting about the rabbit. I was betrayed. All
    it said was something like Look look, see see.

    This is why I recommend Java students select a student project. It
    gives them emotional motivation to learn whatever they need to
    complete the project, rather than just learning syntax is isolation.

    --
    Roedy Green Canadian Mind Products
    http://mindprod.com
    When you were a child, if you did your own experiment
    to see if it was better to put to cocoa into your cup first
    or the hot milk first, then you likely have the programmer gene..
    Roedy Green, Apr 13, 2012
    #10
  11. Mark

    Roedy Green Guest

    On Thu, 12 Apr 2012 13:09:39 -0400, David Lamb <>
    wrote, quoted or indirectly quoted someone who said :

    >(a) Logo (presumably with turtle graphics)


    It is very important to be able to get a splashy result with a minimum
    of keystrokes or understanding to start. In Forth you can have a
    HELICOPTERS verb that draws N helicopters at random locations and
    colours. You need to temporarily be able to hide the messy details.

    Totaling up a column of figures is a lot of work for very little
    emotional reward.
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com
    When you were a child, if you did your own experiment
    to see if it was better to put to cocoa into your cup first
    or the hot milk first, then you likely have the programmer gene..
    Roedy Green, Apr 13, 2012
    #11
  12. Mark

    Roedy Green Guest

    On Thu, 12 Apr 2012 20:36:12 -0400, David Lamb <>
    wrote, quoted or indirectly quoted someone who said :

    >
    >Hmm. I suspect "old enough for serious math" might be a tad older in
    >North America than in Dennmark.


    The "trigonometry" the kids wanted me to teach them was a set routines
    that could plot trig functions. They could experiment to see the
    effects of amplitude, period and phase to simulate ocean waves.

    I suspect though when these kids finally did get to learning trig,
    they would approach it more eagerly than had they not been exposed to
    my "leaking".

    Another trick I would use is leaking to a discouraged student. He/she
    would embed the trick is his creation. Other kids would see it and
    demand to know how it was done. He could lord it over them.
    One poor kid known as "Rockfish" was the recipient of the trig
    plotting methods."

    At one point I explained to "Rockfish" that such fish were extremely
    tough. They could live out of water for long periods of time, and were
    just about impossible to kill by bonking them. So it was not that
    dishonourable an epithet. That seemed to do the trick.

    Dealing with discouraged kids was a major part of what we did.
    They are so competitive and so tough on themselves. It was made worse
    by the direct competition of 7 year olds with 15 year olds.

    --
    Roedy Green Canadian Mind Products
    http://mindprod.com
    When you were a child, if you did your own experiment
    to see if it was better to put to cocoa into your cup first
    or the hot milk first, then you likely have the programmer gene..
    Roedy Green, Apr 13, 2012
    #12
  13. Leif Roar Moldskred <> wrote:

    (snip)
    > In my not particularly humble opinion, Java is too crufty to make for
    > a good _introductory_ language. There are too many old sins and too
    > many idiosyncrasies in the language that are likely to confuse or
    > stump someone who doesn't already know how to program.


    Compared to what? How about Fortran or C?

    > (Why isn't the first element of an array at position 1? What's the
    > difference between int and Integer? Why doesn't System.out.println(
    > "Value: " + 01234 ) work? Why do I get a NullPointerException on the
    > line "System.out.println( factorial( inputValue ) );"? What _is_ a
    > Null Pointer, anyway?)


    Many languages have parts that make them hard to use, and hard
    to learn, but we do it anyway.

    -- glen
    glen herrmannsfeldt, Apr 13, 2012
    #13
  14. Mark

    Rui Maciel Guest

    Leif Roar Moldskred wrote:

    > In my not particularly humble opinion, Java is too crufty to make for
    > a good introductory language. There are too many old sins and too
    > many idiosyncrasies in the language that are likely to confuse or
    > stump someone who doesn't already know how to program.
    >
    > (Why isn't the first element of an array at position 1?


    The term "array" refers to a collection of objects which were allocated in a
    continuous memory segment. A reference to an array points to the first
    object of the array. The array index represents the offset with regards to
    the first element. So, index 0 means a zero offset from the first object of
    the array (i.e., address of first object in the array), index 1 refers to
    the object which is 1 object size after the first object (address of first
    object + 1 object size), array 2 is two objects, and so on.

    This isn't an "old sin" or an idiosyncrasy. It's exactly what the
    programmer intends to do. If the programmer isn't aware of that then it
    isn't a shortcoming of the programmer language; it reflects a lack of
    understanding regarding what he is doing and what he is trying to do. And
    this does not mean that the language doesn't make for a good introductory
    language.


    > What's the difference between int and Integer?


    The former is a primitive, while the latter is a reference to an object of
    type Integer. This is covered in any introductory tutorial.


    > Why doesn't System.out.println(
    > "Value: " + 01234 ) work?


    Why do you believe it doesn't work? You've used an octal integer literal to
    express the value of an integer number. You get exactly what you asked for.


    > Why do I get a NullPointerException on the
    > line "System.out.println( factorial( inputValue ) );"?


    You have to be a bit clearer with that, as you haven't defined inputValue or
    factorial().


    > What is a Null Pointer, anyway?)


    I don't believe it is reasonable to accuse any programming language of being
    "too crufty to make for a good introductory language" if the only problem
    which has been pointed out boils down to ignorance regarding how to use that
    programming language. No programming language, no matter how appropriate it
    might be as an introductory language, enables you to write any code without
    first learning how to do it.


    Rui Maciel
    Rui Maciel, Apr 13, 2012
    #14
  15. Mark

    Stefan Ram Guest

    Leif Roar Moldskred <> writes:
    >(Why isn't the first element of an array at position 1?


    http://www.purl.org/stefan_ram/pub/zero

    >What's the difference between int and Integer?


    Java does not define a difference of types.

    >What _is_ a Null Pointer, anyway?)


    A reference r with r==null.
    Stefan Ram, Apr 13, 2012
    #15
  16. On Fri, 13 Apr 2012 14:06:28 +0100, Rui Maciel <>
    wrote:

    >Leif Roar Moldskred wrote:


    [snip]

    >> Why doesn't System.out.println(
    >> "Value: " + 01234 ) work?

    >
    >Why do you believe it doesn't work? You've used an octal integer literal to
    >express the value of an integer number. You get exactly what you asked for.


    No, he got exactly what the language spec says he should get.

    It is not obvious to anyone who has not run across it before what
    is happening in this case. Leading zeroes are used in the RW, and
    never mean octal (that I have ever seen).

    [snip]

    Sincerely,

    Gene Wirchenko
    Gene Wirchenko, Apr 13, 2012
    #16
  17. On 4/13/2012 9:07 AM, Leif Roar Moldskred wrote:
    > You'll never see a mathematican refer to the 0th element of an array
    > or vector. Zero-based arrays most certainly are an idiosyncrasy of
    > programming languages -- which sometimes, such as for C, makes
    > sense. For a programming language that does arrays right, look to Ada.


    I see lots of references to things like x_0 in mathematics. It really
    comes down to "is 0 the first natural number or is 1 the first natural
    number?" Edgar Dijkstra (I believe) once laid out his opinion of array
    indexing and arrived at the conclusion that 0 <= i < n is the most
    natural way to do for-loop-iteration, so array indexing should start at
    0 and not 1. The argumentation, IIRC, boils down roughly as follows:
    1. [start, start + length) is the most natural bound
    2. Length should be a simple expression, i.e., n
    3. Using (<=, <) as your pair of comparison most clearly indicates the
    use of [a, b) notation
    4. Thus, start <= i < start + n is the appropriate notation.
    5. When the start is the beginning of the array, start + n should just be n
    6. So start should be 0, and we get 0 <= i < n

    There are occasionally places where 1-based indexing makes more sense
    (array-based heap notations are a particularly well-known example), but
    I'm not sure that giving programmers the ability to choose array bounds
    is the best option.

    Also, FWIW, the convention of 1 being the "first" number isn't totally
    universal: the Mayans started from 0. And they were arguably the best
    mathematicians of their time.

    >> I don't believe it is reasonable to accuse any programming language of being
    >> "too crufty to make for a good introductory language" if the only problem
    >> which has been pointed out boils down to ignorance regarding how to use that
    >> programming language. No programming language, no matter how appropriate it
    >> might be as an introductory language, enables you to write any code without
    >> first learning how to do it.


    So we should start by teaching everyone APL, right? :)

    The problem is that discussing a basic Hello World in Java requires, at
    a minimum, handwaving the public class HelloWorld, the public static
    void main, System.out.println, and the entire compilation procedure. If
    you don't handwave, you have to give a lengthy amount of time to
    explaining how object-oriented programming works before you can begin
    discussing programming. You also very quickly get to bugaboos with
    explicit typing, doing I/O (reading from stdin is surprisingly
    complicated in Java), collections (generics is complicated enough for
    seasoned programmers; for those just starting a few weeks ago, it's an
    imposing cliff).

    --
    Beware of bugs in the above code; I have only proved it correct, not
    tried it. -- Donald E. Knuth
    Joshua Cranmer, Apr 13, 2012
    #17
  18. On 12-04-12 11:42 AM, Lew wrote:
    > Roedy Green wrote:
    >> I taught computer summer camp circa 1983 with spectacular results vis
    >> a vis motivation. I am sure I wrote an essay on my techniques, but I
    >> cannot find it.

    [ SNIP ]

    >
    > Don't worry about finding that essay; this one is fine. I am so in awe
    > of your methods then, and courage to use them, that words fail me. Bravo.
    >

    I agree. The hell of it is, that's how I solve a lot of problems as a
    professional developer: the client presents a problem and describes a
    desired outcome, and I figure out how to best do it. I'd say that's how
    most developers work.

    So why not teach programming the same way?

    AHS
    --
    A fly was very close to being called a "land," cause that's what they do
    half the time.
    -- Mitch Hedberg
    Arved Sandstrom, Apr 14, 2012
    #18
  19. On 4/13/2012 6:03 AM, Leif Roar Moldskred wrote:
    > Arne Vajhøj<> wrote:
    >>
    >> I would say that it depends a bit on the age of the kids.
    >>
    >> If they are old enough to learn serious math in school, then
    >> they are old enough to learn Java.

    >
    > In my not particularly humble opinion, Java is too crufty to make for
    > a good _introductory_ language. There are too many old sins and too
    > many idiosyncrasies in the language that are likely to confuse or
    > stump someone who doesn't already know how to program.
    >
    > (Why isn't the first element of an array at position 1? What's the
    > difference between int and Integer? Why doesn't System.out.println(
    > "Value: " + 01234 ) work? Why do I get a NullPointerException on the
    > line "System.out.println( factorial( inputValue ) );"? What _is_ a
    > Null Pointer, anyway?)


    I don't think that is different from so many other things kids
    learn in school.

    When you do math there are certain rules and conventions.

    Natural languages has certain rules and conventions.

    Arne
    Arne Vajhøj, Apr 14, 2012
    #19
  20. Mark

    Arne Vajhøj Guest

    On 4/13/2012 10:27 AM, Leif Roar Moldskred wrote:
    > glen herrmannsfeldt<> wrote:
    >> Leif Roar Moldskred<> wrote:
    >>
    >> (snip)
    >>> In my not particularly humble opinion, Java is too crufty to make for
    >>> a good _introductory_ language. There are too many old sins and too
    >>> many idiosyncrasies in the language that are likely to confuse or
    >>> stump someone who doesn't already know how to program.

    >>
    >> Compared to what?

    >
    > Compared to languages with cleaner designs and to languages
    > specifically targeted at teaching programming. I'd easily choose
    > Pascal or (a subset of) Ada over Java for this purpose, and probably
    > even Lisp or Smalltalk.


    Pascal is a pretty good language for learning to program.

    It should be a very small subset of Ada to be good. Ada is way
    more complex than Java.

    >> How about Fortran or C?

    >
    > It's been too long since I worked with Fortran and I don't know
    > anything about the modern Fortrans, so I can't say. Possibly for
    > students who already works with matrices in math, but I suspect that
    > for those cases Matlab (or something similar) would be a better match.
    >
    > I think the core language of C is small enough that it might work
    > well, as long as the course is targetting low-level hardware (such as
    > an Arduino board) rather than desktop I/O.


    C is rather simple.

    But explaining what is going on with incorrect programs
    is not so fun.

    >> Many languages have parts that make them hard to use, and hard
    >> to learn, but we do it anyway.

    >
    > Sure, but that's not the point. I have nothing against Java as a
    > general programming language. It's just not a particularly good
    > language to use to teach someone basic programming. It's both too big
    > and has too many quirks and kinks to make for a good introduction.


    Medium size language with huge standard library.

    I would say less quirks than most languages.

    Arne
    Arne Vajhøj, Apr 14, 2012
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Strangle More Gay Priests

    Re: A question for the computer/web programmer kids...

    Strangle More Gay Priests, Aug 27, 2003, in forum: HTML
    Replies:
    0
    Views:
    379
    Strangle More Gay Priests
    Aug 27, 2003
  2. Paul Paterson
    Replies:
    0
    Views:
    382
    Paul Paterson
    Aug 30, 2003
  3. John J. Lee
    Replies:
    2
    Views:
    323
    John J. Lee
    Aug 30, 2003
  4. Ed Stoner
    Replies:
    1
    Views:
    367
    John J. Lee
    Sep 2, 2003
  5. Stefan Ram

    Teaching Java, teaching what?

    Stefan Ram, Dec 8, 2013, in forum: Java
    Replies:
    57
    Views:
    507
    Ali Sh
    Dec 18, 2013
Loading...

Share This Page