Learn How To Write Computer Program with SmallBasic

Guy McDowell 09-09-2009

small_basic_logoSomebody at Microsoft is doing things right in my humble opinion. What they’ve done with Small Basic is reintroduce hand-coding software, but with just a little less help than drag-and-drop or WYSIWYG interface. Let’s take a look at at it shall we?


Take a look at the interface. Doesn’t look like much more than a prettified Notepad, does it? Well, in many ways that’s what it is. No Object Toolbars, no colour selectors, no fancy element properties windows. Just you, a keyboard and a screen. That’s the beauty of it. Immediately, it showed me my weakness, my dependency on wizards and ready-made objects. As I stared blankly at the screen, I tried to think of just one Basic command that I could get started with. Nothing.

how to computer program

Now, in my defence, I haven’t written a Basic program since college. Yet, even then we were taught on VisualBasic 6. So I first looked for the elements that I could just drag into place. None. Nowhere. My next move was to do the unthinkable – go to the documentation. But wait! There isn’t even a Help menu. I remembered good old F1. Nothing!

I went to the Program Menu from my Start Button and looked under the directory for Small Basic. There it was, the thing that really makes this program worthwhile – the Introducing Small Basic (ISB) document.

As all good introductions to programming guides should, the ISB started me off with a “Hello World” program. If you’ve done any learning of programming languages, you’ll know what that is. The ISB says you just type this line in:

TextWindow.WriteLine("Hello World")

I started typing…T..e…x…what? What is this thing that came from nowhere with information just for me? That’s the Intellisense function of the application.

how to write computer program

This is what separates Notepad from Small Basic. Whenever it senses that I am typing something meaningful, it will show me a list of options that you can scroll through using your up and down arrow keys. Each item has a short description beside it so I can decide if this is what you need, and how to use it. When I find the term that I want, I strike the enter key and it will auto-complete for me. This is such a nice happy medium between coding in Notepad and being lost in the gloss of the latest full-blown VisualStudio. I think you’ll like it.

Once I have my “Hello World” program done, I can save it by clicking on the Save As button.


how to computer program

Then I can run it by clicking on the Run button. Or, as the button shows, I can also press the F5 key to run it.

how to program

So let’s run it and see what happens.


learn how to program

The program opened up a Command window, or DOS window as some call it, and printed out “Hello World” just like I told it to. Since I didn’t write anything to tell the program what to do next, Small Basic automatically gives me the Press any key to continue… prompt.

Now, a bit about shortcut keys since I already touched on the F5 keys. Many of the popular shortcut keys do work with Small Basic, such as ctrl+s for saving.

If you’re thinking this is pretty rudimentary and simplistic, you’d be right. Yet, that’s the point of it. The point is to give the new programmer a usable environment, decent documentation and the spartan workspace needed to develop life-long programming skills and practices. In just 69 pages, the ISB document teaches the new programmer about variables, arrays, conditions and branching, and loops. With these basics of programming, you can go a long way.


If you’re also thinking that the programs that you could do with Small Basic would be useless or visually boring, think again. Small Basic does give you the ability to use interactivity with your user, create graphics and use colour. Another neat built in object is the Turtle. Turtle makes Small Basic a useable platform for teaching kids to program. Who can resist telling a Turtle to move 100 spaces and then watching it go? Or how about watching Turtle draw a fractal?

Old pro or newbie, or proud parent passing skills on to the offspring, Small Basic is a seriously fun tool for programming with. Give it a try. Let us know what you think about it.

Have you already done some work in Small Basic? Show us where we can see a sample in the comments below.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

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

  1. Linda
    August 26, 2016 at 4:54 pm

    In the old days of DOS, BASIC was much simpler than Small Basic. A sad thing. i did an awful lot with Borland Turbo Basic. :) Seems 'easy' is not as easy now as easy was then. :(

    • ALI
      March 26, 2019 at 11:45 am


  2. jack2468
    October 29, 2009 at 4:24 pm

    i like smalll basic but i wish they would teach you more than just what they have there. you know what i mean.

  3. 1fastbullet
    October 11, 2009 at 5:39 pm

    "Somebody at Microsoft is doing things right..."

    I find this reassuring. Now we know that everyone at Microsoft isn't a fuckup.

    • Guy McDowell
      October 11, 2009 at 10:56 pm

      I didn't say that they were all f*&kups. Not sure how your comment got posted in the first place either with foul language.

      Microsoft has done some absolutely amazingly good things of course. Yes, they had their Bob's and such, but really, you can't stay at the top unless you have what people want.

  4. Tyler Garland
    September 12, 2009 at 8:54 pm

    This is pretty awesome. Thanks

  5. Brian H.
    September 11, 2009 at 12:01 pm

    When I was a kid, we learned to "program" computers using Logo. We were told to "move the turtle 10 spaces and turn right". :D Great intro to computer programming. :-)

    I am definitely going to use this to teach my boys programming when they get older.

    • David
      September 14, 2009 at 1:32 pm

      Why not use Logo? The turtle was a Logo project, after all. A lot of details can be found at the Wikipedia article, including pointers to free and open source Logo variants.

      • Guy McDowell
        September 14, 2009 at 3:56 pm

        Logo is good too! The Small Basic manual references Logo when they talk about Turtle.

  6. chris
    September 9, 2009 at 10:01 pm

    Hi! If you like MS small basic you might also like to give the original "SmallBASIC" a try - it's freely available at

  7. Sourish Nath
    September 9, 2009 at 3:03 pm

    Hey ,nice info.The youtube video was awesome.
    Thanks ,

    Regards ,

    • Guy McDowell
      September 9, 2009 at 7:04 pm

      Thanks Sourish,

      I really liked working with Small Basic. There's only 14 terms to work with. Makes me think again.