analytical Skill for Java Development

S

Stefan Ram

Ingo R. Homann said:
Yes, but how did the program and the circle of the five-year-old
children look like? (e.g. did they really ended where they started?) (...)
By the way: I do not understand how the ten-year-olds could program a
circle without knowing Phythagoras' formula. Did they use sin and cos?

Unfortunately, I do not know more about the story than what I
already wrote down.

From a mathematical point of view, one can draw a circle by
applying the »infinitesimal generator of rotations around (0,0)«
infinitely many times to the point (1,0). This can be approximated
by applying a very small generator very many times. The
generator would be just a simple matrix. Let me try ...

public class Main
{ public static void main( final java.lang.String[] args )
{ char[][] screen = new char[24][78];
for( int i = 0; i < 24; ++i )for( int j = 0; j < 78; ++j )
screen[ i ][ j ]= ' ';
double x = 1; double y = 0;
for( int i = 0; i < 1000000; ++i )
{ screen[( int )( y * 10 + 10 )][( int )( x * 20 + 38 )]= '*';
x = x - 1E-5 * y; y = y + 1E-5 * x; } // <-- generator
for( int i = 0; i < 24; ++i )
{ for( int j = 0; j < 78; ++j )
java.lang.System.out.print( screen[ i ][ j ] );
java.lang.System.out.println(); }}}

******************
***** ****
*** ***
** **
** **
** **
** **
* *
* *
** *
* **
* *
* *
** **
** **
*** **
** ***
**** ***
**** *****
******************
*
 
S

Stefan Ram

x = x - 1E-5 * y; y = y + 1E-5 * x; } // <-- generator

One can also show, that the infinitesimal generator
does not change the distance to the origin:

dist = sqrt(( x - e y )² +( y + e x )² )
= sqrt( x² - 2 x e y + e² y² + y² + 2 y e x + e² x² )
= sqrt( x² - 2 x e y + y² + 2 y e x )
= sqrt( x² + y² )

I have dropped higher-order terms (terms with e²).
 
I

Ingo R. Homann

Hi Stefan,

Stefan said:
Unfortunately, I do not know more about the story than what I
already wrote down.

From a mathematical point of view, one can draw a circle by
applying the »infinitesimal generator of rotations around (0,0)«

Wow, the 10 year olds were able to do this? ;-)

What I want to say is, that I have the impression that this was a story
that was retelled very often and somehow was seen as a "proof" for the
idea that small children are better in doing some things than older
children (what I think, is just generally not true) - some kind of urban
legend.

The more I think about it, the more I have the impression that I am
right. The only thing, the story tells us is the following (which also
is not a new insight): First, you think, you know everything about a
certain topic. But the more you learn, the more you realize that you do
not really know everything about that topic. But that does not mean that
you were wiser before step 2!

Ciao,
Ingo
 
S

Stefan Ram

Ingo R. Homann said:
What I want to say is, that I have the impression that this was
a story that was retelled very often and somehow was seen as a
"proof" for the idea that small children are better in doing
some things than older children (what I think, is just
generally not true) - some kind of urban legend.

At least I can offer some confirmation, that learning can
reduce capabilities in some situations.

Sorry, I have only quotations in German. Summarized, these are
reports, where people with more knowledge perform poorer than
people with less knowledge under some circumstances.

"Mehr Grundwissen schränkt die Fähigkeit ein, sich Details
zu merken (...) Aus diesem Grund behalten Kinder
beispielsweise viel mehr Einzelheiten eines Bildes im
Gedächtnis als Erwachsene, die das Gesehene eher in
Kategorien und Rubriken einordnen. (...) Die jüngsten
Kinder schnitten beim Wiedererkennen der Tiere am besten
ab, zeigte die Auswertung. Je älter die Probanden wurden,
desto weniger Tiere erkannten sie sicher wieder. Die
Erwachsenen schließlich hatten sehr große Probleme,
überhaupt eines der Tiere zu identifizieren. Dieser
Unterschied sei damit zu erklären, daß die Kinder noch
nicht gelernt haben, die gesehenen Tiere in Kategorien
einzuordnen, erklären die Forscher. (...) Entscheidend für
die überlegene Gedächtnisleistung der Kinder ist dabei
nach Ansicht der Forscher das fehlende Vorwissen. Diese
Annahme bestätigte sich in einem weiteren Test"

