This series will review several Python programming books, but let me enjoy some nostalgia first.
I’m self-taught, and my programs only have error checking if it’s faster to do that than restart if I make a typo when using them. My husband, with 20 years in the business, laughs at my little programs and, after I work at something for hours, can find the problem in minutes.
My first language was AppleSoft BASIC, from the books that came with the Apple II. I was 13. The graphics mode and game paddle were built into the language, so immediately after counting from one to ten I made a ball cross the screen, in two dimensions, and made the ball move when I moved the paddle. I wrote a program of several hundred lines to keep track of my Pathfinder (Girl Guide) badge progress. My advanced math class learned matrices as an extra, and the teacher asked me to teach the class about multiplying matrices with a computer program.
Dad thought I was getting cocky, so he introduced me to FORTH. Its lack of a GOTO floored me, even though I’d avoided spaghetti code. I still miss FORTH’s BEGIN-WHILE-REPEAT loop, which exits in the middle. (Modern languages’ ‘while True’ still distracts me.) Stack arithmetic was an eye-opener. (Yes, I later bought an HP calculator.)
I learned more from the AppleSoft BASIC book and the second chapter of a Pascal book from the library than I did in two high school courses in the 80s, which were supposed to teach me BASIC, FORTRAN and Pascal. Well, I did learn another operating system (CP/M) and how to debug classmates’ code. The final assignment of analyzing a paragraph in several ways was a nice challenge. I was the only student to complete the assignment. The teacher was temporarily confused by a variable that said whether to print to the printer (for the final submission) or a file (for debugging) and the option to run through each analysis method in order rather than sit at the computer and enter each choice one at a time.
My first university work-term was to write a FORTRAN program to analyze Xray crystallography data. I learned FORTRAN from DEC manuals. Next term had a required programming course. A classmate reached the end of the course without learning that a FORTRAN math program needs four sections: housekeeping, data input, data manipulation, and data output. The only things I learned in that course were the differences between work’s computer and the school’s, five ways to find root-finding algorithms, and two sorting methods.
When I got a Mac in my sophomore year, I also got LightSpeed Pascal, which included a tutorial on Pascal and event-loop programming, and some advanced Mac programming books. I confused the Process Control TA (who later sat down and learned) by using an event loop in my BASIC program to monitor and control the unit’s feedback loop.
The guy I liked was a programmer, so I asked to borrow a Pascal book. He finally married me to get it back. He’s amused at my pitiful attempts, especially when I spend hours searching for a bug he finds in seconds.
I almost had a cribbage program in Pascal working on the Mac. I did a few reports on VGA Planets data sets in C++ (part of my husband’s program to help him make turn files). A few years later I learned a bit of PHP to configure my website. (I use PmWiki.)
But none of the later languages had the simple joy of AppleSoft BASIC.
My husband likes Python for quick utilities and wrote some for me, but I got frustrated with asking him for every “small change”. So, with the help of the online documentation and a working program to start from, I learned Python (for a small value of “learned”). (If anyone wants to insert ssml delay tags in txt files so a speech-to-text reader will read at a specific, slow wpm for shorthand practise, including calibration, let me know.)
Python has almost all the features I missed from AppleSoft. It has a command-line interpreter so you can do something neat before using a program file. There’s no compile / link cycle. PyGame gives it a simple graphics interface. It runs quickly and has a decent debugger (though not as nice as C++). There’s a bit more housekeeping than with AppleSoft, but it’s only a few lines.
All this had me thinking about my 12-year-old son. It’s time he learned. (Yes, I messed up by being enthusiastic, sigh. I used to catch Dad’s enthusiasm, but my son isn’t like me.)
For all the kids’ books, you should be in the next room. Sometimes an extra eye when debugging can be the difference between frustration and accomplishment. Also, you should quietly work through the first chapter or two yourself to catch differences in your installation.
My plan is to review the following books: Invent Your Own Games with Python, Livewires, Snake Wrangling for Kids, Dive Into Python, Introduction to Programming at Pasteur.fr, and the tutorial that comes with the language.
Filed under: Uncategorized | Tagged: computer, kids | Leave a comment »