The DIM Epiphany
Posted by Elf Sternberg as Uncategorized
When I was 13 years old, I laid my hands on my first true computer. It was a DEC PDP-11/44, later upgraded to a PDP-11/70, running RSTS/E and the BASIC/PLUS shell environment. Live every teenage boy, I started out by writing video games. Bad ones, naturally, since all we had was the ANSI escape codes on a black-and-white monitor. And while my code kinda worked, there was a statement in the BASIC language that escaped my insight. DIM.
I really didn’t “get” what this statement meant or why it was necessary. Indexing didn’t make any sense to me at all. There wasn’t anyone to explain it to me, and the magazines and books I had weren’t helping. It was literally a year before I finally had an epiphany: DIM was creating a row of boxes in which to store things, and the index numbr let me say which box I wanted. Variables were no longer just storing things; they were storing things that pointed to other things.
I had to visualize it before I understood it.
Djikstra once said that “As potential programmers, students who have had prior exposure to BASIC are mentally mutilated beyond hope of reconstruction.” While that may sound a little harsh, I suspect there’s some truth to it. For years that need to be able visualize what a program was doing before I could trust that it was correct hampered me from moving forward with a lot of different and interesting projects. To this day, I still feel like I need concrete, working examples of something before I understand what it’s doing.
It gets worse when I’m working with highly abstract material. Learning to trust that singly linked lists do what they’re supposed to do was actually hard for me. It took more than a dozen tries, and to this day if we get past five links of responsibility I have to find a way to abstract the thing I’m working on into a singular concept, beating it into my brain that it’s okay, that chunk of code is going to do what I want it to. I want to know down to the electrons flowing through the wires what’s going on with my code.
A friend of mine, a highly accomplished mathematician in his own right, is fond of the notion of notation as a tool for thought, and that getting past the need to visualize is a critical stage in mathematical thinking. That’s probably true, and I fear I’ll never get past that critical stage. Indeed, at my age, it may already be too late.
That’s not going to stop me from trying, of course. I am not going to treat programming as applied demonology, which is what most developers do these days. Giving is just not in my nature.