Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #13493 > unrolled thread

Teaching kids to program (in Java)

Started byMark <i@dontgetlotsofspamanymore.invalid>
First post2012-04-12 09:12 +0100
Last post2012-04-13 17:59 -0700
Articles 10 on this page of 50 — 15 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  Teaching kids to program (in Java) Mark <i@dontgetlotsofspamanymore.invalid> - 2012-04-12 09:12 +0100
    Re: Teaching kids to program (in Java) glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-12 08:28 +0000
    Re: Teaching kids to program (in Java) Roedy Green <see_website@mindprod.com.invalid> - 2012-04-12 04:36 -0700
      Re: Teaching kids to program (in Java) David Lamb <dalamb@cs.queensu.ca> - 2012-04-12 09:47 -0400
      Re: Teaching kids to program (in Java) Lew <noone@lewscanon.com> - 2012-04-12 07:42 -0700
        Re: Teaching kids to program (in Java) Roedy Green <see_website@mindprod.com.invalid> - 2012-04-12 19:41 -0700
        Re: Teaching kids to program (in Java) Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-04-13 21:22 -0300
      Re: Teaching kids to program (in Java) Mark <i@dontgetlotsofspamanymore.invalid> - 2012-04-16 13:53 +0100
    Re: Teaching kids to program (in Java) David Lamb <dalamb@cs.queensu.ca> - 2012-04-12 13:09 -0400
      Re: Teaching kids to program (in Java) David Lamb <dalamb@cs.queensu.ca> - 2012-04-12 13:28 -0400
      Re: Teaching kids to program (in Java) Arne Vajhøj <arne@vajhoej.dk> - 2012-04-12 19:16 -0400
        Re: Teaching kids to program (in Java) David Lamb <dalamb@cs.queensu.ca> - 2012-04-12 20:36 -0400
          Re: Teaching kids to program (in Java) Roedy Green <see_website@mindprod.com.invalid> - 2012-04-12 19:55 -0700
        Re: Teaching kids to program (in Java) Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-04-13 05:03 -0500
          Re: Teaching kids to program (in Java) glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-13 10:14 +0000
            Re: Teaching kids to program (in Java) Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-04-13 09:27 -0500
              Re: Teaching kids to program (in Java) Arne Vajhøj <arne@vajhoej.dk> - 2012-04-13 20:42 -0400
                Re: Teaching kids to program (in Java) glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-14 02:08 +0000
                  Re: Teaching kids to program (in Java) Arne Vajhøj <arne@vajhoej.dk> - 2012-05-05 20:13 -0400
                    Re: Teaching kids to program (in Java) Martin Gregorie <martin@address-in-sig.invalid> - 2012-05-06 12:06 +0000
                      Re: Teaching kids to program (in Java) Arne Vajhøj <arne@vajhoej.dk> - 2012-05-06 11:38 -0400
          Re: Teaching kids to program (in Java) Rui Maciel <rui.maciel@gmail.com> - 2012-04-13 14:06 +0100
            Re: Teaching kids to program (in Java) Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-04-13 09:07 -0500
              Re: Teaching kids to program (in Java) Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-04-13 09:53 -0500
              Re: Teaching kids to program (in Java) Joshua Cranmer <Pidgeot18@verizon.invalid> - 2012-04-13 10:55 -0500
            Re: Teaching kids to program (in Java) Gene Wirchenko <genew@ocis.net> - 2012-04-13 08:39 -0700
              Re: Teaching kids to program (in Java) Arne Vajhøj <arne@vajhoej.dk> - 2012-04-13 20:47 -0400
                Re: Teaching kids to program (in Java) Gene Wirchenko <genew@ocis.net> - 2012-04-15 20:05 -0700
                  Re: Teaching kids to program (in Java) Arne Vajhøj <arne@vajhoej.dk> - 2012-04-17 22:11 -0400
                    Re: Teaching kids to program (in Java) Gene Wirchenko <genew@ocis.net> - 2012-04-17 19:57 -0700
                      Re: Teaching kids to program (in Java) Arne Vajhøj <arne@vajhoej.dk> - 2012-04-18 19:20 -0400
                        Re: Teaching kids to program (in Java) Gene Wirchenko <genew@ocis.net> - 2012-04-18 18:03 -0700
                          Re: Teaching kids to program (in Java) Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-04-19 20:15 -0300
                            Re: Teaching kids to program (in Java) Gene Wirchenko <genew@ocis.net> - 2012-04-19 20:08 -0700
                              Re: Teaching kids to program (in Java) Lew <lewbloch@gmail.com> - 2012-04-20 12:43 -0700
                                Re: Teaching kids to program (in Java) Patricia Shanahan <pats@acm.org> - 2012-04-20 12:58 -0700
                                Re: Teaching kids to program (in Java) Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-04-20 15:20 -0500
                                Re: Teaching kids to program (in Java) Gene Wirchenko <genew@ocis.net> - 2012-04-20 13:30 -0700
                                  Re: Teaching kids to program (in Java) Arne Vajhøj <arne@vajhoej.dk> - 2012-05-05 20:23 -0400
                                    Re: Teaching kids to program (in Java) Martin Gregorie <martin@address-in-sig.invalid> - 2012-05-06 12:22 +0000
                                      Re: Teaching kids to program (in Java) Arne Vajhøj <arne@vajhoej.dk> - 2012-05-06 11:36 -0400
                                      Re: Teaching kids to program (in Java) glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-05-06 17:10 +0000
                                    Re: Teaching kids to program (in Java) Gene Wirchenko <genew@ocis.net> - 2012-05-07 09:43 -0700
                                      Re: Teaching kids to program (in Java) Martin Gregorie <martin@address-in-sig.invalid> - 2012-05-07 18:17 +0000
                          Re: Teaching kids to program (in Java) Arne Vajhøj <arne@vajhoej.dk> - 2012-05-05 20:18 -0400
            Re: Teaching kids to program (in Java) Arne Vajhøj <arne@vajhoej.dk> - 2012-04-13 20:44 -0400
          Re: Teaching kids to program (in Java) Arne Vajhøj <arne@vajhoej.dk> - 2012-04-13 20:38 -0400
          Re: Teaching kids to program (in Java) Gunter Herrmann <notformail0106@earthlink.net> - 2012-04-16 15:32 -0400
      Re: Teaching kids to program (in Java) Roedy Green <see_website@mindprod.com.invalid> - 2012-04-12 19:44 -0700
    Re: Teaching kids to program (in Java) Patricia Shanahan <pats@acm.org> - 2012-04-13 17:59 -0700

