Hello World

Welcome to Small Basic Blogs!  After being in part-time development for nearly a year, Small Basic is finally out, and I’m excited to see where this will go from here!



It all happened in August of last year when someone sent me a pointer to the article Why Johnny Can’t Code and it got me thinking.  After all, when I was a kid, I started programming in ZX Spectrum with a built in Sinclair BASIC interpreter and did so until I ran into Turbo BASIC.  To me that transformation was groundbreaking and was the single most important reason why I chose to write software for a living, for the rest of my life.

An informal poll along the corridors in Microsoft revealed that most developers within Microsoft had started programming in some variant of BASIC.  It had all the good characteristics of a good beginner programming language – simplicity, minimal ceremony, instant gratification and ubiquity.  It helped them “get” programming and assisted them with understanding the need for more advanced concepts.

When I asked them how they’re going to teach programming to their children, they were stumped.  Almost everyone wanted to, they just didn’t know how.  Some said KPL, Python and Ruby.  Some said Alice and Scratch.  But they all felt that none of these have the charm of BASIC.  Of course there were some that took the Dijkstra’s stand, but they were few.

Of the numerous programming languages, BASIC, from its inception in the 1960s has undergone some major transformations.  Even among Microsoft’s BASIC offerings, the language and the environment (VS) has been repeatedly updated to include more powerful features with every release.  On the one hand this makes the language and the environment very powerful and capable, but on the other hand, it makes it daunting for a beginner.

That got me thinking as to why isn’t there a “Small” variant of BASIC that brings the simplicity of the original language to the modern day.  And after a year, here we are, announcing Small Basic.  Small Basic is a project that will help make programming easy and approachable for beginners.  Now, that’s a pretty big claim – let’s see how Small Basic does it.

Make programming approachable

Small Basic starts with a really simple programming language that gathers inspiration from the original BASIC language.  It has no more than 15 keywords and is strictly imperative.  There are no classes, scopes, generics, lambdas, etc. – just pure imperative code.  The language is typeless and all variables are dynamic and global all the time.  The code gets compiled to IL and runs on the .Net Framework.

It comes with a set of libraries that can be accessed from within a Small Basic program.  Since the language itself is .Net based, new libraries can be created or the existing libraries modified using any .Net programming language.

Next, it combines the features of the language and the libraries into a very simple and friendly programming environment.  This environment gives beginners, access to professional features like Intellisense(TM) and Instant context sensitive help.  It makes writing programs and executing them a breeze.

Show me code already

Okay here’re a couple sample Small Basic programs

Sample 1: Change the desktop wallpaper  from Flickr, every minute

While ("True")
  pic = Flickr.GetRandomPicture("fall leaves")
  Program.Delay(60 * 1000)

Sample 2: Makes a BlackBoard that allows you to scribble on a window

GraphicsWindow.BackgroundColor = "Black"
GraphicsWindow.PenColor = "White"
GraphicsWindow.MouseDown = OnMouseDown
GraphicsWindow.MouseMove = OnMouseMove

Sub OnMouseDown
  prevX = GraphicsWindow.MouseX
  prevY = GraphicsWindow.MouseY

Sub OnMouseMove
  x = GraphicsWindow.MouseX
  y = GraphicsWindow.MouseY
  If (Mouse.IsLeftButtonDown) then
    GraphicsWindow.DrawLine(prevX, prevY, x, y)
  prevX = x
  prevY = y


How can I get this?

You can download Small Basic today by visiting the Small Basic portal or Download page.


Also, don’t forget to check out the Getting Started Guide.

Happy Programming!

