Microsoft Small Basic

by livingliston 5/13/2023, 8:06 AMwith 99 comments

by vijayeron 5/14/2023, 9:19 PM

Hey all, creator of Small Basic here. I made this back in 2008 as a side project when I used to work at Microsoft. My belief was/is that you can get more kids interested in programming when the IDE (language + runtime + libraries) encourages iterative coding with simple gratification loops built in.

You can see a bunch of decisions influenced by .Net which I was working with back then. I had been meaning to go back and revisit some of those decisions, but haven't had a chance yet. I have changed my stance around scoping and argument passing in functions, for instance.

(What is really neat is that 15 years later, my son is learning coding with Small Basic. And I hired an engineer for my current startup who had started coding with Small Basic as a kid in Brazil.)

by chabad360on 5/14/2023, 7:25 PM

Wow, this really brings back memories. Small Basic was the first actual programming language I learned back when I was 10 years old. I remember getting my dad to print the language manual so I could read it on the plane ride to my grandparents.

The editor they shipped had some neat features for the time like Intelisense and built-in docs, it even had support for third-party libraries with DLLs. One really neat feature I also remember was that you could turn a SB project into VB with a click of a button, it would create the VS solution and vbproj for you. I'm not quite sure how it worked with the language itself cause VB looks quite a bit different and it wouldn't change your code (no transpiling or stuff like that, just a wrapper).

Funnily enough, I didn't actually move to VB from that, I went to C# (which I have since forgotten). But it definitely got me quite a bit further in my developer journey (now I work with Go at a small org).

by WillAdamson 5/14/2023, 2:24 PM

There's an effort at a "Visual" version of this:

https://github.com/VBAndCs/sVB-Small-Visual-Basic

Which I've been trying to determine if I should try.

For a while I thought Livecode (formerly Runtime Revolution), a rebooted HyperCard was going to be a good fit for small, graphical interface projects, but that's not looking so good since they closed the source and changed the license.

I'd really like to find something which is as straight-forward to use as Blockly, but which had a stand-along desktop app/IDE.

by dangon 5/14/2023, 8:36 PM

Related:

Microsoft Small Basic - https://news.ycombinator.com/item?id=9981557 - July 2015 (87 comments, some from the creator)

Microsoft Small Basic - https://news.ycombinator.com/item?id=1172519 - March 2010 (26 comments)

Small Basic: Programming Is Fun - https://news.ycombinator.com/item?id=1171383 - March 2010 (27 comments)

Introducing Small Basic - Microsoft releases yet another programming language - https://news.ycombinator.com/item?id=358050 - Nov 2008 (6 comments)

by themodelplumberon 5/14/2023, 2:45 PM

Speaking of Small Basic, I found that SmallBASIC was a really fun discovery:

https://github.com/smallbasic/SmallBASIC

There are lots of examples to work from, a very functional Android app, and Linux users can use the AppImage releases to get up and running fast.

Back when I was comparing BASIC distros for scripting/programming, this one was by far my favorite for day-to-day use cases.

(BTW, does anyone know if the MS Small Basic software runs in Wine?)

by ok123456on 5/14/2023, 3:38 PM

>Likewise, your program can use any variables defined in your subroutines. In computer talk, we say all variables in a Small Basic program have global scope.

Is scope really that big of a hurdle for beginning students? Also, in the examples I saw there are no formal functional arguments. This seems like a big step backwards as a teaching language compared to Racket/Dr Scheme. Copying the same bad design decisions from 70s BASICs because of nostalgia doesn't seem that helpful for actual education.

by tpmxon 5/14/2023, 2:15 PM

I quite like this modern reimplemention of GW-BASIC:

https://robhagemans.github.io/pcbasic/

by pwdisswordfishcon 5/14/2023, 12:28 PM

Is this actually Microsoft-made? Everything about the webpage design screams knock-off.

by jonplacketton 5/14/2023, 1:44 PM

Still think QBASIC was the perfect way to start coding.

by chkason 5/14/2023, 12:28 PM

> Small Basic is the only programming language created specially to help students transition from block-based coding to text-based coding.

