Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Python in High School

4 views
Skip to first unread message

sprad

unread,
Apr 1, 2008, 1:27:18 PM4/1/08
to
I'm a high school computer teacher, and I'm starting a series of
programming courses next year (disguised as "game development" classes
to capture more interest). The first year will be a gentle
introduction to programming, leading to two more years of advanced
topics.

I was initially thinking about doing the first year in Flash/
ActionScript, and the later years in Java. My reasoning is that Flash
has the advantage of giving a quick payoff to keep the students
interested while I sneak in some OOP concepts through ActionScript.
Once they've gotten a decent grounding there, they move on to Java for
some more heavy-duty programming.

I've never used Python, but I keep hearing enough good stuff about it
to make me curious.

So -- would Python be a good fit for these classes? Could it equal
Java as the later heavy-duty language? Does it have enough quickly-
accessible sparklies to unseat Flash?

I want to believe. Evangelize away.

mdomans

unread,
Apr 1, 2008, 1:41:18 PM4/1/08
to
Python needs no evangelizing but I can tell you that it is a powerfull
tool. I prefer to think that flash is rather visualization tool than
programing language, and java needs a lot of typing and a lot of
reading. On the other hand python is simple to read and write, can be
debuged easily, is intuitive and saves a lot of time. It also supports
batteries included policy and you can't get more OO than python.

Bruno Desthuilliers

unread,
Apr 1, 2008, 2:09:54 PM4/1/08
to
sprad a écrit :

> I'm a high school computer teacher, and I'm starting a series of
> programming courses next year (disguised as "game development" classes
> to capture more interest). The first year will be a gentle
> introduction to programming, leading to two more years of advanced
> topics.
>
> I was initially thinking about doing the first year in Flash/
> ActionScript, and the later years in Java. My reasoning is that Flash
> has the advantage of giving a quick payoff to keep the students
> interested while I sneak in some OOP concepts through ActionScript.
> Once they've gotten a decent grounding there, they move on to Java for
> some more heavy-duty programming.
>
> I've never used Python, but I keep hearing enough good stuff about it
> to make me curious.
>
> So -- would Python be a good fit for these classes?

IMHO, yes, definitively - except that it won't introduce concepts like
static typing and primitive types, since it's dynamically typed and 100%
object. OTHO, it'll let you introduce quite a lot of more advanced
topics (operator overloading, metaclasses, higher-order functions,
closures, partial application etc) that you're less likely to grasp
using Java.

> Could it equal
> Java as the later heavy-duty language?

If you mean "is it possible to use Python to write real-world,
non-trivial applications", then the answer is obviously yes. Python's
use range from Q&D admin script to full-blown web application server
including vector graphic GUI apps, scientific data analysis and plotting
and game developpment and/or scripting.

> Does it have enough quickly-
> accessible sparklies to unseat Flash?

Since you plan to lure poor schoolboys in by pretending to teach them
game programming, you may want to have a look at pygame:

http://www.pygame.org/news.html

> I want to believe. Evangelize away.

"Then I saw Pygame, now I'm a believer".... !-)

sprad

unread,
Apr 1, 2008, 2:10:17 PM4/1/08
to

One advantage of Flash is that we can have something moving on the
screen from day one, and add code to it piece by piece for things like
keyboard or mouse control, more and more complex physics, etc. Is
there an equivalent project in Python?

Bruno Desthuilliers

unread,
Apr 1, 2008, 2:23:32 PM4/1/08
to
sprad a écrit :

see my other answer in this thread.

Paddy

unread,
Apr 1, 2008, 3:35:46 PM4/1/08
to

How proficient are you in Flash/Actionscript?
I suggest you try out Python/Pygame and extrapolate from that,
given your available time, would you be proficient enough to teach
it?

- Paddy.

Laurent Pointal

unread,
Apr 1, 2008, 4:06:32 PM4/1/08
to
Le Tue, 01 Apr 2008 12:35:46 -0700, Paddy a écrit :

