[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Make a sprite fall with realistic gravity?



On Nov 30, 2009, at 11:13 AM, Ian Mallett wrote:
g = -9.8m*s^-2.  

If you want to learn about gravity, watch this video: http://video.google.com/videoplay?docid=-9055536763288165825 -- but be careful or you might get inspired.

I say that because this video is an instance of The Canonical Alan Kay Lecture. Indulge me a few paragraphs to explain what that means. 

Alan Kay is a famous computer scientist, mostly known for three things:
1) His witty sayings, such as, "The best way to predict the future is to invent it," and "A good point of view is worth eighty IQ points;"
2) Actually "Inventing the Future;" and
3) Inspiring other programmers to invent the future.

In 1969, Alan had a vision: kids learning to "think about thinking," using what he called a "DynaBook" -- which we now call a laptop computer. Since his vision was a long way off, he got a group together at Xerox PARC, and they developed a "working prototype" that was the size of a mini-fridge, but otherwise fit the bill. Steve Jobs brought his own gang to see a demo of that, and they were inspired to make Macintosh.

Now we have laptops and GUIs, and Alan and conspirators have been inventing new programming systems with Squeak (a newer version of Smalltalk) as their "assembly language core." Etoys is one of them, and if you haven't tried it, you should.[1]

Alan inspires other programmers by showing (formerly-rare) demo footage of groundbreaking computer systems, such as Ivan Sutherland's Sketchpad from 1963 [2], and Doug Engelbart's "Mother of All Demos" from 1968.[3]

When I was at the MIT Media Lab, as a student of Alan's, I saw this Canonical Lecture a lot -- even gave it myself a few times. I still find it awe-inspiring and humbling.

In this video, you'll see some of Alan's inspirations, and some results of using Etoys in schools, including kids learning about gravity by simulating the motion of a ball falling -- in the video from about 27 minutes to about 33 minutes.

Sure, Doug Engelbart and Ivan Sutherland were geniuses, and Alan's no slouch himself, but the kids in Alan's demos are not. They've just found a good point of view, and a good method of _expression_. It's our job, as programmers, to create better methods of _expression_. We owe it to the future.

I don't know if Alan has commented on Python,[4] but I think he'd approve of it, before pointing out that "the real computer revolution hasn't happened yet." I think he'd make the point that programming language designers only recently have gotten past the absurd and harmful goal of making languages easy for computers to understand and execute. This is so important I am going to set it off by itself:

It was only 10 years ago that people were still railing against the notion of garbage collection because it cost as much as 15% extra RAM, and 5% of your CPU's power. [5] 

Now we're seeing lots of new programming languages, and many of them are starting to have slightly more sophistication than object-oriented programming's "stacking blocks of granite" approach. (As Alan would say, "But that worked great for the pyramids, and required far less heavy lifting than most people think!")  List Comprehensions, to my mind, are the next step beyond Lisp's "map" and "filter" paradigm, which I think of as "flint arrowheads." I hope I live to see the invention of computer programming's "screw fasteners."

Man is most nearly himself when he achieves the seriousness of a child at play. - Heraclitus





[1] http://www.squeakland.org/ -- you simply must download and try Etoys.

[2] http://www.youtube.com/watch?v=USyoT_Ha_bA   -- Sketchpad ran on a computer built out of individual transistors, with a "CPU Speed" of less than 200 kHz (my Mac has 8 cores running at 2.8 GHz, so about 112,000 times as fast), and 64K of 36-bit words (and my Mac has about 30,000 times as much).

[3] http://video.google.com/videoplay?docid=-8734787622017763097#   -- Engelbart's demo is astounding because it was the first demonstration of "tele-computing" (the computers were over 30 miles away, and this was a year before the first test demo of "Internet" technology, and almost 30 years before computers had built-in ethernet ports). It also was the first demo of his "mouse" computer interface.

[4] Alan gave a talk to EuroPython in 2006, but I haven't had a chance to watch it yet. It's here: http://blip.tv/file/51211

[5] And even then, your computer was idle 98% of the time. I am amused because the entire Macintosh Common Lisp I cut my teeth on fit could easily run in 4 MB of RAM. One day I was wondering why it was GC'ing so much, and it turned out that the memory had gone bad -- the entire system had to run in about 128KB.