When I was 7 or 8, I learned BASIC on my Commodore 64. A neighbor geek came over to "instruct" me once or twice, but it didn't take him long to teach me everything I already knew. So mostly it was just me and an instruction book. All I really did was play with the PRINT command and change the screen colors, and freeze my computer with bad GOTO loops, but it was a start.
When I was maybe 13 or 14, I started playing in QBASIC. I had visions of making a database to help my mom track her Mary Kay clients and her piano students. Or a program to input and then print a grocery list. I remember that there was a column for "quantity," but I forgot to include an option to select units, so things went a bit awry when my mom wanted rice. But I was, and still am, proud of myself for getting a very decent grasp of the language with no help beyond my own memory of the original BASIC and the onboard QBASIC help files (if you've ever tried to learn programming from onboard help files, you know why it's an achievement!)
When I was in college, I stumbled across an old DOS ASCII-based game called ZZT. It came packaged with a programming interface! Complete with tutorials and help files. You could, in other words, learn ZZT-OOP and design and program your own game! There were even packages you could download (from the small internet community sprung up around the game) for advanced characters and colors. So of course, I made a game. Well, mostly. The plot and action are finished, but there were some finishing touches and revision that I never got around to. All in all, though, it wasn't half bad! I even uploaded it to have it critiqued by the online community - other people have played my game! And there were lots of suggestions for improvement, but most people liked it at least to some degree. It's the most gratifying experience I've had in programming so far.
The other day, DH suggested that I might like to dink around a little in Visual Basic. So I went to the Microsoft site and got VB Express and I've been playing with that. Of course, as someone who is used to old-fogey-style programming with line numbers and all, I have a lot to learn. I'm very quick to grasp concepts, it's just that in moving to object-oriented programming, there are so many new concepts to grasp! And I admit lots of times I miss my line numbers. But I'm having fun learning something new again. Last night before going to sleep DH and I talked for a long time about functions and subs and the issues I'm having with my projects and with the new language. He's a tech guy himself and it really shows how much he enjoys both explaining these things to me and me being able to discuss them with him.
I'm already up to my old tricks. At one point in the tutorial, they have you create an interface of two text boxes and a button, and when you click the button, it adds the values in the fields. I cocked my head to one side and said, "Hmm. Why not make a button for all 4 arithemetic operations? And then maybe I can have it display the result in a label here...ooh and put a label between the text fields that will show the sign of the operation you chose. A little instructional text at the top...and I'll need a failsafe in case you accidentally put in a letter..."
Many, many hours later...
I've given up on the instructional text. I spent at least two hours trying to figure out how to get a label to wrap, and all I found are really complicated subs that don't seem to work, or ways to make a text box look like a label. There has to be an easier way, but the wall by my desk was getting a distinctive head groove so I gave it a rest.
After several hours more of playing with if/thens and wracking my brain and the help files for some way to stop the program from calculating if either value is nonnumeric, I finally, finally discovered try/catch. And now, it's working! So I spent an entire evening and part of an afternoon, making a ... calculator. You know, that thing that we've all got for free in our system tools. But this is my calculator! *grins with pride*
Along the way, I'm enjoying the "manual humor." The same manual that contains pages and pages of stuff like this:
- "A Catch statement with a When clause will only catch exceptions
when expression = True. A When clause is only
applied after checking the type of the exception, and 'expression' may
refer to the identifier representing the exception. "
I also enjoyed the heading titles in the chapter on debugging called "What went wrong?" Namely the heading for runtime errors, "It won't work!" and the heading for logic errors, "What? It wasn't supposed to do that!"
But the best quote for the day in all of this comes from me:
"Honey...I just made the worst possible typo in binary."
"Huh?"
"I typed a 2."
Somewhere out there, a universe is exploding.



