Expert to Expert: The Basics of SmallBasic
- Posted: Jan 20, 2009 at 11:00 AM
- 83,436 Views
- 26 Comments
Download
How do I download the videos?
- To download, right click the file type you would like and pick “Save target as…” or “Save link as…”
Why should I download videos from Channel9?
- It's an easy way to save the videos you like locally.
- You can save the videos in order to watch them offline.
- If all you want is to hear the audio, you can download the MP3!
Which version should I choose?
- If you want to view the video on your PC, Xbox or Media Center, download the High Quality WMV file (this is the highest quality version we have available).
- If you'd like a lower bitrate version, to reduce the download time or cost, then choose the Medium Quality WMV file.
- If you have a Zune, WP7, iPhone, iPad, or iPod device, choose the low or medium MP4 file.
- If you just want to hear the audio of the video, choose the MP3 file.
Right click “Save as…”
- High Quality WMV (PC, Xbox, MCE)
- MP3 (Audio only)
- MP4 (iPod, Zune HD)
- Mid Quality WMV (Lo-band, Mobile)
- WMV (WMV Video)
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
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.
Follow the Discussion
My 9 year old son loves it.
--
Furry cows moo and decompress.
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.
Why not just create a newer version of VB6?
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!
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 ..) ??
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.
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!")
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.
C
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.
Like that!!
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)
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
ROFL Despite its simplicity, its a great approach for beginners! But what i miss is a compiler,...
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!
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