Page 3 of 3 — ← Prev page 1 2 [3]


#14336

FromArne Vajhøj <arne@vajhoej.dk>
Date2012-05-06 11:36 -0400
Message-ID<4fa69a8a$0$291$14726298@news.sunsite.dk>
In reply to#14335
On 5/6/2012 8:22 AM, Martin Gregorie wrote:
> On Sat, 05 May 2012 20:23:45 -0400, Arne Vajhøj wrote:
>> If you search programming fora for problems relating to:
>> - max int values
>> - integer division
>> - FP inaccuracy
>> - octal then I think
>> you will see that octal is not a common problem compared to other
>> language features.
>>
> I've always out that down to hardware changes. Way back when machines
> using 6 bit ISO characters (ICL 1900 mainframes, Elliott scientific
> boxes) I used to use octal all the time and didn't recall ever meeting
> hex, which I first noticed after the switch to byte-oriented
> architectures. I think that made sense: the 1900 used a 24 bit work that
> split into 4 6-bit characters so octal works well for bit representations
> of both words and characters. Hex would be far less useful.

Same with CDC NOS.

> OTOH Octal is a bad fit with a byte-oriented architecture for exactly
> thew same reasons.
>
> So, back when C was specified, it made sense to have both hex and octal
> bit representations because it was being used on both byte and word
> oriented hardware (didn't some early DEC kit use word and character
> lengths that were multiples of 3 rather than 4?) but now, with the almost
> universal adoption of byte-oriented architectures there's little reason,
> other than historic, to use octal notation.

True.

But the history is still there.

Arne

[toc] | [prev] | [next] | [standalone]


#14340

Fromglen herrmannsfeldt <gah@ugcs.caltech.edu>
Date2012-05-06 17:10 +0000
Message-ID<jo6bau$igk$1@speranza.aioe.org>
In reply to#14335
Martin Gregorie <martin@address-in-sig.invalid> wrote:

