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.
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".... !-)
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?
see my other answer in this thread.
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.
> 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
--
Laurent POINTAL - laurent...@laposte.net
There is also pyglet which is quite impressive and easy to use.
André
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
I think this is proof of concept, no?
Gabriel
> 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
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. :=)
cheers,
Stef Mientki
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.
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."
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.
What do you mean by flatness of information?
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
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
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
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.
cheers,
Stef
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.
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
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).
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.
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.
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
> 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