Microsoft Small Basic

Apparently, Visual Basic has gotten a bit too complex for the kiddie crowd, so a Microsoft employee is working up a simpler, old school version of the language called Small Basic:

Small Basic is a project that's aimed at bringing "fun" back to programming. By providing a small and easy to learn programming language in a friendly and inviting development environment, Small Basic makes programming a breeze. Ideal for kids and adults alike, Small Basic helps beginners take the first step into the wonderful world of programming.

  • Small Basic derives its inspiration from the original BASIC programming language, and is based on the Microsoft .Net platform. It is really small with just 15 keywords and uses minimal concepts to keep the barrier to entry as low as possible.
  • The Small Basic development environment is simple, yet provides powerful modern environment features like Intellisense™ and instant context sensitive help.
  • Small Basic allows third-party libraries to be plugged in with ease, making it possible for the community to extend the experience in fun and interesting ways.

Be sure to check out the Small Basic blog and Small Basic Introduction (PDF) as well.

Thanks to Matt S. for the tip.

Discuss this Article 52

mikegalos@msn.com
on Nov 18, 2008
Additionally, there's the Coding4Fun team at Microsoft whose charter is to provide resources for people who program as a hobby. Their blog is at http://blogs.msdn.com/coding4fun/archive/tags/c4fnews/default.aspx The Coding4Fun start page is at http://blogs.msdn.com/coding4fun/pages/1994662.aspx
Waethorn
on Nov 18, 2008
Calling DRWAM: Please check your inbox.
lotsamystuff
on Nov 18, 2008
Good for them. And too bad that efforts like this have to be dismissed by those who see it as aiming for the "kiddie crowd". Or maybe you meant "kittie". Like Wae's "helper cat".
kcarson97404
on Nov 18, 2008
I know people love to trash on Microsoft, but this is one example of why I like this company. Here is a free program which makes computing fun. Thanks Microsoft, and thanks Paul for keeping us informed of these types of MS projects.
RedCoat999
on Nov 18, 2008
I use VB6 at work for automating Engineering calculations and inputs. We are not going to switch to VB.Net, totally different language and much more confusing for casual user like myself
mikegalos@msn.com
on Nov 18, 2008
RedCoat, It's not so much that the language itself has changed, it's that the .NET Framework is much larger and much more complex than the VB6 Runtime. Some examples, both VB6 and VB.NET use Begin...End blocks, both are case preserving but NOT case sensitive, both are object based, event driven languages. Now, I'm not saying the transition doesn't have a learning curve. It does. The learning curve is there in moving to any language that has a big framework underlying it. VB6->VB.NET is a big learning curve but VB6->C# is a greater curve and VB6->Java and VB6->ObjectiveC are even greater than that. In all these cases except VB.NET you're also having to pick up the "c style" syntax legacy and in the latter two, alternative platform philosophies on top of learning a new runtime framework.
Waethorn
on Nov 18, 2008
@losta don't be an a$$hat!
panache1023
on Nov 18, 2008
Mike, VB.NET is not just object based, it is object oriented...there are plenty of things you couldn't do in VB6 regarding true objects...inheritence, polymorphism, etc... Please don't compare the joke of a language VB6 is to a true language that VB.NET is... Personally, I hate VB6 and VB.NET. VB6 is just a joke, and VB.NET has all the same lameness that VB6 has.. Dim MyArray[5] (or whatever the syntax is in VB)...oh, you get 6 elements...that's smart AND intuitive...NOT VB sucks in every incarnation...the only thing VB6 had going for it is that it let NON developers write code, and it was a great quick and easy way to test COM objects... C, and C++...now those are nice languages....C#, I like it too....do we see a pattern. If VB ever dies (which I know it won't), I'll be cheering.
shark47
on Nov 18, 2008
"C, and C++...now those are nice languages...." Yup, with buffer overflows.
panache1023
on Nov 18, 2008
Shark, C and C++ are not inherently unsafe. If you don't know how to check the size of your buffer, you deserve to overflow.
shark47
on Nov 18, 2008
C++ is not even a true OOP language and has some of the same problems C does.
panache1023
on Nov 18, 2008
Shark... what is your POINT?! I never said C++ was a "true object oriented language", I said it was a NICE language... and EVERY programming language has its own set of problems.
shark47
on Nov 18, 2008
C++ is too complex when compared to Java and VB.Net. I never cared much for it. I've heard C# is better, although I've never used it. I like to use C for the main code and VB.Net to call it - best of both worlds. :-)
panache1023
on Nov 18, 2008
If you like VB.NET to call your C code, I think you'd prefer C#....it's virtually the same when it comes to P/Invoking, plus it has the super sexy beautiful C-like syntax!
mikegalos@msn.com
on Nov 18, 2008
Panache I'm not even going to begin to get into what is or isn't "object oriented" I'll just leave it as what Alan Kay said in the hallway at OOPSLA 87: "I invented the term Object Oriented and I get to say what it means". As I recall, he was saying that Smalltalk 72 WAS Object Oriented and Smalltalk 80 was not.
mikegalos@msn.com
on Nov 18, 2008
panache "C and C++ are not inherently unsafe." Totally and completely wrong. Period. They are inherently unsafe. You can work around the issues by avoiding their problems but that's like saying an original swing-axle Corvair isn't inherently unsafe because if you never drive it you're fine. That a language didn't have the inherent concepts of a string or an array by the late 1960s is just sloppy. That it continued as a major language with years of revisions not fixing those flaws is both insane and the cause of most security issues of the last 20 years.
Ocean
on Nov 18, 2008
Some folks are using Small Basic to solve the problems at Project Euler. http://projecteuler.net/index.php?section=problems >>Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems. The motivation for starting Project Euler, and its continuation, is to provide a platform for the inquiring mind to delve into unfamiliar areas and learn new concepts in a fun and recreational context.<<
mikegalos@msn.com
on Nov 18, 2008
panache "super sexy beautiful C-like syntax" You mean like * having multiple meanings? Or sizeof being an operator? Or indeterminate operation by shortcut?
mikegalos@msn.com
on Nov 18, 2008
As an FYI on just some of the idiocies in the "super sexy beautiful C-like syntax" I'd offer Eberhard Sturm's 1994 paper comparing C to that classic of 1964 era programming design, PL/I. The paper, "Power vs Adventure - PL/I and C", is at http://www.uni-muenster.de/ZIV.EberhardSturm/PL1andC.html (I pick this example to show that while I'm no doubt biased, it's hardly a blind pro-Microsoft bias since Microsoft is a C-deriviative shop despite getting started in business with BASIC and Fortran and PL/I is an IBM language and the paper was from an IBM conference)
panache1023
on Nov 18, 2008
Mike, 1. Just because there are pitfalls to a language does not make them inherently unsafe.... strcpy() may be an inherently unsafe function, but the language itself is *NOT* unsafe, and just because you say "Period" does not make it so....if it was so inherently unsafe, the successor to C would be in wide use by now to accomplish the things developers still use C for.....which language is that? 2. No, I do not mean like * having multiple meanings or any of the examples you site. They are ridiculous examples! I meant the terse style of the language using curly braces, and -> for pointers...it's pleasing to my eye, it's "sexy" in my opinion....maybe you are unaware but even in HUMAN language there are plenty of words that have multiple meanings....*CONTEXT* means a lot! If someone is programming in such a way that you can't look at their code and understand what they are doing or why, they should rethink what they are doing.... x = ++y; why do that when you can do ++y; x = y; Not only is the second way easier to read and understand, it gives you better debugging ability to change values while you debug. if someone is programming like x += ++y; May god have mercy on their sole...sometimes "job security" isn't worth the gains you get by writing code in a clear cut, easily readable, easily maintainable manner....to me, the LATTER is true job security.
mikegalos@msn.com
on Nov 18, 2008
panache C# is meant, in part, as a way to do c-like syntax without the inherent security flaws in c itself. Yes strcpy() is inherently unsafe. But so is the entire concept of null termination as a workaround for not having a concept of a string and so is the concept of using pointers to memory to work around not having arrays. Those are flat out inherent security flaws in the language itself. And they were flaws that had long ago been solved when c was written and when c++ and ObjectiveC were written. (With some slack cut to Stroustrup since he meant C++ as a preprocessor and not a language) Personally, I'd find: ++y; x = y; to be just about as ugly as x += ++y; since the ++ operator is positionally specific (++y vs y++) and really adds nothing but syntactic sugar to y = y + 1 Yes, I'd prefer: y = y + 1 x = x + y (and, yes, I'm skipping the ";" terminator since it decreases readability) Oh, and "*" having multiple meanings is hardly a ridiculous example, to have one operator meaning "multiply" or "pointer" or "power" is nuts. Look at the partial line: "**a". Is it part of a line saying a is to be treated as a pointer to a pointer? is it part of a line saying "raise something to the power of a"? Is it part of a line meaning "treat a as a pointer and multiply something times what a points to?
meason
on Nov 18, 2008
C# all the way!
mikegalos@msn.com
on Nov 18, 2008
(oops) That was supposed to be x = y and not x = x + y in the example
Ocean
on Nov 18, 2008
Here is a great Windows 7 quote: >>Windows 7 is the first Windows release I’ve ever used that looks like it was designed and not just bolted together from projects built in parallel by disconnected development teams.<< I'm excited to check it out.
mikegalos@msn.com
on Nov 18, 2008
meason C# all the way! VB.NET all the way! C and C++ should be consigned to the dustbin of history along with autocoder and RPG.
panache1023
on Nov 18, 2008
Mike, Getting rid of C and C++ would be a huge mistake because, even though .NET is very performant, it still doesn't match the raw power the other languages can get. and your example about "**a"...like you said, is it PART of a line.....let's see the rest of the line, and I bet it becomes much clearer...probably answers the question immediately. Also, I thought the purpose of the "++y" type operators were not just for syntactical sugar but that they use to help with the native code optimization. I would personally prefer to see x += 100 or something that x = x + 100...but something where the right hand side becomes complex I feel is easier to understand the "long hand" way. VB.NET can be buried...the sooner the better...the language is idiotic...basically I feel that way because the syntax is AWFUL and the stupid array allocations are dumb... Dim x as Int32(5) and you get 6 elements...pure genius.
mikegalos@msn.com
on Nov 18, 2008
panache First off, zero based arrays is pretty much a standard in almost all languages. Maybe not the best design but hardly a VB.NET thing. As to **a, the point of a language is to translate the meaning of the programmer into something the processor can execute. Vagueness is NOT an option until we get languages that can understand intent (see Charles Simonyi's intentional programming). That we can work around bad design doesn't make it good design. Syntax should be clear. As for compiler optimization as a language goal, I've always felt that the compiler should work for the programmer and not the other way around. The work of the few people creating languages should be to make life easier for the large number of people using languages. Your finding it acceptable that a language construct should exist because it makes it easier to write the compiler is the same as saying that we should put [b][/b] tags in Word because it would make life eaiser than implementing WYSIWYG editing for the Word team. The problem with ++y is twofold: 1) People don't use ++ in real life and the way people DO increment is already supported. 2) Since ++y and y++ do more than one thing they're not really operators, they're shortcuts for a method. 3) Since ++y and y++ do different thing and even moreso if y is not a number they add confusion. Additionally since they can be used in macros and on non-numeric operands the order specific actions can introduce side effects not obvious to the programmer who may have their code used later as part of a larger structure of code. Now, as to your dislike of VB.NET, perhaps you should give some examples that actually matter rather than the base of arrays being 0 (ironic since the c libraries use 0 as well and c doesn't even know what an array is)
mikegalos@msn.com
on Nov 18, 2008
As for getting rid of C and C++ because they have efficient compilers, that's because they expect the developer to do the first pass. A bad idea. C was designed as a friendly front end to PDP-7 assembler for serial communications programs. We don't use PDP-7s anymore and very few people write serial communications programs. For the few people who need a macro assembler, I'd suggest they use one. For those who need an applications level language, there are many better choices. C and C++ are neither.
panache1023
on Nov 18, 2008
Mike, What are you TALKING ABOUT?!?!?!?!!? I never said ANYTHING about 0 based arrays being a problem! In C if you do int x[5]; you get FIVE ELEMENTS! x[0]...x[4] In VB6 and VB.NET if you do Dim x as Int32(5) you get SIX ELEMENTS x(0)...x(5)....THAT IS IDIOTIC! Can I be any clearer about that? I said twice already that in VB6 and VB.NET dimming an array specifying a value gives you that value PLUS 1....unless you explicitly say Dim x as Int32(1 to 5) Stop putting words in my mouth.... for more examples of why VB sucks as a language...primarily from VB6....many of these many no longer be applicable in VB.NET you can do x = 5, or Let x = 5 however, if you are using a COM interface (or some other object) and you do NOT use the "SET" keyword, it's a syntax error. If you call a method in VB6 SomeMethod(param1, param2) and one of those parameters is a ByRef parameter, the behavior is different than if you do CALL SomeMethod param1, param2 And how come I can't use parenthesis if I say "CALL"...or something like that...I always get confused with this stupid VB6 language because there are multiple ways of doing something that SEEM the same, but aren't.... Another beauty...the idiotic OPTION EXPLICIT.....please! So someone can write code where the types are interpreted, and someone else can use the SAME LANGUAGE to write code where the types are explicitly specified and enforced...yeah, that's great! How come I can do an IF statement without a THEN if it's all on one line, but I need a THEN statement if the "true" part of the conditional is to be broken up onto multiple lines? The reason C uses 0 based arrays is due to the way the memory is handled, which makes 100% absolute sense when you put it in perspective of how a computer works allocating blocks of memory in contiguous blocks. Remember C is meant to be a low level language so if you want a block of memory, you are getting a block of contiguous memory page aligned blah blah blah...where it is extremely fast to increment that pointer to the next "element" in the "array" another thing, I agree the compiler should work for us..I was making reference to code written years ago when performance was much more critical, and using "++y" *may* have helped produce a better optimized piece of code. Obviously on today's CPUs the gain you would get from that, if any, would be minimal. I have read in numerous places that the current crop of programmers who have no clue about C / C++ produce much poorer code when writing their Java and C# apps than programmers who have knowledge of the lower level languages and have an idea of how things may be working behind the scenes.
chuckb84
on Nov 18, 2008
Oh, fun, a LANGUAGE debate. Along with text editor debates, it's one of the few such that can get more vitriolic and divorced from reality than the Mac/Win debates. "First off, zero based arrays is pretty much a standard in almost all languages" Sadly, true, except cough-Fortran-cough. And everyone knows there is never a column "zero" in a matrix, so any language that forces you to deal with zero-based arrays will have you tearing your hair out when you do any scientific/eng/number crunching coding. If you must use C-derived languages, at least there is f2c. And, a small plug for Objective C, sort of parts of Small talk crossed with standard KR C. I am not much of a programmer in Obj C, but I would describe it as "just enough object oriented" to get the job done. C++ is a monstrous language, and monstrosities get written in C++. As for coding style, see the old but classic "Elements of Programming Style" by Kernigan and Plauger, a slim little volume modeled after Strunk and White "Elements of style". Two very good books. And "Elements of Programming Style" teaches programming style with good and bad examples from ANSI 66 Fortran and PI/1.....proof that good programming style does not depend on the language, although the language can certainly help or hurt.
mikegalos@msn.com
on Nov 18, 2008
panache Then I misread your earlier statements about arrays. I'd say that Dim a(4) giving an array that goes from 0 to 4 is at least as clear as int x[5]; giving an array that doesn't include x[5] since that's what's mentioned in the statement. Note also that VB's syntax is based on having dynamic arrays and makes more sense when you're declaring arrays that don't start at 0 The other examples you give I'd tend to agree are sloppy (but I'd note that they're not what c would consider part of the language but, rather, part of the library and if we go there, c is really hideous), some are, as you guessed, old VB6isms, and the remaining OPTION EXPLICIT was a transition compiler flag (not a part of the language anymore than #debug is a part of c) that allowed for backward compatibility between compiler versions. As for why c uses 0 as a base being tied to how memory is allocated, that's actually an example of how the compiler writer's simplistic design forces the programmer to be a pre-processor (and isn't even accurate anymore with dynmamic memory allocations in the OS) Knowing how a computer works is something I'd agree is important to be a good programmer. And, for that, I'd suggest students learn an assembler or even a little native machine language. C, on the other hand, only teaches you how a PDP7 works and cripples your writing style after that.
robertsjoe
on Nov 18, 2008
@mikegalos: "C and C++ should be consigned to the dustbin of history along with autocoder and RPG." That will not happen. At least for many years to come. They have a much greater use than something like VB6 or VB.NET. The sooner VB6 and VB.NET die, the better the world will be. It allowed too many amateurs to think that they were all of a sudden software engineers - when they are just hacks. VB.NET has an ugly syntax. I mean, AndOr and OrElse operators to covert up mistakes of VB6? Ridiculous. C/C++ have a long long way to go before they are dead. I mean, your beloved OS, Office and all the rest are written in them.
mikegalos@msn.com
on Nov 18, 2008
chuckb OK. This is scary. I'm agreeing with you on pretty much everything. (Well, I'd say Objective C is a closer way to put real object orientation onto C than c++ but I'd argue that either one is putting lipstick on a pig and that Objective C is just a nicer shade of lipstick. As for language debates, at OOPSLA 87, I was standing in line for the banquet between Bjarne Stroustrup (creator of c++) and Brad Cox (creator of Objective C) while they discussed what was the better way to graft OOP onto c so after that, this is nothing.
mikegalos@msn.com
on Nov 18, 2008
robertsjoe First, there's a LOT more VB code out there than C Second, I didn't say that it would happen anytime soon, just that it should.
robertsjoe
on Nov 18, 2008
@mikegalos: "First, there's a LOT more VB code out there than C" Prove it.
robertsjoe
on Nov 18, 2008
The problem with Basic is that those that can't, don't move on to something better. It is the "Beginner's All Purpose Symbolic Instruction Code" after all. Once you get past being a beginner, you're better off moving on to something else.
robertsjoe
on Nov 18, 2008
@mikegalos: Look Mike! FOUR retail versions of Vista! :) A second rate OS running on the best hardware out there. http://bs0l.com/images/vista.jpg
robertsjoe
on Nov 18, 2008
@mikegalos: I would find that extremely hard to believe though. Firstly because of the decades head start that C has. Secondly, because it is available in virtually every OS out there, including mobiles, embedded, etc. My guess would be that it is at an enormous distance in front of VB as far as the amount of code out there written in C.
panache1023
on Nov 18, 2008
See, the thing about VB.NET is that it *PROBABLY* wouldn't have a place to on this Earth if it wasn't for VB6 to begin with...that VB6 -> VB.NET wizard only exists so that all those lines of VB6 code could HOPEFULLY be "upgraded" to something more modern... either way, regardless of your choices of programming language, it's nice to see Mike Galos have an intelligent discussion without going of the deep end (yet)... CHEERS Mike Galos.....CHEERS!
panache1023
on Nov 18, 2008
Robertsjoe, Seriously man...what is your deal....yes everyone knows you love Mac and hate Windows...fine. Everyone knows you hate Mike Galos (or at least like to go after him)...hell, I like to go after him too...but geez man! The guy said nothing wrong and you start attacking him about "his beloved" OS and Office or whatever...... Dude.......you need to get a grip..... PS I like my Mac :)
robertsjoe
on Nov 18, 2008
@panache1023: I do not hate Mike. Not at all. I take this as fun banter. Them's not fighting words. I simply disagree with Mike's statement that there's more VB code out there than C. Find it very hard to believe. That's all. There's no hate there. Mike, if you think I hate you (not that you'd probably care), I don't. It's simply like I said, with the years head start, the fact that virtually every OS ever released, in embedded systems, mobile phones; all of them having C compilers - I think C would have an enormous lead on the amount of code out there.
shark47
on Nov 18, 2008
"See, the thing about VB.NET is that it *PROBABLY* wouldn't have a place to on this Earth if it wasn't for VB6 to begin with" Same with C++. There wouldn't be C++ if it hadn't been for C. :-) Anyway, VB.Net made it easier for people to write Windows applications. And I can still do most of the work in C and use VB as the front end. I think that's pretty cool. It helped me get my PhD, so why will I complain? :-)
mikegalos@msn.com
on Nov 18, 2008
panache Actually, I'd say it's fair to say that VB.NET wouldn't exist without Visual Basic 1.0 bringing GUI programming into the realm of application level programmers back when it was introduced in 1991 at Comdex/Windows World in Atlanta. That product changed the world of programming. For a good description of those days, the only good history I've seen is Scott Ferguson's article "Thunder: The Birth of Visual Basic" which is on his website at http://www.forestmoon.com/BIRTHofVB/BIRTHofVB.html which is a must read for anybody interested in how VB got created. (I still have my Thunder desk clock and team t-shirt from back then)
mikegalos@msn.com
on Nov 18, 2008
panache "it's nice to see Mike Galos have an intelligent discussion without going of the deep end" Actually, the stuff I've said on this thread is a LOT less in the "generally accepted" range than the stuff I usually get flamed for here.
mikegalos@msn.com
on Nov 18, 2008
robertsjoe Actually, I thought that c had more code out there than VB until I saw the numbers. What you're missing is: 1) The vast, vast, vast majority of computers out there run Windows. Yes, there is c for lots of platforms but 20 niche platforms that add up to .001% of the market don't matter that much, nor do the next 100 that add up to .01%. 2) Most programs in the world are either internal to corporations or are application rather than system level. And the vast majority of those have been in VB since the switch from mainframe COBOL.
mikegalos@msn.com
on Nov 18, 2008
BTW: To get a little tribute where it's due, I'd like to call out the key team who produced Visual Basic 1.0 - many of whom are almost unknown despite changing the world... Adam Rauch - Program Manager Nevet Basker - Product Manager Scott Ferguson - Dev Lead Brian Lewis - Developer Chris Fraley - Developer Rick Olson - Test Lead Brian Overland - Lead Writer (And, of course John Fine and later Tom Button leading the DABU org and Bill Gates for the vision for the product)
panache1023
on Nov 18, 2008
Mike, What I mean is...you are making good lucid points without falling into what most consider your arrogance, and you are talking with a lot of fact, and not so much your opinion which you feel is fact, nor are you on your "MS is the best thing to happen to the Earth" pedestal or something. Cheers to you.
robertsjoe
on Nov 18, 2008
@mikegalos: You really should get paid by MS for your evangelism. Want me to ping Ballmer and let him know? ;)
Waethorn
on Nov 18, 2008
Programming - BAH! I'm glad I don't do it anymore.
mikegalos@msn.com
on Nov 18, 2008
panache Actually, what I've said in this thread is a LOT more arrogant than anything I've said in the other ones. It just doesn't trip the "Microsoft is evil, attack anyone who doesn't criticize them" alarms that some people seem to have.

Please or Register to post comments.

IT/Dev Connections

Las Vegas
September 30th - October 4th

Paul ThurottYou'll have the opportunity to experience:
• 120 Technical
Sessions
• Networking with Peers
• Expert Speakers


Come See Paul Thurrott & Mary Jo Foley in Person!

Register Now

Office 365 InfoCenter

Get the latest insight and info from Paul

Read Now!

What I Use