Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Expert to Expert: The Basics of SmallBasic

Download

Right click “Save as…”

  • High Quality WMV (PC)
  • MP3 (Audio only)
  • MP4 (iPhone, Android)
  • Mid Quality WMV (Lo-band, Mobile)
  • WMV (WMV Video)
SmallBasic is a new programming language aimed at beginners. It was created as a side project of Vijaye Raji, a software developer on the Oslo team. SmallBasic is a very limited language with only a handful of keywords and a small set of concepts that should make builing an application on Windows very simple for beginners. However, don't let it's simplicity fool you into thinking that you can't build very compelling applications with it on Windows...

Here, programming language designer (and de facto Expert to Expert host) Erik Meijer, Oslo architect Chris Anderson, Vijaye Raji and I discuss the details behind, in between and in front of SmallBasic. Why was it created in the first place? Why the VB-like syntax? What's the goal of the language and runtime, anyway, given that there are already beginning languages out there that run on the Microsoft stack? Why is the language designed in the way that it is? Why is it so popular? How will it evolve? You know, typical Channel 9 questions. We go pretty deep here, but we don't touch bottom. It was a lot of fun taking part in this conversation and I am impressed with SmallBasic and the folks behind it.

Tune in. If you want to know the details behind (and in front of) SmallBasic, then this conversation is for you.

Enjoy

Tags:

