I just got a really interesting message last night from my old college roommate Dan. He's got a couple of kids now, and his son Alexander is learning Java, because he plans to take a programming course this summer to learn programming for Minecraft. Obviously, I can understand his motives. Aside from my own experience with the game, my godson Sean, who's the same age as Alexander, is a Minecraft fiend, and may be looking into similar esoteric matters.
So Dan set him up with NetBeans on his Mac, which is a good choice, though I prefer Eclipse myself. And the kid is just going to town with it, apparently. The thing that concerns Dan is, he refuses any kind of formal instruction in the language or object-oriented development in general, or even reading one of the many books about programming Java. He just watches various YouTube videos, and Googles for snippets of code that he copies and pastes, trying to come up with something that does what he wants. To Dan, who has more formal computer-science education than I do (he went up to UC Davis for grad school after we graduated from UCSB), this is somewhat dismaying. It even seems a little haphazard to me.
Yet, if you look back on it, is this really that much different from the way people like Dan and me first learned programming? Of course, we were working with much less-powerful machines and tools; I had a TI-99/4A back in those days, and I was lucky enough to have the (expensive!) Peripheral Expansion Box with the disk drive (all of 90K of storage on a single-sided 5-1/4" floppy disk!) and the 32K memory expansion card, for a grand total of 48K of RAM. And the most powerful language I was using was the Extended BASIC cartridge. As for outside information resources, all I had was the occasional book and a subscription to an early computer magazine. I didn't even have a modem to dial into BBSs; I think my parents were afraid I'd turn into a system cracker ala David Lightman in WarGames. And, needless to say, I'd never even heard of the Internet in those days. So I persevered, spending long hours at the keyboard, scrawling out lines of BASIC in endless pages in notebooks, tracing out sprite designs on graph paper left over from my Dungeons & Dragons gaming and converting those patterns to hex numbers to put in source code, patiently organizing sound-chip calls (such-and-such a frequency, at such-and-such a duration, for each individual note, to play tunes), and impressing my friends with the results whenever they came over to see. I had no notion of even structured programming, let alone more modern and esoteric techniques; I just did what worked. And it managed to hold my interest long enough to get me to the University, where I started really tearing into code development. (Even there, I was still learning. I think of all the computer time I blew through on an old PDP-11/70 they had there, creating code for an adventure-type game, because I hadn't yet learned how to properly design a lexical analyzer.)
In the modern age, of course, it's much easier to get started. Since he has a Mac, Alexander already has a Unix system much more powerful than anything Dan and I were using in college. All the tools he needs to start programming are freely available. Thanks to the open-source movement, there is a plethora of code out there he can use, learn from, and improve on, all of it easily findable via Google. And there are tutorials, both printed and audio-visual, right at his fingertips. Yet, at the same time, there's much less motivation to actually learn programming. Computers these days do many useful things right out of the box, as opposed to my TI, which popped up a title screen, then a menu, then just the prompt "TI BASIC READY" and a blinking cursor. Most kids these days don't seem to get beyond game-playing, Microsoft Office, and the browser, and, even in the schools, "computer classes" have been limited to just learning how to use computers, rather than program them. (That was, in fact, the inspiration for the Raspberry Pi Foundation, which designed its $35 Linux machine for kids to learn programming on. Of course, a "real" computer that cheap lends itself to all sorts of other uses.) So Alexander is already noteworthy among kids for getting as far as he has. Still, if he decides to actually go into the field, I suspect he'll have a lot of bad habits he'll have to unlearn. That's not necessarily a problem; for many years, Linus Torvalds was able to develop, and coordinate the development of, his famous kernel without even proper version control. (And he wound up writing that himself, too.) Talent can substitute for proper technique, at least, up to a point.
For Dan, this is a great opportunity for father-son bonding, much as dads in earlier years would help their sons with model airplanes, or play catch with them out in the yard. At least once, Dan speaks of being involved in an intense debugging session with his son, only to have his wife and daughter get home and be dismayed because they hadn't started dinner yet. (Hey, ask Sabrina how hard it is to drag me away from the console when I've been coding!) And he was able to impress his son with a simple recursive function that calculated the Fibonacci series, something we all learned pretty early on in our programming education. I suspect, though, that soon enough, it'll be Alexander that's impressing Dan, as he starts moving into areas Dan hasn't dealt with. Something tells me, though, that he'll turn out all right.
And as I hung up the phone it occurred to me,
He'd grown up just like me,
My boy was just like me
Harry Chapin, "Cat's In The Cradle," 1974