<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hitesh Sarda &#187; smallbasic</title>
	<atom:link href="http://hitesh.in/tag/smallbasic/feed/" rel="self" type="application/rss+xml" />
	<link>http://hitesh.in</link>
	<description>Thoughts on life, technology, education and entrepreneurship</description>
	<lastBuildDate>Fri, 30 Dec 2011 06:00:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Playing with Small Basic</title>
		<link>http://hitesh.in/2009/playing-with-small-basic/</link>
		<comments>http://hitesh.in/2009/playing-with-small-basic/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 04:58:01 +0000</pubDate>
		<dc:creator>Hitesh</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[smallbasic]]></category>
		<category><![CDATA[TOTW]]></category>

		<guid isPermaLink="false">http://hitesh.in/?p=104</guid>
		<description><![CDATA[Yesterday I stumbled upon SmallBasic, while looking for something else. It is an interesting little project by Microsoft to create an entry level language to teach programming. It is a mix of toned down BASIC and Logo. Since the language &#8230; <a href="http://hitesh.in/2009/playing-with-small-basic/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yesterday I stumbled upon <a href="http://www.smallbasic.com/" target="_blank">SmallBasic</a>, while looking for something else. It is an interesting little project by Microsoft to create an entry level language to teach programming. It is a mix of toned down <a href="http://en.wikipedia.org/wiki/BASIC" target="_blank">BASIC</a> and <a href="http://en.wikipedia.org/wiki/Logo_%28programming_language%29" target="_blank">Logo</a>. Since the language (or is it an application) is still in infancy, <a href="http://blogs.msdn.com/smallbasic/archive/2009/06/16/the-newest-leanest-and-the-meanest-is-here.aspx" target="_blank">version 0.5 released recently</a>, I will try not to be too harsh on it.</p>
<h4>Sample program with obligatory screenshot</h4>
<h6>Showing Flickr Image</h6>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> url = Flickr<span style="color: #cc6633">.GetPictureOfMoment</span>()</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> <span style="color: #0000ff">img</span> = ImageList<span style="color: #cc6633">.LoadImage</span>(url) </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> GraphicsWindow<span style="color: #cc6633">.Title</span> = url </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span> GraphicsWindow<span style="color: #cc6633">.DrawImage</span>(<span style="color: #0000ff">img</span>,0,0) </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span> GraphicsWindow<span style="color: #cc6633">.Height</span> = ImageList<span style="color: #cc6633">.GetHeightOfImage</span>(<span style="color: #0000ff">img</span>) </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span> GraphicsWindow<span style="color: #cc6633">.Width</span> = ImageList<span style="color: #cc6633">.GetWidthOfImage</span>(<span style="color: #0000ff">img</span>)</pre>
<p><!--CRLF--></div>
</div>
<p><a href="http://hitesh.in/wp-content/uploads/2009/07/image.png"><img title="small basic" border="0" alt="image" src="http://hitesh.in/wp-content/uploads/2009/07/image_thumb.png" width="587" height="484" /></a></p>
<h4>The Good:</h4>
</p>
<p><span id="more-104"></span></p>
<ul>
<li>The interface is toy like and very simple. Will surely win favours with 10 year olds.<a href="http://hitesh.in/wp-content/uploads/2009/07/image1.png"><img title="Small Basic Window" border="0" alt="image" src="http://hitesh.in/wp-content/uploads/2009/07/image_thumb1.png" width="557" height="484" /></a> </li>
<li>The limited with just 15 keywords is good too. </li>
<li>The learner does not need to initialise variables, there is no <code>new</code>. </li>
<li>No variable scopes, everything is global. </li>
<li>Before you think it will bring forth another set of programmers, like the much maligned VB programmers, remember this is for 10 yr olds. </li>
<li>In general, it feels light weight and fast. </li>
</ul>
<h4>The Bad</h4>
<ul>
<li>The application itself depends on .NET 3.5 which still does not have a large installed base. </li>
<li>For sake of simplicity, all libraries are more or less global objects. This approach might not scale when more libraries are added. </li>
<li>The turtle is non-interactive and verbose. How I long for the good old code which went something like: </li>
</ul>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> FD 100 </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> RT 90 </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> REPEAT 4</pre>
<p><!--CRLF--></div>
</div>
<ul>
<li>Same application in SmallBasic: </li>
</ul>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">For</span> i=1 <span style="color: #0000ff">To</span> 4</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> Turtle.Move(100) </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> Turtle.TurnRight() </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span> EndFor</pre>
<p><!--CRLF--></div>
</div>
<ul>
<li>The result: </li>
<li><a href="http://hitesh.in/wp-content/uploads/2009/07/image2.png"><img title="Output of Logo square" border="0" alt="Output of Logo square" src="http://hitesh.in/wp-content/uploads/2009/07/image_thumb2.png" width="139" height="162" /></a>
<p><em>Notice there is no area to type the next command, all commands to turtle have to be specified upfront.</em> </li>
</ul>
<h4>The Ugly</h4>
<ul>
<li>The syntax is very ugly. Why the curly brackets? </li>
</ul>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #008000">'You need the curly brackets for all function calls.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> GraphicsWindow.Show() </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> <span style="color: #008000">'Why not drop the brackets for zero argument functions?</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span> GraphicsWindow.Show </pre>
<p><!--CRLF--></div>
</div>
<ul>
<li>The current syntax forces the learner to understand the different between a property and a function. Completely unimportant for the target audience. </li>
<li>To add to that it is not consistent, you still have a few functions that have a property pattern (GetSomething, SetSomething) </li>
<li>What would look better, VB.NET style or a mix of original BASIC and ruby? </li>
</ul>
<h4>Conclusion</h4>
<p>I really dig for anything related to teaching programming to children. Although my daughter is too young to program, I draw from my experiences of learning programming. I, like countless others, was introduced to BASIC and Logo as the first programming language. But I was not interested in adding 2 numbers or drawing a square. I became interested in programming when I was introduced to dBase III (remember it?). When I found I could save and retrieve data and manipulate it, I was sold.</p>
<p>Similarly, I think, today&#8217;s internet generation might be sold on network based interactivity. SmallBasic takes initial steps in that direction by having a Network object and a Flickr object. This will be a good direction to pursue and add more libraries for APIs from other web apps. <a href="http://hacketyhack.net/" target="_blank">Hackety Hack</a> approach, I guess.</p>
<p>The other thing interesting to this generation is gaming and multimedia. Although <a href="http://scratch.mit.edu/" target="_blank">Scratch</a>, <a href="http://www.alice.org/" target="_blank">Alice</a>, <a href="http://www.phunland.com/wiki/Home" target="_blank">Phun</a> and others like <a href="http://phrogram.com/Default.aspx" target="_blank">Phrogram</a> are filling that need, a few libraries towards that end (animations, effects, sound, video), will not hurt at all.</p>
<p>In conclusion, I think this is a very interesting start, but needs to cover much ground, while remaining true to the promise of simplicity.</p>
]]></content:encoded>
			<wfw:commentRss>http://hitesh.in/2009/playing-with-small-basic/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