> On Apr 1, 6:27 pm, sprad <jsp...@gmail.com> wrote:

<zip>


>>
>> I want to believe. Evangelize away.
>
> How proficient are you in Flash/Actionscript? I suggest you try out
> Python/Pygame and extrapolate from that, given your available time,
> would you be proficient enough to teach it?

And if you want to do easy and simple 3D graphics programming, look at
VPython

http://www.vpython.org/

--
Laurent POINTAL - laurent...@laposte.net

André

unread,
Apr 1, 2008, 5:28:35 PM4/1/08
to
On Apr 1, 3:09 pm, Bruno Desthuilliers <bruno.

There is also pyglet which is quite impressive and easy to use.

André

Basilisk96

unread,
Apr 1, 2008, 5:48:50 PM4/1/08
to

I highly recommend that you read the introduction chapters in two of
the books on this site: http://www.greenteapress.com/

The first book is called "How To Think Like a Computer Scientist:
Learning with Python".
The second book is a follow-up edition to that one, and is called "How
To Think Like a (Python) Programmer".

All of the books there are written by school teachers, so I think you
will find valuable insight there. The same books also have a Java and
a C++ flavor. All are free downloads.

My very first serious look into Python came from this series, and I
thoroughly enjoyed learning the basics. I think the text was so
successful for me because the content is well-connected.

As far as which language to choose - well, you can make the choice
yourself after reading at least the introductions of all the books. If
you do decide on Python, there is a library called "pygame" that may
achieve your visual game programming goals.

Enjoy!
-Basilisk96

Gabriel Rossetti

unread,
Apr 2, 2008, 9:12:57 AM4/2/08
to sprad, pytho...@python.org
I think it's a good idea (to use python), Mr. Swinnen, a high school
teacher in Belgium wrote a book out of the course that he created for
his programming class : Apprendre à programmer avec Python, 2e édition,
O'Reilly. His course was originally a translation of Allen B. Downey's
Open-source book (see : http://www.greenteapress.com/free_books.html).

I think this is proof of concept, no?

Gabriel

Jan Claeys

unread,
Apr 2, 2008, 1:10:11 PM4/2/08
to
Op Tue, 01 Apr 2008 10:27:18 -0700, schreef sprad:

> I'm a high school computer teacher, and I'm starting a series of
> programming courses next year (disguised as "game development" classes
> to capture more interest). The first year will be a gentle introduction
> to programming, leading to two more years of advanced topics.

> [...]


> So -- would Python be a good fit for these classes?

There are at least 3 books about game programming in python:
<http://www.amazon.com/Game-Programming-Line-Express-Learning/dp/0470068221>
<http://www.amazon.com/Beginning-Game-Development-Python-Pygame/dp/1590598725>
<http://www.amazon.com/Game-Programming-Python-Development/dp/1584502584>

--
JanC

John Henry

unread,
Apr 2, 2008, 4:01:00 PM4/2/08
to

I downloaded the "How to Think Like a Python Programmer" book and read
it. I think it's a fine reference book for the purpose you
indicated.

Here's my 2 cents on the subject.

I had been a volunteer mentor to my son's middle school robotic team
for several years and I have some experiences, therefore, in how kids
react to "programming". Granted, high school kids are "bigger kids" -
but they are kids nevertheless.

Last summer, I experimented teaching my own kid Python. He was in 7th
grade going onto 8th grade. He was the main goto person for the
robotic team and had no trouble learning the common applications such
as the Microsoft Office suite, and had some experience in ICONic
programming (Lego Mindstorm). So, I tried to see what would happen if
he tries to learn Python - using somewhat similar approach you are
taking: start with something visually appealing on day one. Instead
of Flash, I used Pythoncard - a no-brainer Python GUI construction
toolkit. He was really excited seeing how easy it was to have tic-tae-
toe type program up so easily (we are taking minutes - not hours) and
was very interested and motivated to continue. So far so good.
However, once I start teaching him variables, expressions, loops, and
what not, I found that (by surprise) he had great difficulties
catching on. Not soon after that, we had to quit.

We - as adults - take many things for granted and sometimes don't
remember, or don't understand how kids learn. My experience tells me
that in order to teach today's video game generation of kids, the
approach really has to be entirely visual. After I abandoned my
attempt to teach my kid Python, I started them on Robolab - a
simplified version of LabView and to my delight, they were able to
cook up a few simple programs (like fibonacci series and so forth)
without too much effort - although my own kid had some minor trouble
understanding the concept of a container (LabView's version of a
variable).

I don't know if you have access to LabView or Robolab or similar
packages but if you do, I would highly recommend those. LabView is
every bit as powerful, full-featured, and "real-life" as many of the
other languages and I believe that kids will have a much easier time
learning computer programming with it.

And you are going to teach them Java? Oh, please don't. Let the
colleges torture them. :=)

