Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Learning to Program



On Friday 03 August 2007 00:19:25 Curt Sampson wrote:
> > * Graphics: Learn how to write programs that output POV-Ray code.
>
> Recalling my early-teen programming days, this seems to me at first
> blush rather on the difficult side for a rank beginner.

Perhaps so.  Graphics programming is pretty mathematical...  An 
eleven-year-old is (probably) just beginning algebra and is being introduced 
to the idea of variables.  It will be some time before he learns about 
exponentials, functions, etc.

Using POV-Ray would teach/reinforce the following concepts:
* geometrical shapes and how numbers can be used to define them
* Cartesian coordinates
* how the additive color model works, particularly RGB
* angles
* affine transformations: translation, scale, rotation

A possible approach would start as follows:
[no programming - POV-Ray only]
* display a cube (using a cube, a light, and a camera), using online code
* experiment with Cartesian coordinates to position the cube
* change he color of the cube
* experiment with the above mentioned affine transformations
* display other types of primitives and experiment with their parameters
[python]
* write code that outputs the same code used in one of the above steps
* rewrite the code to use a function with parameters to define the object
* add function calls to place more than one object
* write functions for the other primitive types
* write code to make a meaningful output (ex: cone + cylinder = tree)
* learn how to use loops to automate things (ex: line of trees)
...

The sky is the limit, and that is what holds the child's interest.

> I think it would be absolutely beneficial to use it to solve homework
> problems! If you can write a program to solve the algebraic equations in
> your homework, I'd say that you have a depth of understanding far beyond
> what your homework is designed to teach you, and you'd be wasting your
> time to do it by hand.

Mathematics classes in Japan discourage the use of calculators; the teachers 
really stress the importance of knowing how to do math by hand.  I agree with 
that somewhat, as I have met quite a few people who are overly dependant on 
their machines.  If a student fully understands how to do a given type of 
problem, then I agree that having to repeatedly do that same type of problem 
over and over is a waste of time.  It is more dangerous, however, if a 
student figures out how to solve a problem on the computer but does not get 
enough practice by hand.  The student may really understand the problem at 
the time, but repetition is often an important part of memory.  The statement 
that "the faster one learns something, the faster it will be forgotten" holds 
some truth.

As a side note, let me explain why I said that I agree "somewhat."  I think 
that it is a good idea for students to learn how to do math using 
calculators/computers as well as by hand.  The reason is that many real world 
problems have irrational parameters that must be measured and dealt with 
correctly.  Students should learn about rounding, significant figures, error, 
etc.  A really great way to study this is through physics.  Mathematics 
classes can give a good foundation, and physics classes can put the 
mathematics to good use as well as give the student more practice, which is 
invaluable in truly understanding some mathematical ideas.  In a physics 
class, some problems should be "prepared" (round values) and worked by hand 
while other problems should be realistic.  Those problems are particularly 
valuable to students because they will also learn how to get a feel for how 
an answer "looks" aside from the fact that it comes out even.

> Why not? The things I thought would make it good were the very
> small chunks in Q&A format, which I'd think would help reduce the
> frustration level considerably, the fantastic illustrations, and the
> lightheartedness of the whole thing. ("This space reserved for...jelly
> stains!")

The Q&A format may split the ideas up into chunks small enough to keep it 
relatively interesting for an eleven-year-old, but I do not think the output 
is interesting enough to maintain his interest for long...  It is not really 
something that would be impressive enough to show off to friends...  Also, a 
functional language may be a bit hard to comprehend for someone who has not 
even studied functions in maths.

BTW, I know of another book that has a lot of funny remarks in the margin:
http://www.amazon.com/Concrete-Mathematics-Foundation-Computer-Science/dp/0201558025
(Search for "コンピュータの数学" in Google to find the Japanese translation.  The 
stupid Web2.0 style URL is too long to paste here.)
;)

> > Scheme is great for learning functional programming.
>
> Actually, I didn't recommend _The Little Schemer_ because it teaches
> functional programming. I'd say it doesn't, really; it doesn't even
> touch on one of the most basic elements of functional programming,
> higher-order functions.

It is a good introduction, but not a complete introduction.  I do not think 
that an eleven-year-old needs to worry about higher-order functions quite 
yet. ;)

> Basically, what it covers is functions, data structures, and recursion.
> And these basic concepts are common to almost any language. Were I going
> to teach OO programming to someone who'd never programmed before, I'd
> probably start with _The Little Schemer_ or something similar anyway,
> because understanding these basic building blocks of calculation is more
> basic than understanding something like OO, which is really a method of
> program organization.

That is very true, and _The Little Schemer_ is a really good option IF the 
child in question has a long attention span and is really interested in 
learning programming itself, as opposed to getting cool output.  Dr. 
Felleisen has a sample chapter on his website, so he can easily see what he 
thinks:
http://www.ccs.neu.edu/home/matthias/BTLS/sample.ps

> That said, I'd certainly have no objection to Smalltalk as a starting
> language, if there were a similar book for it.

Smalltalk is a fine language, but personally I would recommend a 
more "mainstream" language to a young learner.

Here is a Java book that is written in the same style:
http://www.amazon.com/exec/obidos/ASIN/0262561158/

That reminds me, there is a Python editor/environment that was designed after 
Dr. Scheme:
http://drpython.sourceforge.net/

Cheers,

Travis


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links