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!
History
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") Desktop.SetWallPaper(pic) Program.Delay(60 * 1000) EndWhile
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 EndSub Sub OnMouseMove x = GraphicsWindow.MouseX y = GraphicsWindow.MouseY If (Mouse.IsLeftButtonDown) then GraphicsWindow.DrawLine(prevX, prevY, x, y) endif prevX = x prevY = y EndSub
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
Anonymous
October 23, 2008
It's cool. I think Small Basic is the best for the novice who begin to learn programming. 昔の VB2 みたいに、 早くてお手軽、 だといいなぁ。 f(^^; ・ blog : SMALL BASIC・ DevLabs : SmaAnonymous
October 23, 2008
The comment has been removedAnonymous
October 23, 2008
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")Anonymous
October 24, 2008
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")Anonymous
October 24, 2008
This is an excellent way for kids to learn how to program. A Very good initiative! Keep up the good work.Anonymous
October 24, 2008
The comment has been removedAnonymous
October 24, 2008
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.Anonymous
October 24, 2008
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.Anonymous
October 25, 2008
Haven't wrote much because I am saving up for a big post on Castle Active Record, which I am justAnonymous
October 26, 2008
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.Anonymous
October 26, 2008
BlitzBasic is what I always recommendAnonymous
October 26, 2008
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.Anonymous
October 27, 2008
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.Anonymous
October 27, 2008
why another language? totally useless effort!!!!! why is msft spending valuable resources on thse useless projects...Anonymous
October 27, 2008
Different languages serve different purposes. You can use C# or VB.NET as a teaching ("first") language, but it's overcomplicated for that purpose.Anonymous
October 31, 2008
Vijayeg, 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.Anonymous
November 05, 2008
Wow. I love this. This brings back all the great memories I had (even of the bugs) of how I first gotAnonymous
November 05, 2008
Wow. I love this. This brings back all the great memories I had (even of the bugs) of how I first gotAnonymous
November 08, 2008
Will this make it to codeplex dude? I'd love to see your implementation!Anonymous
November 09, 2008
While ("True") ... EndWhile What? How do you explain this to a newbie? Better to have a Forever construct.Anonymous
November 11, 2008
The comment has been removedAnonymous
November 11, 2008
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.Anonymous
November 15, 2008
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. jinAnonymous
November 17, 2008
The comment has been removedAnonymous
November 17, 2008
The comment has been removedAnonymous
November 17, 2008
Does Small Basic not support exponentiation? I'm using the operator "^" although it doesn't seem to work.Anonymous
November 18, 2008
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. ~cbmeeksAnonymous
November 18, 2008
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.Anonymous
November 21, 2008
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.Anonymous
November 23, 2008
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!Anonymous
November 29, 2008
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.Anonymous
December 01, 2008
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 forAnonymous
December 05, 2008
The comment has been removedAnonymous
December 05, 2008
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.Anonymous
February 17, 2009
Can you give me show me some simple yet challenging programs?Anonymous
July 07, 2009
A CORRECTED VERSION OF REMLINE,AND A FEW Q AND GW PARTS ADAPTED FROM VB DOS1 ,VB WIN 1 ,QB11 AND QB45 WOULD GREATLY IMPROVE YOUR DATABASE AND USERSHIP. THERE IS A PROGRAM LOST SOME WERE IN THE ARCHIVES,IN THE EARLY 90's,THAT SPEAKS PHOENETICS called essie, a ms SAM PROTOPART. WORKS SOME WHAT LIKE L+H (r) PRODUCTS. IT's COOLEST FEATURE IS THAT IT LEARNS IN GOTO LOOPS AND IF THEN STATEMENTS. 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, R.R.ARMSTRONGAnonymous
August 02, 2009
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...Anonymous
August 06, 2009
how come when i type go.create("world",0,0) it says canot find object " GO " when i do this on my old compuer it worked cann you help me?Anonymous
November 28, 2009
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.Anonymous
November 28, 2009
How Do You Creat a lopp 4 thisAnonymous
March 03, 2010
@CHOPPERGIRL , Try this instead: TextWindow.WriteLine("Hello world!")Anonymous
March 06, 2010
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 :).Anonymous
March 15, 2010
The comment has been removedAnonymous
March 15, 2010
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.Anonymous
June 14, 2010
The comment has been removedAnonymous
July 30, 2013
small basic is epic my cousin made some really cool games on itAnonymous
July 18, 2014
The comment has been removedAnonymous
April 22, 2015
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). Thanks!Anonymous
September 07, 2016
blackboard update: CBV859-color selector by righclickmenu-sephia backgrounds in flick pic autochange-clear board