Last time, I talked about how a scavenged TI-82 calculator became a foundational part of my learning. Despite doing plenty of computer programming, I very much cut my teeth on the calculator’s built-in programming language. But what exactly did I do with it?
I should first note that there are some truly amazing calculator programmers out there, ones who make me look utterly small-time. There was also a completely different way to program the calculator as well: directly in assembly for the Z80 processor that powered the device. All the truly wizardly hackers would bypass TI-BASIC entirely and write their programs in assembly. I offer this disclaimer up front, lest I make myself out to be one of the greats!
A good portion of the programs I wrote were actually for class. If I felt like a concept we were learning could be automated and written up in a program, I would do so. Most of my teachers had a fairly enlightened policy on using calculator programs: if you wrote the program yourself, you could use it. If you just got the program from someone else, it was cheating. I felt this was entirely reasonable, because I certainly wasn’t interested in cheating. I just saw a menial task (such as solving a triangle or applying the ideal gas law to a word problem) that could be easily expressed as a program.
(Apparently some kids would attempt to actually cheat on tests by writing down cheat sheets as a “program” in the calculator and then calling up the program during the test. Some teachers would require students to clear their calculator’s memory before a test, something I was loath to do because the memory contained all the programs I’d painstakingly written. Fortunately, I had a reputation as a good kid so I was never forced to clear my calculator’s memory when I explained why I didn’t want to do so and promised I wouldn’t cheat. I did in fact keep that promise.)
I wrote programs to do every mundane little thing I found myself needing to do on a regular basis. Greatest common factor? Sure. Lowest common denominator? Got a program for that. Prime factorization? No problemo, so long as you have the time to wait for my very inefficient algorithm to run. Not just my math classes either; chemistry, biology, and physics all offered up ample opportunity to make my life easier with a simple program or two.
(Sometimes, I was able to make my life much easier. One particularly memorable chemistry lab when I was in college, the lab assignment made the mistake of giving just enough information that it was possible to write a program to figure out what the results should be without actually performing the lab. I noticed this fact and whipped out my calculator. My lab partner, a cute girl from my class, began doing the experiment. After a while, she got a little testy with me and suggested that it would go faster if I helped rather than screwing around. The programming gods smiled upon me that day, as right then I had finished my program. I showed her the screen of my calculator and said “I was just going to write this down and call it a day.” Her eyes got big and she quickly copied down what my program had come up with. I felt that I grew in her estimation that day, although every subsequent lab she would ask me if I could just solve it on my calculator and I usually had to tell her, no, we were going to have to do this one the old-fashioned way.)
Maybe I’m weird, because one thing I really enjoyed writing was menu programs. As in, I would draw an interface on the screen programmatically using the drawing and graphing mode and then write the code to let the user navigate the interface. Few of these interfaces actually accomplished anything particularly useful, but I still enjoyed writing them.
I did write a flash card program to help me study Spanish that used some of this interface code I wrote, so I guess it wasn’t a total loss.
I spent a lot of very useful learning time on that calculator. My calculator programming didn’t quite end with the TI-82, but those stories will have to wait.