http://www.wissenschaft.de/wissen/news/drucken/253282.html

"Manchmal ist es unser Wissen, das uns den Verstand
vernebelt, wie Gerd Gigerenzer, Direktor am
Max-Planck-Institut für Bildungsforschung in Berlin,
entdeckte. ,Welche Stadt hat mehr Einwohner - San Diego
oder San Antonio ?' Konfrontierte der Kognitionspsychologe
amerikanischen Studenten mit dieser Frage, wußten zwei
Drittel die Lösung: San Diego. Und wie viele deutsche
Studenten, die nie von San Antonio gehört hatten, kannten
die korrekte Antwort? Ganz genau, alle. Die deutschen
Studenten versagten erst, wenn Gigerenzer ihnen das
Problem mit zwei deutschen Städten vorlegte: Hannover und
Bielefeld. Plötzlich waren sie verunsichert, wußten nicht,
was sie wählen sollten. Nun glänzten die Amerikaner: Da
sie noch nie von Bielefeld gehört hatten, tippten sie auf
Hannover. Ihr Instinkt sagte ihnen: Nimm einfach das, was
du kennst - und traf den Nagel auf den Kopf."

http://archiv.tagesspiegel.de/archiv/17.06.2005/1882598.asp

"Die Wissenschaftler baten 43 Finanzprofis sowie 56
blutige Börsenlaien, die Kursentwicklung einiger Aktien
vorherzusagen. Das verblüffende Resultat: Die Amateure
gaben bessere Tips ab als die Analysten. Nur in einem
Punkt waren die Profis den Laien überlegen - was ihre
Überheblichkeit betraf. ,Der Nutzen von Erfahrung und
Wissen, über den die Experten ja angeblich verfügen, wird
offensichtlich überschätzt,' lautet das Fazit der
Forscher."

http://archiv.tagesspiegel.de/archiv/17.06.2005/1882598.asp
 
I

Ingo R. Homann

Hi,

Stefan said:
At least I can offer some confirmation, that learning can
reduce capabilities in some situations.

Sorry, I did not want to say that this is generally (*always*) wrong. I
wanted to say, that it is "generally" (in *most* situatuations, "im
Allgemeinen") wrong. (I must admit that even in German I would not be
sure how to use the word 'generell' correctly.)

Esepcially, in analytical questions, this is IMHO mostly wrong. In
questions where you need plain "memory", it may be right.
"Mehr Grundwissen schränkt die Fähigkeit ein, sich Details
zu merken (...) Aus diesem Grund behalten Kinder
beispielsweise viel mehr Einzelheiten eines Bildes im
Gedächtnis als Erwachsene, die das Gesehene eher in
Kategorien und Rubriken einordnen. (...) Die jüngsten
Kinder schnitten beim Wiedererkennen der Tiere am besten
ab, zeigte die Auswertung. Je älter die Probanden wurden,
desto weniger Tiere erkannten sie sicher wieder. Die
Erwachsenen schließlich hatten sehr große Probleme,
überhaupt eines der Tiere zu identifizieren. Dieser
Unterschied sei damit zu erklären, daß die Kinder noch
nicht gelernt haben, die gesehenen Tiere in Kategorien
einzuordnen, erklären die Forscher. (...) Entscheidend für
die überlegene Gedächtnisleistung der Kinder ist dabei
nach Ansicht der Forscher das fehlende Vorwissen. Diese
Annahme bestätigte sich in einem weiteren Test"

