Blast From the Past: GW-BASIC

A few weeks ago, I decided to clean up my bookshelves and finally toss a bunch of antiquated software development books.  Technologies like HTML 3.2, Visual Basic 6, and Visual J++ didn't survive this latest purge.  But there's one book that I just can't seem to toss, no matter how much relevance it's lost.  It's the GW-BASIC User's Guide and Technical Reference, which was included with my very first computer, a CompuAdd 8086.

GW-BASIC was a port of the BASIC (Beginner's All-Purpose Symbolic Instruction Code) language, and was one of the many BASIC products borne from the assembly line of early Microsoft.  It was packaged with earlier versions of MS-DOS, the operating system of choice for IBM-compatible PCs.

To give some insight into what intrigued me last, my copy of this book still has Post-Its on the keywords Get, Paint, and Window-- all three dealing exclusively with primitive GUI elements on the screen.  I never got anywhere with those, I'm sure of it.  But what I find funny is that the first half of the book, the user's guide, is completely devoid of marks of any kind; I doubt I ever actually read about how to actually use the development tool.  I learned by doing and didn't let myself get caught up on fundamentals like relational, logical, or functional, or string operators.  In fact, not until today did I even know that GW-BASIC even allowed low-level assembly calls!

GW-BASIC existing during a time in my life where I just didn't understand why things worked the way they did; I simply copied from a plethora of magazine articles and even a book or two (David Ahl's Basic Code Adventures and Creating Adventure Games on Your Computer by Tim Hartnell).  It was all trial and error, and it was great.

Line-numbering is obligatory.  Without line numbers, you're indicating to the IDE that you want your expression to be evaluated immediately.  Common practice was to number lines in increments of 10, with the idea that if you needed to insert another line between 10 and 20, you could choose line 12 or maybe 15 to squeeze in that additional piece of code.  A simple RENUM command will renumber the lines, including lines referenced by GOTOs.

Type-checking is kept to a minimum and is quite forgiving.  Variable types, although not required, were denoted by the following postfixes:
$ String
% Integer
! Single-precision
# Double-precision

GW-BASIC had limited support for subroutines.  Subroutines (via the GOSUB statement) were perceived as GOTOs that included a RETURN statement to bring the code execution back to where the calling GOSUB left off.

GW-BASIC's successor, QBASIC, introduced more elegant sub and function calls as well as the concept of line labels, eliminating the need to identify each line with an incremented number.  Plus it allowed mouse input, something that's easily taken for granted today.  QBASIC would set the stage for Visual Basic, which finally brought BASIC into the new graphics-rich Windows operating system.

Additional links:

So here I start.

It's been years since I've tried to create a new site.  I've wanted to start this one several years ago, but I've always wondered whether I really had anything new or valuable to share.  Plus I'll admit I've been only a spectator in new web development practices since I made the transition from static HTML to PHP scripting back in the late 90s.

Web development has truly grown up since I began memorizing that the <head> tag goes before <body> and that <table> tags are always followed by <tr> tags and that you can't just jump right into <td>.  Point is, it's not so much about needing to know pure HTML anymore (sorry, I'm not going to count the then-popular Microsoft FrontPage); it's all about themes, plugins, posts, and feeds.  "Search engine optimization..."  What?

It finally took a rainy day and inspiration from a modern blogger and friend of an extremely successful craft-making site, Craftaholics Anonymous, to make me question why I didn't just jump in and put into practice the concepts I've only read about for the past few years and share a bit of what I've learned.  There are a lot of better developers out there.  But if I keep waiting to find myself on the inside track of a bleeding-edge technology, then this site will remain just a thought in the back of my mind and it will never be realized.

So here I start.  I'm realizing it's about the journey of always striving to write better code, learning new techniques, and making mistakes along the way.  I'm not going to be perfect, but I'll give it my best shot.

- Jay