Stef Mientki

unread,
Apr 2, 2008, 4:32:39 PM4/2/08
to pytho...@python.org
Well I doubt it's the visual environment that makes it more easy,
color, shape and position can give some extra information though.
I think apriori domain knowledge and flattness of information are of far
more importance.
The first issue is covered quit well by Robolab / Labview,
but the second issue certainly is not.
I'm right now working on a Labview like editor in Python,
which does obey the demand for flatness of information.
The first results can be seen here:
http://oase.uci.kun.nl/~mientki/data_www/pylab_works/pw_animations_screenshots.html

cheers,
Stef Mientki

Dan Upton

unread,
Apr 2, 2008, 5:02:45 PM4/2/08
to pytho...@python.org

This was the book I first bought when I started thinking about
learning Python, and it includes some pygame projects. It uses all
game programming-based concepts for teaching, although many of them
are text-based and it only introduces pygame toward the end.

http://www.amazon.com/Python-Programming-Absolute-Beginner-Michael/dp/1592000738/ref=sr_1_6?ie=UTF8&s=books&qid=1207169620&sr=1-6

I might add, you might do a disservice to students by starting them
with flashy graphics-based programming--IIRC, that was actually a part
of the complaints a couple months ago about why "Java schools" were
failing to turn out competent computer scientists: they focus too
heavily on something that looks good and end up missing the underlying
concepts. Not that you'd ever do such a thing, I'm sure ;) But my
intro CS professor in undergrad had us do two of the projects from our
textbook that involved GUI programming, then quickly dropped it,
partly because we were spending so much time of the implementation of
the projects 1) figuring out how to set up the GUI in Swing, and 2)
not really understanding why we're typing all this stuff to create
buttons and text fields.

On Wed, Apr 2, 2008 at 4:01 PM, John Henry <john10...@hotmail.com> wrote:
>
> And you are going to teach them Java? Oh, please don't. Let the
> colleges torture them. :=)
>

Side rant: I think Java's just fine, as long as it's taught properly.
I'd done a little bit of C and C++ programming when I was in high
school, trying to teach myself from a book, but I never really got
pointers or objects. Going back to it after Java, it made so much
more sense, even though people will tell you "Java doesn't make you
learn about pointers."

John Henry

unread,
Apr 2, 2008, 5:04:45 PM4/2/08
to

BTW: I successfully taught them to program in machine language. We
used lego parts to construct a psudo-turing machine with a 33 bit
register, and used Lego Mindstorm to do the programming. It would
read the position of the "register" (input), perform an operation, and
outputs the answer. To do that, they have to break down a set of 2
numbers into binary form (via pencil and paper), set the flip switches
(constructed w lego parts), hit a touch sensor to begin the
operation. The robot would then read the position of the flip
switches (via light sensor), interpret the first bit (operator: add or
subtract), then interpret the next 32 bits as 2 numbers (I only
allowed them to use addition, shift, and loops in their program), do
the operation internally in decimal, convert the answer to binary, and
"display" the result (output) using those switches. They take the
result - convert it back to decimal (via pencil and papger) and see
that the answer is indeed correct. Wow! My machine can add and
subtract!!!