The question here is, how the word "better" is defined (this should be
easy, but obviously it isn't). The experiment uses a quality-measure
wich only measures a small proportion (and perhaps an unimportant) of
the complete task.
"Manchmal ist es unser Wissen, das uns den Verstand
vernebelt, wie Gerd Gigerenzer, Direktor am
Max-Planck-Institut für Bildungsforschung in Berlin,
entdeckte. ,Welche Stadt hat mehr Einwohner - San Diego
oder San Antonio ?' Konfrontierte der Kognitionspsychologe
amerikanischen Studenten mit dieser Frage, wußten zwei
Drittel die Lösung: San Diego. Und wie viele deutsche
Studenten, die nie von San Antonio gehört hatten, kannten
die korrekte Antwort? Ganz genau, alle. Die deutschen
Studenten versagten erst, wenn Gigerenzer ihnen das
Problem mit zwei deutschen Städten vorlegte: Hannover und
Bielefeld. Plötzlich waren sie verunsichert, wußten nicht,
was sie wählen sollten. Nun glänzten die Amerikaner: Da
sie noch nie von Bielefeld gehört hatten, tippten sie auf
Hannover. Ihr Instinkt sagte ihnen: Nimm einfach das, was
du kennst - und traf den Nagel auf den Kopf."

Grmph - especially "Bielefeld"... you want to tease me, Stefan, do you!?

No really, that is in indeed an interesting result.

But on the other hand, this also may not work at all: The size of a city
does not always reflect it's "importance" or it's publicity. If you ask
the question with cities like "Bielefeld" (which nobody knows) and
"Güterloh" (which is much smaller but where Bertelsman comes from) or
with "Bielefeld" and "Pisa", the opposite is true.

But you are right, in *most* cases, the heuristic is correct.
"Die Wissenschaftler baten 43 Finanzprofis sowie 56
blutige Börsenlaien, die Kursentwicklung einiger Aktien
vorherzusagen. Das verblüffende Resultat: Die Amateure
gaben bessere Tips ab als die Analysten. Nur in einem
Punkt waren die Profis den Laien überlegen - was ihre
Überheblichkeit betraf. ,Der Nutzen von Erfahrung und
Wissen, über den die Experten ja angeblich verfügen, wird
offensichtlich überschätzt,' lautet das Fazit der
Forscher."

Yes, I read this as well, and it is *really* shocking: What do the
analysts do the whole day?

Ciao,
Ingo
 
C

Chris Uppal

Ingo said:
What I want to say is, that I have the impression that this was a story
that was retelled very often and somehow was seen as a "proof" for the
idea that small children are better in doing some things than older
children (what I think, is just generally not true) - some kind of urban
legend.

More likely (especially knowing something about Kay's attitudes) the point it
was intended to illustrate (not prove) is that increased knowledge can tie you
into a particular approach or worldview, and that that worldview is not either
necessarily optimal, nor easy to get out of once you are in it.

Compare concepts like "files", "processes", "functions" (sub-routines, methods,
whatever you want to call them), etc in today's programming world. Very
difficult to untangle ones' thinking about programming from these inessential
minutia of what may ultimately prove to be a sub-optimal dead-end approach.

-- chris
 
C

Chris Uppal

Ingo said:
By the way: I do not understand how the ten-year-olds could program a
circle without knowing Phythagoras' formula. Did they use sin and cos?

Probably there was a distance-between-points function in the library they were
using. Then they could use (the equivalent of):

for (y = 0; y < height; y++)
for (x = 0; x < width; x++)
if (dist(origin, (x,y)) == radius)
plotAt(x, y)

which would yield the disconnected points that Stefan's quote describes.
Depending on how the graphics system they were using was set up, that could
easily have been a loop-free one-liner. In fact I'd assume it was such a
one-liner since I can't imagine Alan Kay wasting his own time, let alone being
stupid enough to expect the kids to waste their time, with a system that wasn't
transparently expressive.

As for how the 5yo-s managed it using only "go forward a bit, turn a bit",
almost certainly they were using a turtle-graphics system, in which case they
could just fiddle with the "parameters" until they found a combination that
worked to their satisfaction.

-- chris
 
I

Ingo R. Homann

Hi,

Chris said:
More likely (especially knowing something about Kay's attitudes) the point it
was intended to illustrate (not prove) is that increased knowledge can tie you
into a particular approach or worldview, and that that worldview is not either
necessarily optimal, nor easy to get out of once you are in it.

Compare concepts like "files", "processes", "functions" (sub-routines, methods,
whatever you want to call them), etc in today's programming world. Very
difficult to untangle ones' thinking about programming from these inessential
minutia of what may ultimately prove to be a sub-optimal dead-end approach.

On the one hand I agree to what you say: You are right that coming from
"C++"/"Java", I think about "methods" in a certain way - maybe
completely different than someone who comes from "Smalltalk".

On the other hand, I think, it is nearly impossible to talk and discuss
about something *without* the necessary background knowledge, e.g. it is
impossible to talk about "methods" (or more complicated issues like
"inheritance") to a 10-year-old child that *never* has programmed in
*any* language.

But what I *really* wanted to say with my last posts was, that the story
with the children drwaing circles does not really illustrate *any* of
these points.

Ciao,
Ingo
 
I

Ingo R. Homann

Hi,

Chris said:
As for how the 5yo-s managed it using only "go forward a bit, turn a bit",
almost certainly they were using a turtle-graphics system, in which case they
could just fiddle with the "parameters" until they found a combination that
worked to their satisfaction.

Although the "turtle-graphics-systems" may be very easy, I do not know
any 5-year-old who is able to do what you are saying.

And, if you help the 5-year-old by formalizing what he somehow may
'fell' or 'guess', then you must help the 10-year-old and the
15-year-old childs as well - otherwise your comparison is not fair.

What brings me back to my first point: I think this is an urban legend
that was intentionally (not by Stefan, but by Alan Key) used to
illustrate a certain idea.

Ciao,
Ingo
 
O

Oliver Wong

Patricia Shanahan said:
I think your solution concept is correct, even if the details need to be
reworked. You broke the pattern you seemed to be following when you used
76 rather than 77 (69+8, where the previous increment was 9).

How about 14, 27, 39, 50, 60, 69, 77, 84, 90, 95, 99, 100?

Yes, my intention was to keep the pattern until the
before-last-worst-case-drop-of-the-first-ball (99 in your example), which
could be dropped a few floors lower, essentially splitting the last segment
in half. E.g. my series would have ended something like 90, 95, 97.

The idea is that this pattern seems optimal except when nearing the end,
where something like binary search works better. However, after playing
around, it really looks like 14 is the best one can do, so I've sort of
stopped thinking about this problem now.

- Oliver
 
S

Stefan Ram

Ingo R. Homann said:
Although the "turtle-graphics-systems" may be very easy, I do not know
any 5-year-old who is able to do what you are saying.

I have tried the »walk-a-little, turn-a-little« approach:

The »walk-a-little« is the part with
x = x + ...
y = y + ...

The »turn-a-litte« is »++direction«.

Of course, for children the math would be hidden within the
turtle class (I have no time to do this right now, but you
could imagine it).

I have not had to adjust any parameters. Using another
stepsize or direction increment should also give a circle, I
assume (just with another size). So the children should
succeed easily this way.

public class Main
{ public static void main( final java.lang.String[] args )
{ char[][] screen = new char[24][78];
for( int i = 0; i < 24; ++i )for( int j = 0; j < 78; ++j )
screen[ i ][ j ]= ' ';
double x = 0; double y = 0; double stepsize = 0.1;
for( double direction = 0; direction < 360; ++direction )
{ try{ screen[( int )( y + 11 )][( int )( x + 38 )]= '*'; }
catch( final Exception e ){}
final double angle = direction / 360 * 2 * java.lang.Math.PI;
x = x + stepsize * java.lang.Math.cos( angle );
y = y + stepsize * java.lang.Math.sin( angle ); }
for( int i = 0; i < 24; ++i )
{ for( int j = 0; j < 78; ++j )
java.lang.System.out.print( screen[ i ][ j ] );
java.lang.System.out.println(); }}}











********
** **
* **
* *
* *
* *
* *
* *
** **
** **
** **
******
 
I

Ingo R. Homann

Hi,

Stefan said:
I have tried the »walk-a-little, turn-a-little« approach:

The »walk-a-little« is the part with
x = x + ...
y = y + ...

The »turn-a-litte« is »++direction«.

Of course, for children the math would be hidden within the
turtle class (I have no time to do this right now, but you
could imagine it).

Sorry, I am not convinced, that you can explain this to a 5-year-old
child, or how you can think that a child is able to get more than a
rough idea (explained in natural language) by itself.

Ciao,
Ingo
 
O

Oliver Wong

Ingo R. Homann said:
Hi,



Sorry, I am not convinced, that you can explain this to a 5-year-old
child, or how you can think that a child is able to get more than a rough
idea (explained in natural language) by itself.

I'm guessing that Alan Kay asked the children for instructions, the
child explained in natural language, and Alan Kay took care of translating
the natural language into LOGO (turtle) code.

At best, he probably listed the instruction set that the turtle knows to
the children, and told them to only use instructions from that set, but took
care of actually typing in the code himself.

- Oliver
 
I

Ingo R. Homann

Hi,

Oliver said:
I'm guessing that Alan Kay asked the children for instructions, the
child explained in natural language, and Alan Kay took care of translating
the natural language into LOGO (turtle) code.

Yes - so he helped the young children very much. He interpreted what the
young ones said, and it is totally unclear, what part of the solution
(which is only an approximation) is really an idea of the child and what
is just his interpretation.

And I suspect that he did not give as much help to the 10- and
15-year-olds (who obviously were not allowed to use "turtle", and were
*expected* to use mathematics), and so the comparison is not fair.

I'm sure that the young childs did not say anything about recursion or
iteration or a proper stop-condition (failsaif to int-rounding-errors)
by themselves.

Ciao,
Ingo
 
O

Oliver Wong

Ingo R. Homann said:
Hi,



Yes - so he helped the young children very much. He interpreted what the
young ones said, and it is totally unclear, what part of the solution
(which is only an approximation) is really an idea of the child and what
is just his interpretation.

I'm in agreement with you here.
And I suspect that he did not give as much help to the 10- and
15-year-olds (who obviously were not allowed to use "turtle", and were
*expected* to use mathematics), and so the comparison is not fair.

I'm sure that the young childs did not say anything about recursion or
iteration or a proper stop-condition (failsaif to int-rounding-errors) by
themselves.

When I imagine the situation, I picture Alan Kay just asking kids to
explain to a computer how to draw a circle, without saying anything about
programming languages or anything like that. Perhaps the 5 year olds
naturally expressed it as "walk forward a little bit, and turn a little bit"
and Kay figured that the best programming language to express this program
was the turtle one.

Then, when Alan Kay asked the another group of children, and they said
x^2+y^2 = c, then he should have chosen the best language to express this
program (e.g. Maple or MathLab or something), and he should have gotten an
equally elegant program which draws a circle.

- Oliver
 
S

Stefan Ram

Ingo R. Homann said:
Sorry, I am not convinced, that you can explain this to a 5-year-old
child, or how you can think that a child is able to get more than a
rough idea (explained in natural language) by itself.

What the child sees could be like this:

{ walkALittle(); turnALittle();
walkALittle(); turnALittle();
walkALittle(); turnALittle();
walkALittle(); turnALittle();
walkALittle(); turnALittle();
walkALittle(); turnALittle();
walkALittle(); turnALittle();
walkALittle(); turnALittle();
walkALittle(); turnALittle();
walkALittle(); turnALittle();
walkALittle(); turnALittle();
walkALittle(); turnALittle(); }


**
**
*
*
*
*
*
*
*

And it could try to play with walks and turns. An exercise
could be »add more lines to close the circle« or »try other
combinations of walks and turns to get other curves.«

The whole program that I used was:

public class Turtle
{
static double x = 0;
static double y = 0;
static double stepsize = 1;
static double direction = 0;
static char[][] screen = new char[24][78];

static void turnALittle(){ direction += 10; }

static void walkALittle()
{ final double angle = direction / 360 * 2 * java.lang.Math.PI;
y = y + stepsize * java.lang.Math.sin( angle );
x = x + stepsize * java.lang.Math.cos( angle );
set( y, x ); }

static
{ for( int i = 0; i < 24; ++i )for( int j = 0; j < 78; ++j )
screen[ i ][ j ]= ' ';
java.lang.Runtime.getRuntime().addShutdownHook
( new Thread
( new java.lang.Runnable()
{ public void run()
{ for( int i = 0; i < 24; ++i )
{ for( int j = 0; j < 78; ++j )
java.lang.System.out.print( screen[ i ][ j ] );
java.lang.System.out.println(); }}})); }

static void set( final double y, final double x )
{ try{ screen[( int )( y + 11 )][( int )( x + 38 )]= '*'; }
catch( final Exception e ){} }

public static void main( final java.lang.String[] args )
{ walkALittle(); turnALittle();
walkALittle(); turnALittle();
walkALittle(); turnALittle();
walkALittle(); turnALittle();
walkALittle(); turnALittle();
walkALittle(); turnALittle();
walkALittle(); turnALittle();
walkALittle(); turnALittle();
walkALittle(); turnALittle();
walkALittle(); turnALittle();
walkALittle(); turnALittle();
walkALittle(); turnALittle(); }}
 
C

Chris Uppal

Oliver said:
When I imagine the situation, I picture Alan Kay just asking kids to
explain to a computer how to draw a circle, without saying anything about
programming languages or anything like that. Perhaps the 5 year olds
naturally expressed it as "walk forward a little bit, and turn a little
bit" and Kay figured that the best programming language to express this
program was the turtle one.

You both seem remarkably ready to impute a high degree of intellectual
dishonesty to one of the most significant figures in modern computing.

-- chris
 
I

Ingo R. Homann

Hi,

Chris said:
You both seem remarkably ready to impute a high degree of intellectual
dishonesty to one of the most significant figures in modern computing.

Well, I am only sceptical about the story with the circle. I cannot
believe, that a normal, 5-year-old-child is able to write a program by
itself - even if the program is supposed do no more than drawing a
circle, and even if the language is very simple and (and that is the
most important point) that normal 10-year-old and normal 15-year-old
childs fail on the same task.

The only thing that a normal 5-year-old child can write is its own name,
and that only, if the name is short enough.

By the way, the story sounds as if the 5yo child only did an
approximation to the circle while the 10yo and 15yo childs were supposed
to draw an exact circle (as long as the screen resolution supports
that). Not very fair.

And - i admit - I am someone who tries not to let myself dazzle by the
name of a person: Many famous (and clever) persons have already done
some things that were not very clever.

That has nothing to do that I think that this person is dishonest. It
can have many reasons. Another reason is very often, that someone only
sees what he wants to see. Another reason is that the result of an
experiment is just luck. Another reason might be that the story is not
retelled correctly in this NG. There are many other reasons. But, as I
said, I do not really presume any of these reasons.

I just say that I do not believe the story as it was telled here in this NG.

Ciao,
Ingo
 
T

Timo Stamm

Chris said:
You both seem remarkably ready to impute a high degree of intellectual
dishonesty to one of the most significant figures in modern computing.


I have a few years of experience educating children at the age of 4 to
15 years, and I am sure that a 5 year old could not write a program to
draw a circle. Abstract thinking is an ability that children develop
around the age of 12-14 years.

Children are clever. I can remember quite a lot of situations where they
made clever remarks that were astonishing to me and other educators. But
those are mostly social situations. Young children generally lack the
"stuckness" on the emphatical level that we adults suffer from. Maybe
they are just too honest.


Timo
 
S

Stefan Ram

Ingo R. Homann said:
I just say that I do not believe the story as it was telled
here in this NG.

Related web texts:

»Outlining the challenges behind the one laptop per child
project, Kay characterized the challenges from easy to
hard: (...) Think of a tool like Macromedia director,
which lets you draw, animate and script - but for kids -
and based around SmallTalk, a language so simple than many
experienced programmers (like me) find it bafflingly
counterintuitive and hard to use. (...) The car Kay
designs in a few seconds drives in a circle by moving a
few units forwards, turning an equal number of units - Kay
explains that this is a lesson in differential geometry,
one of several mathematical ways of describing a circle.«

http://www.ethanzuckerman.com/blog/?p=270

»Then Alan encountered Seymour Papert's work with Logo and
young children. The children were using Logo to make
things happen (something moving in a circle, I think), and
he described this as seeing six-year-olds effectively
understanding differential geometry.«

http://zenii.linux.org.uk/~telsa/Trips/Talks/g4-alankay.html

»"An idea behind LOGO was should the computer program the
kid, or should the kid program the computer"? Children
can be taught skills and concepts that will be later used
to understand more complicated ideas and schemes. For
example, when describing a circle, one could give the
children the formula x^2 + y^2 = r^2, or alternatively
teach him to construct a circle with LOGO as an
incremental correction of a goal.«

http://www-cse.ucsd.edu/users/elkan/cogsci200/education.html
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,787
Messages
2,569,627
Members
45,329
Latest member
InezZ76898

Latest Threads

Top