The way to be a programmer is to program
In Tassajara Cooking, one of my favorite cookbooks, Edward Espe Brown says that “The way to be a cook is to cook.”
He’s right. And the way to be a programmer is to program.
My first computer program was:
- 10 PRINT "HELLO THERE. I AM YOUR NEW TRS-80 MICROCOMPUTER!"
I know this because it’s the first program in the TRS-80 manual. I don’t know what my second program was, because I tend to go off-track quickly when reading through programming manuals. It is a lot more fun to learn by doing and making mistakes than copying rote lessons. I’d never used a computer before, never seen one in person, and bought it really as a glorified calculator: I’d been saving for a calculator, realized that it would only take a few more months to get a real computer, and bought a used TRS-80 Model 1. It seemed like a good idea at the time.
But unlike modern computers, it didn’t come with any software other than BASIC. In those days, everyone who owned a computer was expected to be a programmer. It was how you got your computer to do anything. There were books filled with programs to type in. I stayed up late typing other people’s code, and learning from it. From code that did something useful, not just code designed for lessons. This is what I tried to emulate when I wrote 42 Astoundingly Useful Scripts and Automations for the Macintosh (Plug: also available in print•.)
I also subscribed to magazines that printed computer programs for readers to type. Those programs came from their readers—readers who wrote programs that did something they found useful, and sold their programs to the magazines for others to use. My first sale, to Hobby Computer Handbook, emulated a Mattel handheld baseball game. My brother had one, and I wanted one. It was a problem that could be solved by programming, so I wrote a program. I used the money from the sale to buy an expansion unit with more memory for the Model 1.
The first serious program I wrote for the TRS-80 was a word processor, in BASIC. I had saved to buy a word processor, and I went to a local electronics fair—an amateur radio convention—to buy one. I thought I’d be able to get software cheaper there than through mail order, and I’d be able to see it in operation before buying it. I was right. What I hadn’t considered was that I’d also be able to see great games in operation, too.
I came home with a copy of Space Invaders and a determination to write my own word processor. Games were hard, I reasoned, but a word processor, I could do that. The word processor I wrote was, frankly, nothing special. I never tried to sell it, even to a magazine. But it worked. I used it the rest of the way through high school and into college.
And when I wanted new features, I could add them. Something I couldn’t do with Space Invaders. Space Invaders was somebody else’s. That word processor was mine.
In college, I took a couple of classes on computer programming but most of my learning came from writing programs to get stuff done. I graduated with a degree in Psychology. I had this idea that the future of computer programming was going to be boring, that it wasn’t worth making a career of. I drove west to learn guitar for one year in Hollywood.
It seemed like a good idea at the time.
Even at music school I was always programming, to solve problems that I needed to solve when I needed to solve them. Once you understand programming, so many repetitious tasks yield themselves to programming solutions. Musical interval drills, for example, for ear training, and dynamic metronomes for speed practice. By this time I had a TRS-80 Color Computer 3 which could make rudimentary music and color graphics.
When I completed music school without a degree—I flunked funk—I moved down to San Diego from Hollywood in a van that couldn’t go in reverse. I began programming with a friend for a collegium of professors at the University of San Diego, on the Macintosh. We programmed The Warsaw Project, an interactive exploration of the Warsaw ghetto and uprising in Poland during World War II. We created this software in HyperCard (HyperTalk) and in C, for the Macintosh.
I continued programming on the Macintosh, on the Color Computer, and on whatever computers I could access. About 1993, one night while running backups for the University—they had to halt the computers to run backups in those days, and they did this at night to inconvenience as few users as possible—I installed NCSA httpd, an early web server, on one of the school’s minicomputers. I programmed for it in Perl and in C, and, later, in Apache’s scripting language.
Few people at the University—including me—had any idea what the World Wide Web would lead to, but it seemed like a good idea at the time. I continued to program for our web server. I added AppleScript to the languages I used after installing an Australian’s shareware web server on my Macintosh workstation.
The World Wide Web exploded; the side project became my full-time job. I continued to program in Perl and added PHP and then Python/Django to my toolkit. New side projects included writing occasional essays for my web site, a task we would today call a blog.
I wrote about my experience programming WordPerfect in more detail for How to Become a Programmer at UpJourney. That job was immediately post-college, it wasn’t even meant to be a programming job, but if a problem can be solved by programming, I’m going to do it. It wasn’t completely crazy to write a program in WordPerfect’s macro language, but it was crazy enough. In the version we were using, WordPerfect’s macro language couldn’t even use variables to compare found text. But it could open new documents, it could search, and it could branch on the success or failure of a search. So I used documents as variables, and it worked. We could produce clean text faster and more reliably than by hand.
This was one of the most influential experiences of my programming career. Not because programming in WordPerect was helpful later. I never programmed using WordPerfect again. But I did learn that transforming how you look at a problem can transform the ability to solve that problem.
Schools and lessons will tell you what is impossible. But only experience will tell you how to do the impossible.
- 42 Astoundingly Useful Scripts and Automations for the Macintosh•: Jerry Stratton at Amazon.com (paperback)
- If you have a Macintosh and you want to get your retro on, take a look at 42 Astoundingly Useful Scripts and Automations for the Macintosh. These modern scripts will help you work faster and more reliably, and inspire your own custom scripts for your own workflow.
- 42 Astoundingly Useful Scripts and Automations for the Macintosh
- MacOS uses Perl, Python, AppleScript, and Automator and you can write scripts in all of these. Build a talking alarm. Roll dice. Preflight your social media comments. Play music and create ASCII art. Get your retro on and bring your Macintosh into the world of tomorrow with 42 Astoundingly Useful Scripts and Automations for the Macintosh!
- How to Become a Computer Programmer, According to People Who Did It
- “Programmers need life experience, an appreciation for design, and patience working with other humans. Computer Science degrees prepare you for the abstract, the ideal, in other words, things that never occur in real life.”
- Learning to program without BASIC
- If BASIC is dead, how can our children—or anyone else—learn to program? Today people interested in programming have far more options available to get started hacking their computers.
- The Tassajara Trilogy
- Review of The Tassajara Trilogy: Tassajara Cooking, Tassajara Recipe Book, and Tassajara Bread Book, with a recipe for Smoked Greens.
More programming for all
- 42 Astoundingly Useful Scripts and Automations for the Macintosh
- MacOS uses Perl, Python, AppleScript, and Automator and you can write scripts in all of these. Build a talking alarm. Roll dice. Preflight your social media comments. Play music and create ASCII art. Get your retro on and bring your Macintosh into the world of tomorrow with 42 Astoundingly Useful Scripts and Automations for the Macintosh!
- Internet and Programming Tutorials
- Internet and Programming Tutorials ranging from HTML, Javascript, and AppleScript, to Evaluating Information on the Net and Writing Non-Gendered Instructions.
- Our Cybernetic Future 1972: Man and Machine
- In 1972, John G. Kemeny envisioned a future where man and computer engaged in a two-way dialogue. It was a future where individual citizens and consumers were neither slaves nor resources to be mined.
- No premature optimization
- Don’t optimize code before it needs optimization or you’re likely to create unoptimized code.
- Why should everyone learn to program?
- Anything that mystifies programming is wrong.
- Two more pages with the topic programming for all, and other related pages
Jerry Stratton is a computer programmer and writer, and the author of 42 Astoundingly Useful Scripts and Automations for the Macintosh•.