Comments (49)

  1. It’s cool. I think Small Basic is the best for the novice who begin to learn programming. 昔の VB2 みたいに、 早くてお手軽、 だといいなぁ。 f(^^; ・ blog : SMALL BASIC・ DevLabs : Sma

  2. int19h says:

    The idea is good. QBasic was a decent teaching tool, and a good replacement is sorely needed. However, it is, in my opinion, a big mistake to try to make the most "basic" language object-oriented, or even to mention things such as "classes" and "objects". Before getting there, one has to learn the ropes of algorithms, and for that, all that’s needed is a good old procedural-style language with simple but easy-to-use input/output facilities (the original BASIC PRINT and INPUT were perfect for that), and preferrably with some easily accessible graphical primitives (since a lot of basic stuff – loops, recursion, functions etc – are much easier to demonstrate on apps drawing some simple graphics).

    I mean, a BASIC that cannot run this?

     PRINT "Hello, world!"

    Come on…

    By the way, error reporting is also confusing. Say, I write this:

     TextWindow.WriteLine "Hello, world!"

    I expected it to tell me that I’m missing an opening parenthesis after WriteLine. Instead, I get this gem:

     1,21: Unrecognized statement encountered

     1,11: Cannot find property "WriteLine" in Type "TextWindow"

    Oh-kay… so which statement was unrecognized? There are no line/column numbers in the editor, so finding that 21 is gonna be tricky. But alright, I count characters myself, and my cursor ends up at the space character. Huh?

    The second error message is even more baffling for a beginner. What’s a "property", and why did it say that it couldn’t find one when I didn’t ask it to look for one?

    I am nitpicking here, of course… but it must be understood that a learning tool has to have particularly good error reporting in the compiler, trying to not just say what went wrong and where, but also why, and what should be done to make it right, to the extent it is possible to detect it (maybe with some heuristics even).

  3. int19h says:

    Oh, and while I was trying to figure out how the arrays are supposed to work, this single-liner had just crashed with an exception (and a stock Win32 error reporting window) for me:

    Array.SetValue(a, 1, "123")

  4. Vijaye Raji says:

    Thanks int19h.  These are great suggestions that we’ll incorporate into the next releases.  

    The Array.SetValue crash is a bug.  If "a" is a variable and doesn’t have a name already set, it crashes.  Try giving the array a name:

    Array.SetValue("myarray", 1, "123")

  5. This is an excellent way for kids to learn how to program. A Very good initiative! Keep up the good work.

  6. This looks an alot like Hackety Hack, but it wasn’t mentioned. Were you influenced by Hackety Hack? Or is it purely a coincidence?


  7. anonymouscommenter says:

    Thanks for your work.  This looks great.  My son (8) has already taken off with this!  I would love to eventually see documentation with a table-of-contents or in a tutorial type format.  Also, searchable help files within the program would  be great.  

  8. anonymouscommenter says:

    Thank you and Microsoft for keeping the Basic tradition. Don’t listen to the naysayers, most of them are busy learning fad languages such as Lisp and Ruby without ever thinking about producing actual, useful code. QBasic was the source of my fun back in the days and so will SmallBasic be for the new generation. Professional programmers tend to forget how hard it can be to get into programming when you need to learn all kind of concepts like classes and types. Basic is about learning how to write nice algorithms first.

    Heck, I’m a C# programmer and I’m thinking of trying Small Basic too because the environment seems nice enough to do quick prototyping of algorithms and ideas.

  9. Haven't wrote much because I am saving up for a big post on Castle Active Record, which I am just

  10. I believe, Small Basic is an awesome approach and it is simply great that Microsoft allows you guys to do something like that and even publish it.

    Also, it took me less than one hour to implement Conway’s Game of Life with it. That was really fun. 😉

    I published the code in the Small Basic forum by the way.

  11. anonymouscommenter says:

    BlitzBasic is what I always recommend

  12. int19h says:

    By the way, regarding arrays – I really think that they should be first-class. They’re too fundamental to a lot of important algorithms to lift to a library with GetValue/SetValue calls.

  13. Vijaye Raji says:

    That is good feedback, int19h.  I’ll take a note of this feature request in our bug database and promise to work on it.  However, I can’t promise that it will end up in the product.

  14. anonymouscommenter says:

    why another language? totally useless effort!!!!! why is msft spending valuable resources on thse useless projects…

  15. int19h says:

    Different languages serve different purposes. You can use C# or VB.NET as a teaching ("first") language, but it’s overcomplicated for that purpose.

  16. anonymouscommenter says:


    Thanks – Small Basic is a great idea.  Your introduction summarises exactly where I’ve been with my kids and I am introducing it to them now.

    P.S. – I’m CEO of an MS partner – BizTalk and stuff like that and I’m sure in a couple of years time we will come across a customer application, (financial services industry maybe?),  written in house in Small Basic – it’ll be the libraries fault – but hey that’s  life.

  17. Wow. I love this. This brings back all the great memories I had (even of the bugs) of how I first got

  18. Wow. I love this. This brings back all the great memories I had (even of the bugs) of how I first got

  19. anonymouscommenter says:

    Will this make it to codeplex dude? I’d love to see your implementation!

  20. anonymouscommenter says:

    While ("True")



    What?  How do you explain this to a newbie?  Better to have a Forever construct.

  21. anonymouscommenter says:

    I think its great that Microsoft have released a great little product like this. I think it is showing that they dont need to release paid products to the market all the time and they do want to promote a more open source market appeal to themselves. My little boy is 3 soon so I want to start looking at languages that I can be teaching him. Lets face it, VS2008 is far too complex a language at this time with a 90MB framework and climbing, i remember when it was 20 MB the framework. By the time my little one is ready it wont be a possible to teach him every namespace and class available.

    I say good look to the future generations and I hope this helps with the education of it.

    It makes it more exciting if the child can produce such quick results and something to show for it in a matter of minutes.

    All people slating this obviously cannot see the benefits that this can bring, its only in infancy at this time

    Good luck to you all and I look forward to teaching my little one with this application when he is ready.

  22. I think this is great, but how about some more documentation?  I notice Files are possible, but how the hello do you use them?  I’m a developer and find this a bit confusing and the help is less that helpful.  

    What are the chances that a minimal gui builder be implemented in a future release?

    Great work, thanks a bunch. I plan to introduce this to my son.

  23. anonymouscommenter says:

    fantastic and thank you!  i’m 35 and i’ve read no less than 6 books on programming from c++ to python and i’ve successfully coded a few rudimentary scripts in discreet maya.  and i’m convinced that if my life depended on it, i could probably code something substantial… but i just haven’t been able to get myself to actually do it.

    now you’ve provided a language SMALL ENOUGH FOR ME TO OUTGROW!  that’s HUUUUGE!  i WANT to be able to exhaust a small language until i’m railing against the boundaries and i think that will help me understand better the reasons for more advanced features in more advanced languages.

    i missed my shot at really exhausting the simple basic in my atari 800xl (when i got to all the DATA (1,00, 1, 47, 23) etc statements, my mind just bugged out) but you’re providing me a new opportunity so thank you much!

    just finished up the getting started guide.  is there a glossary of all the builtin statements somewhere?  thanks.


  24. anonymouscommenter says:

    Small Basic is great. I have no real programming experience otehr than some PHP althoguh found Small Basic easy to understand, simpel to use and simple to learn. I’ve not succesfulyl constructed several usfel programs with the aid of Small Basic.

    I agree that better error reporting (i.e. say line 2 instead of the current space nubmer structure system you have). Thanks.

  25. anonymouscommenter says:

    Small Basic is great. I have no real programming experience otehr than some PHP althoguh found Small Basic easy to understand, simpel to use and simple to learn. I’ve not succesfulyl constructed several usfel programs with the aid of Small Basic.

    I agree that better error reporting (i.e. say line 2 instead of the current space nubmer structure system you have). Thanks.

  26. anonymouscommenter says:

    Does Small Basic not support exponentiation? I’m using the operator "^" although it doesn’t seem to work.

  27. This is awesome!  Brings back the spirit and fun of learning to program.  I hope my son picks up something like this one day (he’s 4 now).

    "why another language? totally useless effort!!!!! why is msft spending valuable resources on thse useless projects…"

    Why do you even care?  No one forced you to this page or to Small BASIC.  And useless projects?  Useless to who?  You?  Why does Honda create walking robots?  R&D.  MS is a profitable company and a part of that is R&D.  See what sticks.  This might turn into another profit center…or it might fail.

    Get over it and move on.  If you like, you can go back to Ruby, Perl, C++ or whatever you choose.


  28. anonymouscommenter says:

    Thanks so much. I remember fondly spending hour upon hour programming in BASIC on my Commodore 128. Modern program langauges are now just too complicated to be fun. For the first time in many years I look forward to just having fun with programming.

  29. anonymouscommenter says:

    Thanks for creating this.  Although I’m a seasoned VB .NET programmer, I was looking for something a little smaller to use for simpler tasks or tasks which don’t require complete automation.  This also looks fun.  I grew up on Basic, so it is also a little nostalgic for me.

  30. People seem to like to complain that there are too many programming languages.  The more the merrier if you ask me.  It’s better to have many alternatives to choose from because if no one writes new programming languages then the field will stagnate.  Keep it up!

  31. anonymouscommenter says:

    I’d have thought that a fairly simple script host/IDE/framework for VBScript would be a better investment.  After all VBScript was the logical analog of QBasic in Windows.

    The script engine was already there.  What was needed was a wrapper on it like the one wrapped around the QBasic core.

    Time has passed it by though.

  32. Haven’t wrote much because I am saving up for a big post on Castle Active Record, which I am just really, really enjoying right now in my work. I know we made a good choice. More on that soon. NHibernate/Castle Chad Meyers has posted source/binaries for

  33. Great to see an usable programming language after so many years.

    I built thousands of lines of code with various Basic dialects up to QB45, which I used for a serious tool in R&D environment. Some programs I wrote with VB4, but when VB5 came out, we moved out of Basic.

    The developers of VB forgot, that people out here needed a tool to FAST and EASILY build simple mathematical / graphical /snd programs, which were possibly used only once and then deleted. Most of the time lost with the program was gathering the data, the second part was building the theory. Many times I have built the program and the theory same time. The final run took possibly one minute with QB45. It doesn’t matter if the compiler builds 10% faster code, if the run-time is about 0.001 % of the total time of the project.

    You dont even spend one second thinking about modular or portable code. If time comes, you could allways copy the code to a mainframe, make some modifications and run it as Fortran. The syntax of F77 and old Basic were so similar, that  Ieven built a program, which translated Basic to F77 and vice versa.

    I was a bit disappointed when I noticed, that SmallBasic(MS) was so different of old versions. SmallBasic of http://smallbasic.sourceforge.net/ is more like QB45 and it is easier to use my old Basic libraries with it.

    Another thing is this dotnet3.51: Why ?

  34. anonymouscommenter says:

    You could have given this SmallBasic name ‘SmallJavaScript’. In my eyes this SmallBasic is more near C or Javascript than Basic.

    I’ll stay waiting for next version of QB45.

  35. anonymouscommenter says:

    Can you give me show me some simple yet challenging programs?





    IF ONE MADE ENCHARTA FOR BING(r) with a (wemedia) msAGENT,

    [2] OR MGRUFF LIKE JAVA(r) BROWSER;this would be a perfect

    schoolboard selling point.

                                              BEST WISHES,


  37. anonymouscommenter says:

    In all sincerity, my work and school have driven my need for computing, which really utilizes MS as the dominant provider for platforms in today’s market.  In all reality, VB for Apps was my intro to programming and now VB Studio.  From a non-programming stand-point I thank you for Small Basic because it is a quick and easy way to introduce ADO.NET issues and VB to my nephews this summer.  Had it not been for Small Basic I wouldn’t be able to captured their attention.  It is easy to use and attractive to get them started.  My three nephews and I thank you…

  38. anonymouscommenter says:

    how come when i type


    it says

    canot find object " GO "

    when i do this on my old compuer it worked

    cann you help me?

  39. anonymouscommenter says:

    Create an array that stores 10 fahrenheit temperatures. Display the temperatures in celsius. Write a For loop to store the fahrenheit temperatures in the array and write a For loop to convert the temperatures to celsius and display them.

  40. anonymouscommenter says:

    How Do You Creat a lopp 4 this

  41. phillips101 says:

    @CHOPPERGIRL , Try this instead:

    TextWindow.WriteLine("Hello world!")

  42. anonymouscommenter says:

    I myself started with an early MS BASIC, and later went on to QBASIC before giving up BASICs altogether soon after entering university. Although I am now one of those people who are more inclined towards Dijkstra’s viewpoint, I still think Microsoft’s creating a free BASIC a very good move indeed.

    This is very important mainly because almost every ordinary desktop user uses a Microsoft OS. Once again it is possible for children and ordinary folk to quickly put together something useful by writing a few simple lines of code. I hope all future versions of Microsoft OSes come with Small Basic. This would let people make a much fuller use of their computers and drive the formation of a generation of more knowledgeable and aware users, in addition to introducing the next generation of programmers.  They can learn all about recursion, pointers, lambdas and everything else later on, Small Basic has the potential to draw in a generation of youngsters who are right now the furthest removed from programming than ever before.

    So, thank you. Thank you a hundred times over. And don’t worry too much about BASIC-induced mind mutilation :).

  43. At the QBasic Games Directory, it says:

    "Still, if you have a computer which can boot both in MS-DOS and Windows mode and you want to run QBasic games in pure DOS, you need to have these lines in your config.sys file:



    DEVICE=C:EMM386.EXE RAM 4000

    Do you need to do this under Windows 7?

  44. hmmm,

    BC.EXE goes straight to the core of the computer,

    but the BAT won’t run. It needs a 64 bit version

    for Windows 7.

  45. anonymouscommenter says:

    At all you commentators who think Small Basic is just another worthless language and that this is "another shity buggy microsoft product", it's not.  For anyone who wants to being programming, this is perfect.  And it's not just for kids, anyone can use it.

  46. anonymouscommenter says:

    small basic is epic

    my cousin made some really cool games on it

  47. anonymouscommenter says:

    I already installed this peace of software an year ago, trying to find something useful for my kid and I tried for my self …. I'm not a programmer and I want it to see what kind of a learning software is this, but I face it a problem. Today, trying to find something …. I re found small basic and I install it again, guess what, same problems occur, some mistake, writeline won't work saying something … I'm not a programmer, but I do understand very well, so please fix it or … I have to say that this is just another piece of sheet on the net. Sorry, but if an adult can not understand how this "very ease" programming software works ….. you know the rest won't you?

  48. Goranl,

    Please post any questions in the Forum: social.msdn.microsoft.com/…/threads

    There are no known issues with the WriteLine method. I would recommend going through the free curriculum (social.technet.microsoft.com/…/16299.small-basic-curriculum.aspx) or Getting Started Guide (social.technet.microsoft.com/…/16059.small-basic-getting-started-guide.aspx).


  49. Tryhest says:

    blackboard update: CBV859
    -color selector by righclickmenu
    -sephia backgrounds in flick pic autochange
    -clear board