They did all these without knowing that they learned the very basis of
all computer programming - they just had lots of fun doing it.

John Henry

unread,
Apr 2, 2008, 6:29:28 PM4/2/08
to
> The first results can be seen here:http://oase.uci.kun.nl/~mientki/data_www/pylab_works/pw_animations_sc...

>
> cheers,
> Stef Mientki
>
> > And you are going to teach them Java? Oh, please don't. Let the
> > colleges torture them. :=)

What do you mean by flatness of information?

Scott David Daniels

unread,
Apr 2, 2008, 11:25:17 PM4/2/08
to

I offer a _strong_ second -- Nowhere in computing have I seen it
easier to create stereoscopic views of 3-D things with a tiny
amount of code without facing a wall when you exceed their example
space.

You owe it to yourself to spend a long weekend working through
VPython; you will be _shocked_ at what you can do after three
full days of hard work. Imagine: Ruth Chabay and Bruce Sherwood
built this code in order to teach intro physics: they thought
that (and continue to teach classes as if) it was _easier_ to
teach Python and the physics than to teach physics alone!

-Scott David Daniels
Scott....@Acm.Org

Jan Claeys

unread,
Apr 2, 2008, 11:37:43 PM4/2/08
to
Op Wed, 02 Apr 2008 17:02:45 -0400, schreef Dan Upton:

> Side rant: I think Java's just fine, as long as it's taught properly.
> I'd done a little bit of C and C++ programming when I was in high
> school, trying to teach myself from a book, but I never really got
> pointers or objects. Going back to it after Java, it made so much more
> sense, even though people will tell you "Java doesn't make you learn
> about pointers."

I learned about pointers while learning Pascal (and later embedded
assembler) using Borland's tools.

Later I learned C (and even later C++), and I've always been wondering why
those languages were making simple things so complicated...


--
JanC

Nick J Chackowsky

unread,
Apr 3, 2008, 1:08:42 AM4/3/08
to
sprad wrote:
> I'm a high school computer teacher, and I'm starting a series of
> programming courses next year (disguised as "game development" classes
> to capture more interest). The first year will be a gentle
> introduction to programming, leading to two more years of advanced
> topics.
>

I have taught high school comp. sci. for a number of years, using
Pascal, Ada, C++, Visual Basic, and Python as languages. Python has, in
my opinion, given the students the best opportunity to really discover
what programming and computer science are all about. Very high level
code without the enormous learning curve for the "extras", plus easy
debugging and useful error messages make it ideal.

class Example {
// your program begins with a call to main()
public static void main(String args[]){
System.out.println("this is a simple Java program");
}
}

vs

print ("This is a simple Python program.")

Once a student has a grasp of Python and programming, he/she is better
prepared to understand _why_ Java and C++ _need_ all the declarations,
decorations, and specifications, and why they might be useful. But it's
sure nice to start doing real programming in such a simple, elegant
environment.

Nick.


--
Posted via a free Usenet account from http://www.teranews.com

Message has been deleted

Bruno Desthuilliers

unread,
Apr 3, 2008, 4:33:34 AM4/3/08
to
Jan Claeys a écrit :
(snip)

> I learned about pointers while learning Pascal (and later embedded
> assembler) using Borland's tools.
>
> Later I learned C (and even later C++), and I've always been wondering why
> those languages were making simple things so complicated...
>

Similar pattern here : I had difficulties grasping pointers in C, then
learned them in Pascal and got enlightned. Then I was able to use them
correctly in C.


Stef Mientki

unread,
Apr 3, 2008, 1:17:00 PM4/3/08
to pytho...@python.org

