I haven't written a lick of BASIC in years, now. But because 2014 marks its 50th anniversary, I simply have to tip my hat to the language that introduced me to programming back when I was a kid.
According to the wikipedia article for Dartmouth BASIC, May 1, 1964 is recorded as the date when Kemeny and McGeachie successfully fired off their first BASIC command. As for me, I didn't successfully fire off my first BASIC command until almost twenty years later. I was just a wee lad, copying code verbatim from my 3-2-1 Contact magazines on some variety of Tandy computer with an external cassette drive. Of course, I almost always mistyped something, so they only worked right a fraction of the time.
It took me until about 1987 for me to really start understanding the language concepts well enough to actually start creating stuff from scratch on our Leading Edge Model D with GW-BASIC. I'm still not sure what the GW stands for – no one is – but I spent many fond days slingin' some GW, trying (mostly unsuccessfully) to make video games. They weren't anything to write home about, of course, but it's still fun to think back about it.
By 1992, I moved on to QBasic, and eventually QuickBasic, on my Packard Bell. I was finally able to let go of those silly line numbers! This is also about when I actually started succeeding in completing some games. Again, they weren't all that impressive, but it was fun to finally see some of my own creations come alive.
I both laugh and cry every time I look back at the code I wrote those years. Every code smell imaginable could be found in abundance in those games. But, you know... I was having fun and learning how to program. And it definitely gave me opportunity to learn the pains of poorly structured programs -- more my fault than BASIC's, I'm sure.
Here's a snippet of code, circa 1993, to show you just how bad it was.
Yeah, wow... that's a mess! Here are just a few things wrong with it:
- An empty loop, to tweak the timing
- Some pointless comment
- GOTOs for flow-control
- Waaaay too many if/then statements
- Esoteric variable names
I'm glad to say that I don't program in BASIC these days, but I'm also very grateful for all the fond memories. So thank you, BASIC, for giving me a chance to explore programming! You set me on a wonderful career path – I love writing code just as much as I did when I was a geeky 10 year-old!
No comments:
Post a Comment