Not the only one: https://easylang.dev/ide

by svb_2023on 5/16/2023, 5:41 AM

Hi @vijayer Thanks for the amazing language. I'd like to tell you that I've eveolde SB by adding a form designer and a mini winforms lib, in addition to many modification to the compiler itself. For more details: https://github.com/VBAndCs/sVB-Small-Visual-Basic I also provided a 750 pages reference book for sVB: https://drive.google.com/file/d/1pCnB4_7pEBc_wT2u258MmutYCuX...

Thanks.

by Daunkon 5/14/2023, 4:50 PM

I still think BlitzMax NG is the way to go if you want something similar to BASIC - https://blitzmax.org/

by Dalewynon 5/14/2023, 2:41 PM

>For ages 7 to 107, Small Basic is one of the easiest ways to learn to code.

I really miss programmer sense of humor, we used to have more of this back in the day.

Everything is so bland and serious now.

by TrashHeap64on 5/14/2023, 8:16 PM

I didn't care much for Small Basic when it came out. It did lead me to QB64 which I had a lot of fun with

by tomcamon 5/15/2023, 5:58 AM

> For ages 7 to 107, Small Basic is one of the easiest ways to learn to code.

I’m 109 and I feel I’m not being seen

by im_down_w_otpon 5/14/2023, 4:29 PM

I’m over here pining for Apple to give the revival treatment to HyperCard with iOS as a “Stack” target, so my kids can make apps for the iPad and share them with their friends.

by int_19hon 5/15/2023, 2:24 AM

I really wish someone would revive ABC:

https://homepages.cwi.nl/~steven/abc/programmers/handbook.ht...

by rbanffyon 5/14/2023, 2:12 PM

It’s fun, but isn’t the effort similar to learn, say, Python, with a lot less market value?

If you start from nothing, C can be as easy as BASIC. You can do a lot without ever touching malloc/free.

by keithnzon 5/14/2023, 9:56 PM

I really liked it when my eldest son was playing with it years ago, but not being able to build your own functions was really unfortunate.

by protosteron 5/14/2023, 7:03 PM

NSFW, this is some serious domain name gore.

by teddyhon 5/14/2023, 3:55 PM

At that point, you might as well just start with Python.

by UberFlyon 5/14/2023, 8:02 PM

Learn to code with these creepy turtle-faced humanoids.

by FourthProtocolon 5/14/2023, 4:00 PM

Top comment here is how many I interact with react when they discover my love of VB. net. Some food for thought, then:

I wrote my first complete computer program in 1986. Since then I've programmed (or scripted) in Assembler, BASIC, C, C#, C++, COBOL, F#, HTML, Java, JavaScript, LOGO, Pascal, SQL, VBA and XAML. I don't mind C#. Or Java. The majority of the code I've written in my career was written in C#. And yet my preference remains VB.NET because -

VB.NET supports both static and dynamic typing.

VB.NET is a functional language, supporting local type inference, anonymous functions, monads, and language integrated comonads (even Lisp can be more complex and verbose than VB.NET with LINQ).

VB.NET does project-wide namespace imports. C# doesn't.

VB.NET is no more or less verbose than C#. Haskell and F# however, are indeed a lot less verbose.

There are also readability issues in Java and C# that VB.NET doesn't have (braces, == and =, ! instead of Not, seperate keywords for inheritance and interface implementation, and so on). I learnt Pascal before learning C (and prefer Pascal to C). The fact that Pascal and VB.NET share syntactical smilarities (type declarations follow variable and function names, the Not keyword) is probably not an insignificant factor.

Lastly, Microsoft announced that evolution of the VB.NET language has concluded, (although it will support .Net 5). This is welcome because it makes things predictable -- modernising legacy codebases takes ages.

by codefloon 5/14/2023, 2:00 PM

> when you graduate to Visual Basic

Please don't. I don't mind Microsoft pushing .NET languages, that's sort of expected, but why VB? Getting started with modern Visual Basic isn't actually all that much easier than with C# -- both target the .NET runtime, and the deeper semantics are actually largely the same. And C# is infinitely more relevant in the job market.