>> Well I doubt it's the visual environment that makes it more easy,
>> color, shape and position can give some extra information though.
>> I think apriori domain knowledge and flattness of information are of far
>> more importance.
>> The first issue is covered quit well by Robolab / Labview,
>> but the second issue certainly is not.
>> I'm right now working on a Labview like editor in Python,
>> which does obey the demand for flatness of information.
>> The first results can be seen here:http://oase.uci.kun.nl/~mientki/data_www/pylab_works/pw_animations_sc...
>>
>>
>> cheers,
>> Stef Mientki
>>
>>
>>> And you are going to teach them Java? Oh, please don't. Let the
>>> colleges torture them. :=)
>>>
>
> What do you mean by flatness of information?
>
>
What I mean is something like; all the information at a certain
abstraction level is visible on one screen or one piece of paper,
and not is available through multiple screen / multiple right-clicks
etc. A wizard in general is an example of strong non-flatness of
information (try adding a mail-account in Thunderbird, this could
easily be put on 1 page, which clearly would give a much better overview).

cheers,
Stef


mar...@everautumn.com

unread,
Apr 3, 2008, 2:08:20 PM4/3/08
to

I am a strong support of teaching programming in middle and high
school. Kids have the potential of being more than just passive
consumers of other programmers work. That is best illustrated by the
growth of game mod'rs writing their own levels for computer games.

I think I agree with all of the positive, supporting posts about
Python. I would just like to add that Python (and PyGame) are open
source and so your students can download it at home and have fun
exploring it on their own time (at their own pace). I think that is a
real positive.

ajaksu

unread,
Apr 3, 2008, 3:24:12 PM4/3/08
to
On Apr 2, 5:01 pm, John Henry <john106he...@hotmail.com> wrote:
> However, once I start teaching him variables, expressions, loops, and
> what not, I found that (by surprise) he had great difficulties
> catching on.  Not soon after that, we had to quit.

This makes me curious: how much of videogamer are you? And your son?

I ask that because when I think about teaching programming to young
kids, I imagine using terms they know from gaming, like "save
slots" (variables/names), "memory cards" (containers),
"combos" (functions, loops), "life meters" (counters), "next
level" (conditionals, iteration, loops), "teammates" (helper
functions), "character classes" and "characters" (class and
instances), "confirm/cancel" (conditionals), etc.

But I've never really tried to put all those together and find a test
subject, so I'd like to know how fluent in this lingo you both were so
I can assess my pseudo-didatic approach by proxy :)

Regards,
Daniel

John Henry

unread,
Apr 3, 2008, 8:00:18 PM4/3/08
to
On Apr 3, 12:24 pm, ajaksu <aja...@gmail.com> wrote:
> On Apr 2, 5:01 pm, John Henry <john106he...@hotmail.com> wrote:
>
> > However, once I start teaching him variables, expressions, loops, and
> > what not, I found that (by surprise) he had great difficulties
> > catching on. Not soon after that, we had to quit.
>
> This makes me curious: how much of videogamer are you? And your son?
>

You mean you are able to find a kid that isn't a videogamer these
days? <grin>

My level of videogame went as far as Black Hawk Down and that was
about it. I find it hard to comprehand why they like to do Gaiter
Hero III. With Counter Strike, at least you have some interesting
scene to look at. But then again, I am not a kid anymore (not by a
long stretch).


> I ask that because when I think about teaching programming to young
> kids, I imagine using terms they know from gaming, like "save
> slots" (variables/names), "memory cards" (containers),
> "combos" (functions, loops), "life meters" (counters), "next
> level" (conditionals, iteration, loops), "teammates" (helper
> functions), "character classes" and "characters" (class and
> instances), "confirm/cancel" (conditionals), etc.
>
> But I've never really tried to put all those together and find a test
> subject, so I'd like to know how fluent in this lingo you both were so
> I can assess my pseudo-didatic approach by proxy :)
>
> Regards,
> Daniel

