What is Small Basic and how is it different from other programming languages?

Small Basic is a programming language that serves a stepping stone from block-based coding languages to more complex text-based languages. The goal of Small Basic is to make programming easy and accessible for beginners. There are three main components of Small Basic – the language, the IDE, and the libraries.


Language: The Small Basic language was inspired by an early variant of BASIC (Beginner's All-purpose Symbolic Instruction Code). BASIC was one of the first languages created with the goal of helping students to learn to code.


IDE: The Small Basic IDE is simple yet rich in features. The IDE strikes a balance between ease of use and preparing students to use more advanced compilers in the future.


Libraries: The Small Basic libraries helps beginners learn by writing interesting and compelling programs.


The BASIC language family is a group of general purpose, easy to use programming languages. There are more than 230 different documented variations of the BASIC language. The principles of BASIC emphasize simplicity and approachability – a strong framework for an introductory language such as Small Basic.


Microsoft Small Basic are not affiliated with the similarly-named SmallBASIC language.


Unlike QBASIC, Small Basic is based on .NET and can consume (not produce) "Objects". It supports distinct Operations, Properties and Events.


The Small Basic language is aimed toward beginning programmers. As such, it supports a much smaller feature set than the capabilities provided by Visual Basic.


Scratch and Alice are block-based programming languages that serve as great tools to help beginners learn the concepts of programming. Instead of using a text, Scratch and Alice allow users to write programs by chaining together blocks that perform various programming functions. In comparison, Small Basic is a text-based language.


Imperative

Just like the early variants of BASIC, Small Basic is imperative and doesn't use or expose beginners to concepts like scopes, types, object orientation, etc.


Simple

The Small Basic language consists of just 14 keywords.


Type System

There actually isn't one. You can create string and numeric constants and assign them to variables. Operations performed on these variables will be interpreted according to the content.


Variables

All variables are global and are always initialized. They can be used without assignment.


Events

You can create a sub-routine and assign it to an event. This will cause the sub-routine to be called when the event happens.


Libraries

The libraries provide static "Objects" that group operations, properties and events. New libraries can be created using other .NET languages and added to the Small Basic runtime.


How do I use Small Basic?

Small Basic is intended for beginning programmers. This language is often used as a next step after learning a block-based language such as Scratch. Small Basic has been very successful with students in elementary and middle school. However, the language is not just limited to children – adults that are interested in learning how to program have found Small Basic to be a very helpful first step.


The Small Basic Windows IDE can be downloaded on computers running Windows Vista, 7, 8, 8.1 or 10. Computers running Windows Vista or Windows 7 need to have the Microsoft .NET Framework 4.5 installed. Check out the Getting Started materials here for download, installation, and introductory materials.


The Small Basic online IDE can be accessed here and the Getting Started materials can be found here.


Information about building Small Basic applications for Lego Mindstorm can be found here and here.


Information about building Small Basic applications for Oculus Rift can be found here.


Information about building Small Basic applications for Arduino can be found here.


Information about building Small Basic applications for Kinect can be found here.


Information about building Small Basic applications for Raspberry Pi can be found here.


Every program published by students has a unique ID and a link to where it is hosted on the web. Students can also share programs via email. Teachers can use any of these tools to access student programs.


The Small Basic IDE provides rich error messages to help students understand compilation errors in their program. In order to keep the IDE simple and approachable for beginners, there is not an advanced debugger similar to the ones that can be found in more advanced IDEs.


Where is the Small Basic language going and how can I help improve Small Basic?

To keep Small Basic as simple and intuitive as possible, the language does not contain many of the advanced components found in more complex languages. The goal of Small Basic is not to be the language of choice for solving every conceivable programming problem – rather the language aims to provide an entry point to text-based programming.


Small Basic will always be a language focused on the beginner programmer persona. Retaining this focus is of the utmost importance – as such, all features that are added to the language will retain this emphasis.


The Small Basic IDE allows for third-party Small Basic library plug-ins in order to extend the possibilities of what can be done within Small Basic. Extensions can be written in C# or Visual Basic. Click here to read more about C# Extensions.


Making Small Basic open source is part of our effort to keep improving. Enabling access to our codebase will allow developers from around the world to create additional features they believe will better enable girls to learn to code. By creating a GitHub repository, we have opened the door between Microsoft and the largest open source community. We are excited for and look forward to the contributions we receive! 


To join the project, click here and clone the repo on GitHub. Create a branch with the following naming convention: username/descriptive_branch_name. When you are ready to submit, pull the most recent code down from origin into your branch and test once more, push to your remote branch (you will not be able to push to master) and submit a pull request. In the request, provide a description of your work along with limitations and future considerations. Request feedback/approval from the owner of the code and/or someone else that regularly develops on those files. If you commit to the branch and push again before the pull request is approved, it will be canceled and you will need to create another pull request.


Bug fixes and new features are always welcome as contributions and the public may contribute in any way desired. All developer contributions must follow and will be covered by Small Basic's Contributor License Agreement which validates that the contributor(s) have the right to contribute the content and that Microsoft has the right to use, distribute and relicense the contribution. 


The future of Small Basic depends on you. If the idea and the project are received well, we'll continue to invest in developing newer versions and supporting the most requested features.