Spotty Knowledge

February 15, 2009

As part of my recent nostalgic binge I flipped through my original TRS-80 Model III user manual. It describes Basic and various things about the computer, memory layout, etc. I was surprised how many things I had never learned at all. There were constructs I kept seeing in other people’s programs that just never occurred to me to look up.

For example, I always just used plain variables, but you could use a symbol to specify the type of the variable. So if you just wrote X for a loop variable, that’d be a float, and I knew that X$ was a string, but never figured out that X% was an integer and X# was double precision.

The first five years I was programming I didn’t even know there was a distinction. Yet I just found a whole section in the book explaining this quite clearly. There was also a section on machine language (the USR() function), the EDIT command (which I knew about but never learned), and dozens of other things I would have benefited from. I never took the time to read the manual. I think this held me back significantly.

Later I learned Pascal on a PC (Turbo Pascal!), but again learned by reading the example programs that came with it. To this day I learn new things this way. It results in very spotty knowledge. The Java Spring Framework, for example, has a zillion useful modules, but I only know the one I need, and only know the parts that were in the example file. And what’s that crap I put at the top of XML files? I could go on listing examples but I would end up listing everything I know.

Why do I learn this way? Basically, I’m impatient. I’m motivated by results. The quickest path to seeing something up and running is not the path that will thoroughly teach me the library or language or software product.

I recently had to learn PostgreSQL for a project with a friend. Affected by my recent regret about my TRS-80 knowledge, I spent a day reading half the PostgreSQL manual. In the two weeks since, using PostgreSQL has been a qualitatively different experience than anything else I’d done so far. Everything came easily and it made sense. My classic approach would have required much more trial and error and would have resulted in inferior use and design.

It still might have been faster overall to skip the day reading and hack at the schema syntax, but I think it’s time I stopped programming like I’m 12.