Sunday, December 4, 2016

My Path to Programming

Inspired by Dan Luu’s post about the same, in turn based on Tavish’s.

For me, it really started with a sibling rivalry.  I wanted to try everything my older brother did, and secretly, I wanted to be better at it than he was. We had wars about who could write better BASIC programs.  When my dad bought AssemPro for our Amiga, my brother decided to learn it: therefore, so did I.

I continued annoying my brother to no end by stealing his programs, but ultimately, our interests diverged.  He wanted to write an epic RPG and I wanted to write… my own Workbench, I think?  Neither of those ever came to fruition, but ironically, I would go on to write an RPG for TI-86 in high school.  I started learning to hand-assemble Z80 for that calculator, but never really finished anything important.  As you might imagine.  Counting jump offsets is not the most fun thing to do.

Regardless, I became ever more fascinated by the idea that, at some level, “placing bits” made meaningful imagery appear on the screen, and like my late grandpa (whose most famous computer question is now, “When you press the ‘A’ key, how does the computer know that it’s an ‘A’?”), I wanted to know how it all worked.  The ISA and I/O registers, OS, syscall interface, libraries, applications: it was a glorious tower of puzzles to solve.

I took a few “computer” classes in high school, but didn’t really get far enough to get real benefit out of it.  I seem to have skipped the “how to use Word” level and gone to “DTP with PageMaker” (yes, really) and “HyperCard,” but then Computers IV didn’t fit my schedule and was a prerequisite for Computers V.  I can’t remember what IV was, but V was basically an ‘independent study’ where each student wrote something in C.  That probably would have suited me, and I missed out.

Ultimately, the time came for me to go to college (because that was The Plan: boys must go to college to get a good job to support a wife and kids) and declare a major, and I knew I liked programming and computer architecture, so I declared the only computer major I really knew existed, Computer Science.

I started college on the cusp of the JavaSchool phenomenon, so I narrowly avoided “having to” learn Java, which seemed like it was being imposed by some outside authority, which automatically means it was useless and doomed. (In hindsight… HAHAHA!) Instead, I learned C++ with a goofy professor and some C with the Evil Genius professor at community college.

The goofy professor was teaching all out-of-order because he wanted to find out if students could understand ‘advanced concepts like functions’ within six weeks.  (I found this out when a memo of his on the topic turned out to be the back side of my scrap paper in calculus class.  Why did I even take calculus? It’s been 15 years, and I still don’t really know.  I remember being furious at him, though; I felt like ‘students could understand’ because of the efforts of the few of us who already understood, teaching everyone else in lab classes.)

The Evil Genius professor liked to give out problems with subtle hints on the true nature of the system, then see if students picked up on them.  We had some time on a Cray in a distant university, where we wrote some trivial MPI programs.  Our very first assignment treated the memory as if it were shared, using an array of buffers, indexed by CPU ID; a later assignment had all CPUs apparently sharing a buffer, as if all memory were private.  Writing the final program with distinct buffers per CPU (as if memory were shared) then disqualified it from receiving the + in A+.

I transfered to a university that had joined the Java religion, but I managed to sneak into enough 200- and 300-level classes and friggin’ ace them, that they decided I didn’t actually need to do the introductory Java courses in order to graduate.

We studied theory (I finally learned what “NP-complete” really meant), MIPS architecture, C++ (I still don’t know why the advanced courses hadn’t been painted Java), Nachos, software engineering, and for my electives, machine learning and FreeBSD.  On my own, I studied Perl to learn a scripting language and GTK+ to learn a GUI.

I thrashed around after college a bit.  I didn’t know if I wanted to “get a tech job” and sit at a desk and stuff, or if I was ☆Better Than That.☆ I had to do something, though, so I worked in food service for about a year, then decided that the life of making the same consumables over and over was just absolutely dreadful, and found a way to put my actual education and passion to work.

It feels like it’s taken serious lucky breaks to get each successive job, but I’ve had the luck, so… ??? I don’t know how I feel about it.

I moved “up” into project management a year ago, trading a better life for better pay.  I’m still ambivalent about that: in theory, it frees up my creative energy for more of my own projects.  Maybe something will come of that.

I worry a bit about both becoming a dinosaur, and becoming a not-dinosaur who is still unhireable due to ageism.  (That’s really weird to me, too: who thinks we should spend 20 years mastering a craft, then we become unsuitable for it? I know I wouldn’t have listened to “old guys” 10 years ago, but now I wish someone had been around to at least try to talk sense into me.  Maybe I could have gotten more done already.)

Bonus chatter:

We had the Amiga because my dad hated the x86 architecture, and swore off Intel chips forever! (Alas, it was not to last quite that long.) I grew up with computers in the house, but they were always Commodores until the company finally, without a doubt, folded for real.  We got our first Intel PC in 1996 and it was shocking that Windows 95 didn’t come with any programming language.  Until then, the C64/Plus4/Amiga 500 had all included BASIC.

Some time after learning GTK+, I looked back through what I’d done, and realized that the Amiga’s screen data structure contained a linked-list to every window on the screen, and these were both simply structs in C terms. Another shock was that I had actually been on the track of discovering event-driven programming, because I had found—and managed to call—WaitForEvent, and realized that it solved the “CPU usage issue” even though I didn’t quite grasp event loops yet.  I kind of regretted that I didn’t get to do more on the Amiga; it was fairly approachable, compared to Linux or Win32.

I picked up C pointers after a bit of struggle; in a flash of brilliance, I suddenly saw how they related to assembly, and realized there were names for what I had been using.

My brother is now an urban planner who does a lot of photography for fun.

No comments: