Banner
    A Boy And His 286: Into The Coding Wilderness
    By Samuel Kenyon | January 24th 2011 11:13 PM | 8 comments | Print | E-mail | Track Comments
    About Samuel

    Software engineer, AI researcher, user experience (UX) designer, actor, writer, atheist transhumanist. My blog will attempt to synthesize concepts...

    View Samuel's Profile
    Every boy should have a journey into the coding wilderness. To prepare yourself for this chronicle, imagine an Australian walkabout, except in the Grid of Tron.


    ASCII'd (click for larger image)

    This story begins with my first PC. It was a hand-me-down 286 Turbo, which was 1980s technology (but I got it in the 1990s).


    Turbo (reenactment).

    I had used various computers before that (PCs, Apple IIes, Macs, Nintendos, etc.), but it wasn't until I completely owned one that the real exploring and learning began. When you have your own computer in your room it is truly personal--you have free reign to hack it, break it, fix it, and explore new worlds with wild abandon.


    Wild abandon.

    The first development environment I used was the then ancient Microsoft GW-BASIC (which first came out in 1983 and was bundled with MS-DOS). Microsoft got their start with BASIC interpreters (Altair BASIC in 1975) and continued making excellent (for BASIC, that is) IDEs all the way through to the VisualBasic years.

    GW-BASIC may look pretty lame compared to pretty much everything that came after it, but it does get points for having a function called TRON (you can see it listed in the function keys at the bottom in the code screenshot above).

    The way it happened was I was exploring the programs on the computer and ran GW-BASIC, having no clue what it was. I was presented with a mostly black screen with a prompt, not entirely unlike a DOS prompt. I was not at all impressed and started typing guesses at what the quit command would be. Nothing worked, so I went to find the printed manual and located the command that would quit: SYSTEM, and it worked. But it was too late--I was already reading all the other commands in the manual and immediately set out to make some graphics appear on the screen, and of course try to make video games.


    Screenshot from my first program.


    Let the blazingly advanced graphics melt your eyeballs.

    From the get-go, I was coding from scratch. But I found that analyzing and modifying existing source code published in books was a way to accelerate the first phase of learning. The books were usually several years old by the time I got to them--in the 1970s and 1980s they would print BASIC programs in magazines and books and the readers would dutifully type them in and try to run them. Some of those programs were for other dialects, such as on Trash-80s (RadioShack TRS-80) and other 1980s relics, so I had to translate them.

    Puberty and Programming

    The early to mid 90s were exciting times for me: I was finishing puberty, I was teaching myself to program computers, and the World Wide Web appeared.At age 14 I got my first legal paid job (of course I had done jobs before that but not official taxed jobs) during the summer with a youth job training council in NH held at the local high school (which I had never seen before, still being in middle school), which then placed me in an accounting office (David L. Connors&Co. in Concord, NH). I was like an intern, except I didn't learn that much about accounting because I preferred to spend most of my time making spreadsheet macros as that was the closest to programming I could get there.

    They were running Windows 3.11 at the time and once while exploring that I discovered a link to the DOS program QBasic, which was Microsoft's free subset of QuickBASIC, their much better BASIC system spawned in the 1980s. When you've been using GW-BASIC, the QuickBasic family is like a revolutionary jump forward.


    Wallow in the deep blue sea of QuickBasic 4.5

    For one thing, the IDE is probably the most user friendly DOS program I've ever used. I particularly liked the feature showing just one subroutine/function at a time in the buffer (and accessing the list of subs with one key press). In fact, I've been wanting that same feature in IDEs ever since but they never have exactly that, and only recently with code folding can I do something that results in equal efficiency. QB also had a built in help system that was useful.



    The second thing is the language itself--not only had it grown, but it added intrinsic support for structured programming. Previously, BASIC programs would quickly turn into spaghetti code. You could still write spaghetti of course, but now you could control the insanity better with true subroutines, functions, do loops, data structures, etc. And those damn line numbers were no longer required.

    The Golden Years of Basic on the Web

    I believe the first BASIC Internet resource I encountered was the ABC (All Basic Code) packets curated by William Yu, which was started in 1995. Soon after, when the web became popular and more people had access, that hobby exploded into hundreds of websites and meta-sites.

    A lot of the code was for QuickBasic 4.5 (and the "professional" superset QBX aka PDS 7.1) but there was also code for competitors like PowerBASIC. Some people even started trying to make new BASIC interpreters like DarkBASIC which intrinsically support the elements needed for making more modern games. (More recently somebody made a cross platform backwards-compatible compiler called QB64). And of course people were sharing the interpreters and compilers.


    Oh shut up

    Whenever an individual shared some tricks or assembly code that extended QuickBASIC, for instance accessing extended memory or outputting WAVs to sound hardware, it would spread through the community quickly. People were making libraries for loading and saving modern image and audio formats, and making games with those libraries that were pretty good considering these were hobbyists using obsolete software.

    Games


    I made many games myself but never finished any of them. That was ok for a learning phase, but of course eventually I had to learn that completing a project and having closure was also important.

    As is usually the case, I also made and/or modified many utilities for making games, for instance graphics editors, bitmapped font editors (and yes I actually made my own bitmapped fonts), a slide-show based game editor with a GUI system I made from scratch, etc.


    Editing my Celtic font in my font editor.


    Experiment to auto-generate face textures.


    ASCII Grafix, my text mode drawing program.

    This playful sandbox of BASIC enthusiasm continued for many years. I was aware of other languages, and had been informed that C was the best general purpose language in engineering industries. However, BASIC was so much fun that I ignored C for a long time. And as one would expect, an interpreter facilitates exploration and learning rapidly as compared to a compiler.

    Paradigm Shift


    I realized there was something called C++ and assumed that it must be better than old fashioned C. In high school one day I was at a flea market and happened upon a wicked good book deal--three C++ books for $1 each. One of them, Simple C++ by Jeffrey M. Cogswell, is possibly the best programming introduction book ever--it teaches you object oriented programming (OOP) with examples from a fake project to make a robot dog (and it has a sense of humor too). It was an intro to C++, but it did it the right way, via OOP.

    I have observed that many others learn C++ the wrong way, as is common in colleges, with almost no emphasis on OOP. When I was in college I took two C++ courses but I did not buy the books we were supposed to. I chose to read more useful books like Industrial Strength C++ by Mats Henricson and Erik Nyquist (for which I raked up some hefty late fees at the library) and Effective C++ by Scott Meyers.
    My point, gentle programmers, is that our forefathers of computing started out in the primordial mud of undocumented disorganization, so now us advanced apes live in the Aftermaths...of CHAOS!
    --Samuel H. Kenyon, circa 1998
    My programming paradigm progression in the 1990s:
    ⇨Mostly-chaotic BASIC spaghetti code.
    ⇨Structured QuickBasic.
    ⇨Object-oriented C++.

    So, my personal development recapitulated a path of programming evolution of the late 1960s to the 1980s.

    To be continued...

    Image credits:
    1. Turbo button: Tamas Kemenczy

    Comments

    Hank
    As a Motorola processor guy, I knew PCs only really 'caught up' with the 386 but, like you, when I bought a PC I still went old, to an 8088.    There were things such as command line baseball simulators which provided a surprisingly good roadmap of how programming was done on a PC, because the logic was the same but the specifics were different than an Atari ST, which was way ahead of its time (in computer years) - I assume BASIC was the same across all platforms.

    My real programming in college was done on a Univac, which has a nice, old school science-fictiony ring to it, but it felt mostly useless to me, unless I wanted to make programs for Fibonacci squares.
    Want more no-nonsense, independent science? Buy Science Left Behind
    SynapticNulship
    I assume BASIC was the same across all platforms.

    Actually it wasn't. There were many different dialects, especially with regards to printing (displaying) characters and graphics.  But, one could usually translate from one dialect to the other.

    As a Motorola processor guy

    My first assembly language programs were written for an 80s-era Motorola processor--the famous 68HC11 microcontroller.


    MikeCrow
    I borrowed obsolete computers/computer parts from work, I think the first was an 8088 as well. What's funny was the 2d graphics accelerator was a box the size of the pc itself.
    Actually, I think the first was left over multibus cards running bsd, and electronics design software. I simulated and timing verified a gate array for nasa on that box. The 70MB hard drives were almost the size of a shoe box, and the 2 MB 32b + parity memory board was about $22,000 iirc(which wasn't in my box, I had a couple 512kb boards). Now that's not even the size of the cpu's cache. These were followed by various pc, and even a sparc2 clone which I still have.

    For programming languages, they started with stuff like IC test systems, sql, bsd shell scripts, some basic, and a bit of C.

    But mostly I worked in design tools, unix shell, and now db stuff.

    Never is a long time.
    vongehr
    I bought my first commodore 64, used BASIC of course, and then - well, then I thought this is a complete waste of time and I sold it after three weeks making 20% profit, thinking to myself, this technology is promising, lets wait.
    Then I had to learn pascal and C++ in school. My homework algorithms were always shorter and worked bug free the first time, faster than those of my school mates because I did not have a computer at home and was thus forced to do the programming systematically on paper rather than by trial and error hammering bad code and then debugging it.
    Finally, with the arrival of Mathematica and LabView on usable computers, computing went from a waste of time to being productive.
    Sincere thanks to all you geeks spending all your days and nights making it possible. ;-)
    Ladislav Kocbach
    I think all the comments above (except of Sascha's ) show that fascination by programming. Here all the boys have experienced this feeling to make the machine to do what you want it to do, just for the sake of it. Try do do one more variation. Find out what is inside, how you can use some of the more obscure things in the computer. The microcomputers had this basic, with peek() and poke(), and you could look inside of the machine code. And then some people would get assemblers and disassemblers. On Commodore 64 there were 'sprites', into which you could 'poke' byte patterns, and then program the motion of the nine sprites in basic. And the metaphor  of the assembler language for the 6502 family. I was an "old boy" myself, but my son was about your age, and we would be peeking, poking and assembling by hand long after midnight (the metaphor of assembler - it would deserve a little article, but who would be interested? - it is about the 'jump to subroutine', which is no jump, but change of the program register).
    Was it a waste of time as Sascha says? Should we have waited for Mathematica? Well, one would not do much general  programming in Mathematica, or Labview, and even simple task of processing 2 GBytes of text data can be better done by using unix 'head' and 'tail' than any programming language. And than there are all the databases. Talk to them from Mathematica. 

    When looking for this article for second reading, science20 served me an ad for Monte Carlo Simulations in Excel.  What a challenge for a graduate of Commodore 64 youth! I think that we boys (or fathers) playing with the computers have earned both ability and a passion for understanding whatever programming language and whatever machine. And I also think that Sascha and most of the young boys today have lost this experience. And what about the girls? In my family, the fascination was postponed until a short period with matlab.

    Today everybody can start playing with javascript in this browser, with excellent graphics and lots of fun. But who is going to give them a nicely wrapped new browser for birthday? 
    Ladislav Kocbach
    Every boy should have a journey into the coding wilderness. 
    I have touched on it above: what about the girls? Should they not get that experience too? My daughter, as I mentioned, was not much fascinated by the moving sprites on Commodore 64 and only useful abilities of matlab attracted her interest much later. But her doughter (aged 5 now), seems to show rather unusual interest for computers, she actually wanted to have her own pink one (running Linux - at least expressed implicitely).

    SynapticNulship
    Certainly.  I would never deny a girl (or any other gender there might be) to chance to learn about computers.  The choice of the word "boy" was part of my ham-handed attempt to invoke an old fashioned style to talk about computer programming, but I should have said "kid" instead. 
    blue-green
    SGS Z80 CPU B1
    129 – ITALY






    My first PC: Oberheim OB-Xa with the type of keyboard I really wanted. It still works and sounds GRRRR-EAT! Z80 processor manages 120 different configurations of the synthesizer knobs in memory. A cassette tape player could be used to back up the memory, yet has never been needed. Memory never failed; original battery is still in the “motherboard”. The circuit boards stretch across 5 octaves and are two layers deep. The right side portion is for the 8 voices; one board for each voice. Photos taken today.

    In the almost 30 years that I have owned this synthesizer, it has not failed me, except when a cat dropped a heavy object onto the keyboard from a high shelf. That required a mechanical repair of a broken key.

    My somewhat personal computer before that: a tiny computer to reduce emissions in the mechanically controlled carburetor of my still running and primary vehicle, a 1978 FJ40 Landcruiser. There’s nothing like the quality in vintage technology!

    Comments welcomed.