Learning BASIC – blast from the past

The book that taught me BASIC 🙂

Back in those heady pre-internet days, if you wanted to learn something that you weren’t taught at school, it pretty much meant a trip to the library.  I was pretty lucky, if I wanted a book and there was even a hint of anything educational in it, then it was bought for me.

I was further fortunate in that with a teacher as a parent, I had access to the Acorn Achimedes and BBC computers as they were rolled out to schools for the entirety of the school holidays.  There was one rule: if you want to play games, write them yourself.  While rose-tinted memory has me at the tender age of 7 fist-pumping and saying “challenge accepted”,  I’m sure there was much more complaint involved, but I’m glad that I was encouraged.

I still have the book that really taught me to code: “Write your own Fantasy Games for your microcomputer”.   It has followed me from move to move and I had one last read before it got put away in the loft with other cherished books as part of a huge declutter1. Sadly out of print (although available on sites like scribd for a fee) this is a wonderful book for first principles.

One of the things that stand out is the quality of the images.  In a time where imagination really was key for any computer game, the amount of work that went into illustrating this book is extensive.

What I love is how the concept art correlates to the in game graphics.  I can’t remember the last time I saw a game advertised with the “not in-game footage” disclaimer at the bottom of the screen2.  As such, your in game character is barely recognisable as a person.  This reminds me of the wonderful World of Warcraft April Fools from a few years back3 where they really played on the difference of concept art to 8-bit visuals.  I strongly suspect many of their subscriber base didn’t get the joke to its full extent.

Concept art versus actual in game graphics

There is a wonderful visualisation of the flow of the program showing what each part of the program does and how it links together.  I still find a clear flow of events useful when creating a new application, although I don’t plan them to this detail4.

Flow of the game. Main events are in blue, and sub routines in yellow., initialisation in green.

Understanding data structures in programming is pretty essential and it’s easy for people new to coding to get confused if it’s not explained in a way in which they are familiar.  Fantasy Games has a page with some helpful goblins showing arrays as a set of boxes each of which stores an item of data.  While not conceptually difficult, just seeing it as a picture rather than a block of text helps most kids get it straight off.

Arrays… and goblins. Easy 😉

Another concept that I see more recent developers missing is that of flags or bit arrays for efficient data storage of binary information5.  Again, Fantasy Games explains these in a way that makes it easy – which characters can buy chain armour? 1 for yes, 0 for no.

Basic debugging…

Along with helpful hints on taking breaks while typing the code, changes that need to be made for different systems and saving regularly (to cassette!), there’s also a whole page devoted to debugging.  Common mistakes and errors are outlined with what might happen if you get things wrong.  This is set out in a straightforward way and is a great introduction to diagnostics.

While the book itself explains the concepts in terms of the Dungeon of Doom, there are a lot of ideas on how to expand the game: add new spells or monsters, different types of traps and rewards and even the encouragement to research and create your own games.  This is the reason I hold this book in high esteem over the other listing books of the day: it provides the suggestions and support for a child to let their imagination take them further.  Were it not for this book, I’m sure I would be doing something other than machine learning now.

My daughter is being introduced to the skills that will form her future through the fantastic Robot Turtles game and once her reading has improved I have the fantastic Hello Ruby by Linda Liukas, both of which teach programming concepts.  With the fundamentals. each language just becomes a different tool to use.

  1. My PhD thesis is in the same box, and my LaTeX books would also be in there if I wasn’t using them at work for Pweave
  2. While there probably are still a few, the last one I think I saw it was because it was a more cinematic scene to tell the story rather than to cover up the quality of game play
  3. Okay 9 years ago (!)
  4. Somewhere in an early draft of my PhD thesis there is a similar looking chart, but it didn’t make the final cut
  5. Although only for binary information – as a data scientist I get frustrated at assumptions of binary data where it shouldn’t be.  I did a guest blog post on this at Clikz.
janet

Dr Janet is a Molecular Biochemistry graduate from Oxford University with a doctorate in Computational Neuroscience from Sussex. I’m currently studying for a third degree in Mathematics with Open University.


During the day, and sometimes out of hours, I work as a Chief Science Officer. You can read all about that on my LinkedIn page.


Published by

janet

Dr Janet is a Molecular Biochemistry graduate from Oxford University with a doctorate in Computational Neuroscience from Sussex. I’m currently studying for a third degree in Mathematics with Open University.

During the day, and sometimes out of hours, I work as a Chief Science Officer. You can read all about that on my LinkedIn page.

Leave a Reply

Your email address will not be published. Required fields are marked *