Follow the Discussion

  • Mark Wisecarverwisemx Live it
    Cool. SmallBasic is doing very well.
    My 9 year old son loves it.
  • The choice of "Sub".  This is the same as in VB when the "code chunk" won't be returning a value.  It seems ok.  The actual keyword "Sub" is pretty vague, it's only when we expand it to the word Sub-routine that it sounds dated.  The doc files and read-me's can just refer to these blocks of code as "Subs".

    --
    Furry cows moo and decompress.

  • Chris PietschmannCRPietschma​nn Chris Pietschmann

    And we now have proof that VB6 just doesn't want to die. I know this isn't VB6, but it's proof that VB.NET has too steep a learning curve for some of the very beginners.

  • Chris PietschmannCRPietschma​nn Chris Pietschmann
    This brings me to the following question:

    Why not just create a newer version of VB6?
  • Love this - am using it as part of DigiGirlz curriculum in SoCal - thanks Vijaye - keep up the great work!
  • Me (to daughter):  Did you do any more chapters in the Small Basic tutorial?
    Daughter:  Yes, Daddy, I have a program that will say "Good Morning" if it's the morning, and "Good Evening" if it's night.
    Me:  That's great, honey!
    Daughter:  Also, if you type in a word, it will display the definition.
    Me:  What??!!  [with lots of confusion and a bit of disbelief]  Was that in the same chapter???
    Daughter:  No.  I was just playing around.

    She showed me the program, and the Dictionary keyword.  I had to disable networking and see it quietly fail (returns nothing for definition) before I could believe it was web-service based dictionary.

    Congrats on thinking out of the box and including a web-service enabled uber-function as the 12th most important keyword.
    My daughter and I are *both* learning what programming is!
  • stevo_stevo_ Human after all
    Thats really great!
  • CharlesCharles Welcome Change
    Marvelous! Keep on coding. Pretty easy, isn't it?

    C
  • You should add some Syntactic sugar to the language

    1) So at least rename the TextWindow object to T  ( i.e. the letter T )
    and the graphics window to only G
    and make the default window to selected automatically or by declaration
    I don't want my kids to waste their time in typing long words
    compare this :
    n = T.Readnumber()
    with this
    n = TextWindows.Readnumber()

    2) Remove redundant brackets  ... for empty arguments !!  so we'd have ...
       Writeln "Hello World"
       instead of
       Writeln("Hello World"

    4) add BASIC keywords and GWBASIC ... such as DATA , etc

    5) How about simple file handling ( open , read , write  ..) ??

  • Josejlcard Jose
    Would it be dificult to make "Small C#" ? or is it out there already? if not I would like to help creating the equivalent editor for such a thing Smiley
  • While I have no particular love any more for BASIC (in all its forms) as a language per say, I think the goals of this project are utterly brilliant. When it comes to shipping this with Windows you'll need to be very careful that this doesn't end up being another attack vector. The reimaging of IntelliSense is also very fetching. It's going to be very interesting to watch this language since by its very nature it's going to be defined by what it doesn't include...

    What I really want is the C# 4+ eval loop that Anders demoed at PDC 2008 in a SmallBasic-esc IDE, not for in-anger work but just for code doodles.
  • CharlesCharles Welcome Change
    The simplicity of SmallBasic is truly cool.

    GraphicsWindow.DrawText(20,50, "Loading images...")

    For i = 0 To 10
      pic = Flickr.GetRandomPicture("Channel9")
      GraphicsWindow.DrawResizedImage(pic, 0, 0, 640, 480)
    EndFor
      
    GraphicsWindow.Clear()  
    GraphicsWindow.DrawText(20,50, "Done!")

  • Vesuviusvesuvius Count Orlock
    This is splendiferous. I love the fact that someone like Erik has his antennae towards SmallBasic. Vijaye does make his justifications well. Most people would just do what they were told if they were speaking with Chris and Erik.

    I wonder what Anders or Paul Vick think of this?

    With the regard to this being included in Windows, I for one would love it to be so. It is quite easy to SandBox a lot of the nefarious functionality anyway, so hopefully this can be included in Windows 8 or 9 if it matures well.
  • stevo_stevo_ Human after all
    Sorry but most of those ideas are pants, especially the first.. "I don't want my kids to waste their time in typing long words".. the hell?
  • Is there any chance we can get a version that install on the Windows 7 beta? Smiley
  • CharlesCharles Welcome Change
    I'm running it on Win7 Beta with no issues.
    C
  • It would be cool with a pure version of this environment for kids as well - where you can't in fact say x += 1. Something to prevent corruption of the mind Wink
  • Christopher Harrisfinches Safety first!
    This is an absolutely amazing idea.  When I was a kid I couldn't afford to have a PC, so the first thing I'd look for on everyone elses computer was qb45 and code away.  I almost wish I had a kid just to teach them Small Basic Smiley
    Great work Vijaye!
  • Years ago I decided programming wasn't for me, after picking up a C++ book in a college bookstore and realizing it was over my head. This stopped me from going beyond much more than writing simple HTML web pages. But this SmallBasic TRICKED me!! Suddenly I want to program stuff. SmallBasic = Brilliant!!! Thanks for creating it! x10000

  • Interesting Charles. Are you running on the public 7000 build of Windows 7 and using the public Dev Labs build of SmallBasic? I get the same install error on Windows 7 at home and at work - and both of these boxes are clean installations of Windows 7. Guess I'll have to try popping open the SmallBasic MSI and see if I can't figure out how to put it together by hand...

    [Updated]

    No need to pop the MSI. It seems that the problem is down to a issue with the CEIP in the Windows 7 Beta. After performing the following official incantations SmallBasic installs beautifully.

    An issue with the Customer Experience Improvement Program (CEIP) client in Windows 7 beta is causing Explorer and some MSI-based installers to stop working properly.

    To solve this problem, follow these steps:

    Click the Start button , click All Programs, and then click Accessories.

    Right-click Command Prompt, and then click Run as administrator.  In the User Account Control window, verify that Program name is Windows Command Processor, and then click Yes.

    In the Administrator: Command Prompt window, type or paste the following text at the prompt:

    reg delete HKLM\SOFTWARE\Microsoft\SQMClient\Windows\DisabledSessions /va /f

    Press Enter to install the solution.

    If The operation completed successfully displays, close the Administrator: Command Prompt window to complete this procedure. If "ERROR: Access is denied" displays, repeat this procedure from the top, making sure you clicked Run as administrator in step two.

  • That's very cuty~ Smiley
    Like that!!
  • Just type the first one or two letters of the word, scroll up or down to the desired (key)word and press TAB.
  • Documentation for InsertLine says:

    InsertLine
    Opens the specified file and inserts the contents at the specified line number.
    This operation will not overwrite any existing content at the specifid (sic) line.


    Should say:
    Opens the specified file and inserts the contents before the specified line number.
    This operation will not overwrite any existing content at the specified line.
    If the selected line number is greater than the number of lines in the file the line will be appended.
    If the selected line number is 0 the line will be ignored - no alteration.

    Example:
    my_return = File.InsertLine("C:\my_file.txt",1,"This is a test " + 1)
    TextWindow.WriteLine(my_return)
    my_line = File.ReadLine("C:\my_file.txt",1)
    TextWindow.WriteLine(my_line)

  • KareemKareem Kareem

    Well, i am used to write code in VS EE and/or other complex Development Environments but when i saw the SmallBasic IDE, i totally lost myself in its simplicity Tongue Out ROFL Despite its simplicity, its a great approach for beginners! But what i miss is a compiler,...Crying

  • I'm with you, in that I love the simplicity of Small Basic. However perhaps you're unaware that it is, in fact, a compiler!  Just look in whatever folder you load your .SB files from, and you should see compiled forms of all your projects!  For instance, I threw together a simple "Pong" clone ( Yeah, I know - why bother, right? ), and I named my project file "pong.sb", so next time I looked in the folder, sure enough - there was "pong.exe", all compiled & ready to go!  I will say Small Basic leaves much to be desired in terms of performance - don't expect blistering execution speed - but it's whole purpose is to serve as a learning tool, not the next "bleeding-edge" C+++++ Uber- development tool.  To that extent, I think it fits the purpose beautifully!

  • Phil ConrodPhil Conrod

    Computer Science For Kids has published several Microsoft Small Basic Tutorials that pick up where the Microsoft Small Basic Tutorial leaves off. You can find out more information about them at http://computerscienceforkids.com/MicrosoftSmallBasicTutorials.aspx

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.