[Tutor] Learning programming

John Kleinjans johnk@meta3.net
Sat, 03 Apr 1999 07:07:29 -0600


I generally start teaching programming with Qbasic. Then, when the kids
know something about (list of topics here) I like to move on to ANSI C.
I've stayed away from C++ so far. Python looks like a good OO language.
I'd like to learn Python and OO thinking/programming, too. 

-----

I got Python running, read a pile of docs, started working through the
tutorial Python in interactive mode), and wondered how to actually write
and run a program. I think that beginning programmers would like to know
how to do this (and would _not_ be able to figure it out). 

figured this out:

1) get a windowing environment running
2) get Python running in one window
3) get a text editor running in another window
4) with the text editor, write your program (call me "prog")
5) save your program to disk 
    a) in the Python directory
    b) with a ".py" extension
6) switch to the Python window and
>>> import prog
7) at his point,
    a) your program might actually run
    b) you'll probably get some error messages
8) switch back to the editor window
9) edit the program. Try to fix it.
10) SAVE IT TO DISK AGAIN
11) switch back to Python and type
>>> reload(prog)

-----

At this point, 7 through 11 keep repeating. 

Beginning programmers would take a very long time to figure this out.
They'd probably quit first. 

Please tell me; am I doing this the hard way? Or is this the way? 

We should probably provide more detailed instructions for users of DOS,
Macs, even Windows. Realistically, that's what's running on most boxes
out there... there's a lot of kids with W95 (or even W311, or DOS) boxes
who would like to learn how to program. 

-----

So now, of course, the newbie has to write a program like ...

print "Hello world\n"

... and get that running. And that is the big hurdle for someone who is
learning how to program for the very first time. Even in Python. 

-----

I teach high school--that'll probably (assuredly) affect what I see and
say. That's not so bad. And I teach programming (and some other things). 

Well, I'd like to see if this effort gets from here to there (and back
again) before I put more into it. 

John K