Getting back to BASIC (Microsoft Small Basic)

I’ve written before about my son’s interest in computer programming (well – computers in general, as it seems he provides IT support for his class!). It started with Scratch (at school), we went to an Apple Store for an Hour of Code last year and now, inspired by watching episodes of the BBC’s Making the Most of the Micro series from 1983, he’s moving up to BASIC.

After a short hunt on the ‘net I found a Windows port of BBC BASIC but I wondered if he might be better using something that prepared him for other, more modern, languages (my own path went something like RM BASIC, Turbo Pascal, Modula-2, 68000 assembly, COBOL, SQL, C, C++, VisualBasic, HTML/CSS, C# – although in truth the closest I get to writing code these days is a little bit of PowerShell every now and again). Then I found Microsoft Small Basic. After a late-night on Friday getting back to BASIC myself (with a multiplication tables programme which I’m sure professional coders will baulk at, inspired by Ian McNaught-Davis in episode 2 of Making the Most of the Micro), I felt I’d re-familiarised myself enough with BASIC to get my son started – and he really took to it, moving on to graphical windows on Saturday afternoon.

I started out looking at Beginning Small Basic (there are other Small Basic programming books available online too) but the Small Basic reference documentation in the TechNet Wiki came in useful too (like when looking up the available colours).

If I have one gripe with Small Basic, it’s that it doesn’t seem to understand multi-user Windows computers: I installed it using my account, but it wasn’t visible when my son logged in; I reinstalled and now it’s not there for me. Nevertheless, it’s a great way to get stuck in to programming, before “graduating to Visual Basic” or hopefully he’ll be learning something else, like Python, at school soon.

It’s interesting to see how today’s nearly-11-year-olds view the computers of 1983 (by co-incidence, 1983 was the year when I turned 11 too…). Green screens, cassette tape input, floppy disks (none of those new-fangled 3.5″ disks either), dot matrix printers, character-based interfaces (only a few days previously he had asked me what I was doing in cmd.exe) – will my grandchildren view touch screens and patchy mobile phone networks in a similarly quaint manner in 2047?

Just for reference

My first Small Basic programme is below (although WordPress has stripped out the indentation). I’m hoping my son can do much better!

TextWindow.Title = "Multiplication Tables"
TextWindow.Write("How many tests would you like? ")
Tests = TextWindow.Read()
Loop = 0
Right = 0
Wrong = 0
For Loop = 1 To Tests
TextWindow.BackgroundColor = "Blue"
TextWindow.ForegroundColor = "White"
FirstNumber = Math.GetRandomNumber(12)
SecondNumber = Math.GetRandomNumber(12)
Result = FirstNumber * SecondNumber
Output = "What is " + FirstNumber + " multiplied by " + SecondNumber + "? "
Answer = TextWindow.Read()
If Answer = Result Then
TextWindow.BackgroundColor = "Green"
Right = Right + 1
TextWindow.BackgroundColor = "Red"
TextWindow.WriteLine("Uh, Oh!")
Wrong = Wrong + 1
TextWindow.BackgroundColor = "Purple"
Output = "You got " + Right + " correct answers and " + Wrong + " incorrect answers"
TextWindow.WriteLine("Would you like to try again? ")
Answer = TextWindow.Read()
If Answer = "Yes" Or Answer = "yes" Then
Goto Start
Goto End
TextWindow.BackgroundColor = "Black"

7 thoughts on “Getting back to BASIC (Microsoft Small Basic)

  1. Very interesting! I have vague recollections of my very early years of programming (around 1993/4, so I would have been 8/9) writing a program in Qbasic to teach me multiplication tables.

    I have just recently decided I’d like to learn a bit more about programming, so have started a free course on (Diploma in programming in C). The course structure seems to be really good and does start from the absolute basics, but might be a bit much for an 11 yo.

  2. There are some good courses out there – I started a Pluralsight one on C# last year, although I timed out and no longer have the subscription (but there’s something similar on the Microsoft Virtual Academy). Like you say, a bit much for an 11yo, but it’s good to see his interest growing in the right direction :-)

  3. Nice links to the BBC stuff – brings back fond memories (although I am soooo old I was programming even before the lovely Beeb).

    For a protip, you can edit your post here and wrap the “code” bits in the <code> tag (not sure if that will render in a comment but it’s “<code>” without the spaces.

    WordPress discusses it here:-

    I’d definitely let your son play with Visual Basic though rather than SmallBasic – a lot more resources around for it and it’s a ‘transferable skill’ (yucky management speak for “useful in the real world”). Failing that, Python is pretty awesome for beginners and with a Raspberry Pi his the world is his oyster and it wont be long before he has attached to the central heating controller and turned the house into a Siberian wasteland with a misplaced “IF” statement. ;)

  4. Thanks for the comment and encouragement Ian. My RasPi is being used as a home infrastructure server but I really should get another one for my son to play with. He did ask me the other day what language we’d been using on the Arduino though (C)…

    As for the <code> tags, there seems to be an issue in my template at the moment – the code snippets are actually using a <code> tag but the non-breaking spaces for indents are still getting stripped… that’ll be a project for another late night!

Leave a Reply