Well, I can't say that I am a child education expert, I am only
commenting base on my last several years of volunteering activities.
I've found that whenever there is a visual approach to a topic, I can
hold their attention far longer. Case in point, rather than asking to
read building instructions for a Lego robot, I gave them access to
Leocad: a CAD program that allow them to "put together" a robot
virtually. They can spin the virtual robot around, break-up the
pieces virtually, and put them the robot virtually. Then they build
the real thing from there. When they're done, they can made their
product presentation using 3-D renderization programs (VPython stuff,
I can see now). With this approach, I was able to hold the attentions
of the middle school kids - even a couple of 4th graders. They were
able to "program" their robots using the Lego Mindstorm ICONic
programming language - and later onto the Labview based Robolab
language. I think the color, the sound, the icons, videos of these
visual programming languages means a lot to kids. I wish there is a
visual Python - much like the Robolab/Labview approach to programming.

Several of the kids continued to stay involved with our activities for
several years. I was able to teach them "programming" without really
really teaching them "programming". I hope they do well in high
school. But then they told me the first "computer programming" class
at the local high school will be teaching Office, Flash, ...

Of the 18 middle-schools in our district, ours was the only one that
taught the kids about computer applications and "programming" early.
Unfortunately, due to budget cut, they had no choice but to cut that
class (lack of staff). And without a teacher sponsoring our
activities, my volunteering activity is also coming to a close.

But I sure learned a lot about how kids learn (and can't learn).

John Henry

unread,
Apr 3, 2008, 8:04:53 PM4/3/08
to

In that sense, it would appear to me Robolab/Labview would do exactly
that. Most of the programs I taught the kids to do fits on one
screen.

I think what you are doing is very interesting because Robolab does a
fair amount of what I am seeing from your screen shots (for simple
applications anyway). One day when you finish with the program, may
be I can try it on my younger kid.

Bruno Desthuilliers

unread,
Apr 4, 2008, 8:06:36 AM4/4/08
to
mar...@everautumn.com a écrit :
(snip)

> I think I agree with all of the positive, supporting posts about
> Python. I would just like to add that Python (and PyGame) are open
> source

And run on most common platforms AFAIK.

> and so your students can download it at home and have fun
> exploring it on their own time (at their own pace). I think that is a
> real positive.

Indeed.

Aahz

unread,
Apr 4, 2008, 4:41:47 PM4/4/08
to
In article <pan.2008.04...@news.janc.be>,

Jan Claeys <use...@janc.be> wrote:
>
>There are at least 3 books about game programming in python:
><http://www.amazon.com/Game-Programming-Line-Express-Learning/dp/0470068221>

STAY AWAY

Speaking as half of the tech-editing team for this book (the formal title
is _Game Programming: The L Line, The Express Line to Learning_), I
recommend staying as far as possible from this book. It does an okay job
of teaching pygame, but it does a poor job of teaching Python (for
example, it does not mention dicts) and therefore has a number of flaws
from a pedagogical perspective, *plus* there are some bugs in the code.
--
Aahz (aa...@pythoncraft.com) <*> http://www.pythoncraft.com/

"It is easier to optimize correct code than to correct optimized code."
--Bill Harlan

Jan Claeys

unread,
Apr 21, 2008, 4:43:25 PM4/21/08
to
Op Thu, 03 Apr 2008 00:06:34 -0700, schreef Dennis Lee Bieber:

> On Thu, 03 Apr 2008 03:37:43 GMT, Jan Claeys <use...@janc.be> declaimed
> the following in comp.lang.python:


>
>> Later I learned C (and even later C++), and I've always been wondering
>> why those languages were making simple things so complicated...
>

> Could it be that they are closer to being high-level assembly
> languages meant to get close to the hardware (especially of the PDP
> series that C originated on), whereas Pascal was designed to just be a
> language meant for teaching algorithms and programming, not originally
> intended for production efforts?

Pointers in Borland's Pascal (and FreePascal) are bare machine pointers,
with optional typing for the referenced value; I've never seen anything
you could do with C pointers that you couldn't do with Borland Pascal
pointers. (And I think the reason why pointers in C looked complicated
is that the C syntax for pointers is inconsistent...)


--
JanC

0 new messages