(snip)
> So, back when C was specified, it made sense to have both hex and octal 
> bit representations because it was being used on both byte and word 
> oriented hardware (didn't some early DEC kit use word and character 
> lengths that were multiples of 3 rather than 4?) but now, with the 
> almost universal adoption of byte-oriented architectures there's 
> little reason, other than historic, to use octal notation.

Before VAX, everything DEC was octal. There were machines with 12
bit and 36 bit words. The PDP-11 used 16 bits, but the instruction
fields were divided up such that octal made them more readable.
Much of the PDP-11 software uses Radix 50, which is actually
base 40 because the 50 is in octal. (Three characters per word.)

With VAX, they went hex, though octal was still supported.

Stories are that DEC published a calendar with the dates in hex
in the year before VAX was released. Instruction fields are in
multiples of four bits. The DUMP commands prints ASCII and hex.
(The hex going right to left, so that little endian values can
be read correctly.)

-- glen

[toc] | [prev] | [next] | [standalone]


#14363

FromGene Wirchenko <genew@ocis.net>
Date2012-05-07 09:43 -0700
Message-ID<5dufq71s4u82bdq3p9tprl7jmhgj48mim8@4ax.com>
In reply to#14317
On Sat, 05 May 2012 20:23:45 -0400, Arne Vajhøj <arne@vajhoej.dk>
wrote:

>On 4/20/2012 4:30 PM, Gene Wirchenko wrote:
>> On Fri, 20 Apr 2012 12:43:42 -0700 (PDT), Lew<lewbloch@gmail.com>
>> wrote:

[snip]

>>> Computer programming uses all sorts of terms and notations in ways different
>>   from ordinary usage ("method", "call", "object", "integer", "%",
>> "@"). It is incumbent upon one learning a programming language to
>> learn the specific semantics and syntax, and complaints that it is
>> unlike other languages (programming or otherwise) are feckless.
>>
>>       Quite true.  Learning those terms is part of the basics of
>> programming.  How a particular language does something is not.
>>
>>       If I were to create a programming language, it would be
>> reasonable for me to expect that people would know what "method",
>> "call", etc. mean.  It would not be so for something idiosyncratic to
>> my language.
>
>That seems to be a rather arbitrary division.

     Not at all.  Here is how to tell the difference:

     "method" and "call" are ordinary terms of the industry.  If I
come up with a term for something, it might become a term of the
industry, but it certainly will not be at first.

     Do you know what the term "Turing chart" means?  I made it up
years ago.  It refers to a particular representation of a finite state
automaton.  It is rather obviously on the other side of the divide
from "method" and "call".

>If you look at languages weighted after current use, then I think you
>will see that octal constants are used more than call keyword.

     No, I can not remember the last time I saw production code with
deliberately-used octal constants.  In fact, I do not think that I
have ever seen code with the leading zero octal constant (except as a
documentation example or as an example of this problem).

     From time to time, I do see call statements (or their
equivalent).  I will be seeing more and more.  The call statement in
T-SQL is execute, and that is used quite a bit.

Sincerely,

Gene Wirchenko

[toc] | [prev] | [next] | [standalone]


#14376

FromMartin Gregorie <martin@address-in-sig.invalid>
Date2012-05-07 18:17 +0000
Message-ID<jo93k9$er$1@localhost.localdomain>
In reply to#14363
On Mon, 07 May 2012 09:43:31 -0700, Gene Wirchenko wrote:

> 
>      No, I can not remember the last time I saw production code with
> deliberately-used octal constants.  In fact, I do not think that I have
> ever seen code with the leading zero octal constant (except as a
> documentation example or as an example of this problem).
>
Me neither, at least not since I last used an ICL 1900, which would be 
back in the late 1970s.
 
>      From time to time, I do see call statements (or their
> equivalent).  I will be seeing more and more.  The call statement in
> T-SQL is execute, and that is used quite a bit.
>
Its quite a common verb in COBOL too. Used every time an external 
subroutine is run.  CALL "that-subroutine" USING PARAM-1 PARAM-2.
 

-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

[toc] | [prev] | [next] | [standalone]


#14316

FromArne Vajhøj <arne@vajhoej.dk>
Date2012-05-05 20:18 -0400
Message-ID<4fa5c369$0$284$14726298@news.sunsite.dk>
In reply to#13652
On 4/18/2012 9:03 PM, Gene Wirchenko wrote:
> On Wed, 18 Apr 2012 19:20:30 -0400, Arne Vajhøj<arne@vajhoej.dk>
> wrote:
>> On 4/17/2012 10:57 PM, Gene Wirchenko wrote:

>>>> Most people know what an integer is, but when they switch to
>>>> a (traditional) programming language, then the definition is
>>>> suddenly different. And so is the behavior of concepts like
>>>> add and multiply.
>>>       Behaviour of datatypes should be a very basic part of using them.
>>> How else do you know which one to select?  (If instructing, I would
>>> define the datatype.  "An int can hold an integer value in the range
>>> of<low>  to<high>.  If you try to assign a value outisde of this
>>> range, then<result>." and so on.)
>>>        I really do not like gotchas.  They can waste a lot of time.  I
>>> really do not like the attitude of "Oh, well!" about them either.
>>
>> I can not see a big difference between that and knowing that
>> an integer starting with zero is being interpreted as
>> being in octal.
>
>       I can.  One reads about datatypes for a language, and the first
> thing that comes to mind is what values is it a collection of.  Then,
> comes operations.
>
>       One does not expect common things to be redefined without notice.
> That is what the octal notation does.  There is also a good reason for
> using leading zeroes (alignment).

Usually the section before or after "data types" is called
"literals". Not a good idea to skip that.

And a lot easier to understand than "behavior of data types", which
is frequently not even mentioned in a beginner book.

Arne

[toc] | [prev] | [next] | [standalone]


#13535

FromArne Vajhøj <arne@vajhoej.dk>
Date2012-04-13 20:44 -0400
Message-ID<4f88c85c$0$293$14726298@news.sunsite.dk>
In reply to#13518
On 4/13/2012 9:06 AM, Rui Maciel wrote:
> Leif Roar Moldskred wrote:
>> 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.

Yes. And every first year CS student will understand that.

But that does not mean that a 12 year old will.

Arne

[toc] | [prev] | [next] | [standalone]


#13533

FromArne Vajhøj <arne@vajhoej.dk>
Date2012-04-13 20:38 -0400
Message-ID<4f88c6fd$0$290$14726298@news.sunsite.dk>
In reply to#13516
On 4/13/2012 6:03 AM, Leif Roar Moldskred wrote:
> Arne Vajhøj<arne@vajhoej.dk>  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


[toc] | [prev] | [next] | [standalone]


#13589

FromGunter Herrmann <notformail0106@earthlink.net>
Date2012-04-16 15:32 -0400
Message-ID<4f8c73a9$0$7613$9b4e6d93@newsspool1.arcor-online.net>
In reply to#13516
Hi!

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

Why is there the inconsistency between Java (0 based) and
JDBC (1 based)?

Consistency looks slightly different.

Gunter

[toc] | [prev] | [next] | [standalone]


#13514

FromRoedy Green <see_website@mindprod.com.invalid>
Date2012-04-12 19:44 -0700
Message-ID<8j4fo7tmd8mu2b2ccptn5hktrfssvq9tl2@4ax.com>
In reply to#13500
On Thu, 12 Apr 2012 13:09:39 -0400, David Lamb <dalamb@cs.queensu.ca>
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..

[toc] | [prev] | [next] | [standalone]


#13537

FromPatricia Shanahan <pats@acm.org>
Date2012-04-13 17:59 -0700
Message-ID<da-dnWl_au5pVhXSnZ2dnUVZ_qudnZ2d@earthlink.com>
In reply to#13493
On 4/12/2012 1:12 AM, Mark wrote:
> 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 ;-)

Sarah Esper, a graduate student I know at UCSD, is doing research on a
fun, child-friendly approach to Java programming.

She has set up a video game called "CodeSpells" in which the kids write
"spells" that are actually Java programs to manipulate the game
environment. Constructs like "public static void main" are incantations
that must be included in a spell to make it work. Because of Harry
Potter, children tend to be comfortable with the idea that a spell may
need to include some words they do not understand.

Her web page, http://cseweb.ucsd.edu/~sesper/CompSciInfo.html, does not
have much information now but she plans to add to it over the next few days.

Patricia

[toc] | [prev] | [standalone]


Page 3 of 3 — ← Prev page 1 2 [3]

Back to top | Article view | comp.lang.java.programmer


csiph-web