<?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>Observations from Uppsala &#187; lego</title>
	<atom:link href="http://jakob.engbloms.se/archives/tag/lego/feed" rel="self" type="application/rss+xml" />
	<link>http://jakob.engbloms.se</link>
	<description>Computer Technology: Simulation, Virtualization, Virtual Platforms, Embedded, Multicore and Multiprocessing (by Jakob Engblom)</description>
	<lastBuildDate>Sun, 29 Jan 2012 19:45:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<image>
    <title>Observations from Uppsala</title>
    <url>http://jakob.engbloms.se/favicon.png</url>
    <link>http://jakob.engbloms.se</link>
    <width>32</width>
    <height>32</height>
    <description>Observations from Uppsala - http://jakob.engbloms.se</description>
    </image>		<item>
		<title>Off-Topic: Voxel Graphics at Legoland</title>
		<link>http://jakob.engbloms.se/archives/1169?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/1169#comments</comments>
		<pubDate>Wed, 07 Jul 2010 19:47:47 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[off-topic]]></category>
		<category><![CDATA[Airbus]]></category>
		<category><![CDATA[cars]]></category>
		<category><![CDATA[Denmark]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[lego]]></category>
		<category><![CDATA[Legoland]]></category>
		<category><![CDATA[Volvo]]></category>
		<category><![CDATA[voxel]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=1169</guid>
		<description><![CDATA[Legoland is full of cool and interesting Lego models, built from millions and millions of Lego bricks. The creations don&#8217;t have too much in common with the standard Lego kits sold in stores. Rather, they are advanced uses of Lego bricks that look like something from the real world &#8212; especially at a distance. Up [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jakob.engbloms.se/wp-content/uploads/2010/07/icon.jpg"><img class="size-full wp-image-1182 alignleft" style="margin: 10px 5px;" title="icon" src="http://jakob.engbloms.se/wp-content/uploads/2010/07/icon.jpg" alt="" width="83" height="80" /></a>Legoland is full of cool and interesting Lego models, built from millions and millions of Lego bricks. The creations don&#8217;t have too much in common with the standard Lego kits sold in stores. Rather, they are advanced uses of Lego bricks that look like something from the real world &#8212; especially at a distance. Up close, they are very blocky and not as smooth and polished as regular Lego models.</p>
<p>Essentially, they are voxel graphic representations that must be very hard to plan and execute.  The standard single-stud 1&#215;1 Lego brick is their smallest unit, or maybe its 1/3 height flat version. Here are some examples that I photographed in Legoland during my visit this Summer.</p>
<p><span id="more-1169"></span>Airbus A380, close to the entrance:</p>
<p><a href="http://jakob.engbloms.se/wp-content/uploads/2010/07/P11305881.jpg"><img class="aligncenter size-full wp-image-1171" title="P1130588" src="http://jakob.engbloms.se/wp-content/uploads/2010/07/P11305881.jpg" alt="" width="678" height="316" /></a></p>
<p>If we look up close at the nose, we see the stepping of voxels very clearly:</p>
<p><a href="http://jakob.engbloms.se/wp-content/uploads/2010/07/P1130590.jpg"><img class="aligncenter size-full wp-image-1172" title="P1130590" src="http://jakob.engbloms.se/wp-content/uploads/2010/07/P1130590.jpg" alt="" width="509" height="428" /></a></p>
<p>The wing roots show how the wings are constructed:</p>
<p><a href="http://jakob.engbloms.se/wp-content/uploads/2010/07/P11305891.jpg"><img class="aligncenter size-full wp-image-1174" title="P1130589" src="http://jakob.engbloms.se/wp-content/uploads/2010/07/P11305891.jpg" alt="" width="698" height="402" /></a></p>
<p>I also really liked this Volvo XC90 that I found in one of the town displays. It uses a few more types of elements compared to the big Airbus. I am not so sure about the way they do the windows, but maybe the murkiness is just due to its having been outdoors for a few years. It is interesting though that you immediately recognize this as a Volvo, which is a great testament to the Lego designers.</p>
<p><a href="http://jakob.engbloms.se/wp-content/uploads/2010/07/P1130598.jpg"><img class="aligncenter size-full wp-image-1175" title="P1130598" src="http://jakob.engbloms.se/wp-content/uploads/2010/07/P1130598.jpg" alt="" width="430" height="302" /></a></p>
<p>Another car is the Citroen found on the canalside in Amsterdam:</p>
<p><a href="http://jakob.engbloms.se/wp-content/uploads/2010/07/P1130599.jpg"><img class="aligncenter size-full wp-image-1179" title="P1130599" src="http://jakob.engbloms.se/wp-content/uploads/2010/07/P1130599.jpg" alt="" width="700" height="429" /></a></p>
<p>A typical example of the large-scale animals and people present all over Legoland:</p>
<p><a href="http://jakob.engbloms.se/wp-content/uploads/2010/07/P1130470.jpg"><img class="aligncenter size-full wp-image-1180" title="P1130470" src="http://jakob.engbloms.se/wp-content/uploads/2010/07/P1130470.jpg" alt="" width="600" height="512" /></a></p>
<p>Finally, a Danish flag in a very traditional Lego flat style:</p>
<p><a href="http://jakob.engbloms.se/wp-content/uploads/2010/07/P1130534.jpg"><img class="aligncenter size-full wp-image-1176" title="P1130534" src="http://jakob.engbloms.se/wp-content/uploads/2010/07/P1130534.jpg" alt="" width="475" height="341" /></a></p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/1169"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/1169" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/1169" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/1169/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More Kindgarten Robot Videos Online</title>
		<link>http://jakob.engbloms.se/archives/1140?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/1140#comments</comments>
		<pubDate>Sun, 06 Jun 2010 07:57:13 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[embedded systeme]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Kindergarten]]></category>
		<category><![CDATA[lego]]></category>
		<category><![CDATA[MEPROM]]></category>
		<category><![CDATA[Mindstorms]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=1140</guid>
		<description><![CDATA[I have now torn down the Kindergarten Robot, as I wanted to build some other things. However, before tearing it down, I did take a few more movies of its critical functions. The first movie is just the robot driving around using its MEPROM programming unit. I think this movie is slightly clearer than the [...]]]></description>
			<content:encoded><![CDATA[<p>I have now torn down the Kindergarten Robot, as I wanted to build some other things. However, before tearing it down, I did take a few more movies of its critical functions.</p>
<p><span id="more-1140"></span></p>
<p>The first movie is just the robot driving around using its MEPROM programming unit. I think this movie is slightly clearer than the old one I posted.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/0btgDZ7Pf-g&amp;hl=sv_SE&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/0btgDZ7Pf-g&amp;hl=sv_SE&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Next, here is how a program loop can be created in this system. By removing the white end marker from the program, the motor will just keep spinning the program until it spots a program step. This is a very mechanical infinite loop.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/ngL9oxv5cds&amp;hl=sv_SE&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/ngL9oxv5cds&amp;hl=sv_SE&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Finally, we have the emergency stop bumper that was added to the robot to make it stop when it hits something. It does not take effect immediately due to the latencies involved in the NXT programming environment, but at least the robot does not proceed to the next programming step.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/AsLS9CNXc1g&amp;hl=sv_SE&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/AsLS9CNXc1g&amp;hl=sv_SE&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/1140"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/1140" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/1140" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/1140/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kindergarten Robot 3: Programming is Kid&#8217;s Play</title>
		<link>http://jakob.engbloms.se/archives/1103?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/1103#comments</comments>
		<pubDate>Tue, 09 Mar 2010 16:40:25 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[embedded systeme]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[teaching]]></category>
		<category><![CDATA[Kindergarten]]></category>
		<category><![CDATA[lego]]></category>
		<category><![CDATA[MEPROM]]></category>
		<category><![CDATA[Mindstorms]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=1103</guid>
		<description><![CDATA[Today I finally got to try my MEPROM-equipped Lego Mindstorms robot with a larger group of kids. As expected, this did not go quite as expected. It turned out that trying to show a group of ten impatient kids that the robot read instruction codes and moved accordingly failed. Using a chaser program, where the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jakob.engbloms.se/wp-content/uploads/2010/01/lego-mindstorms-nxt2.png"><img class="alignleft size-full wp-image-1057" style="margin: 5px 10px;" title="lego mindstorms nxt2" src="http://jakob.engbloms.se/wp-content/uploads/2010/01/lego-mindstorms-nxt2.png" alt="" width="146" height="126" /></a>Today I finally got to try my <a href="http://jakob.engbloms.se/archives/1086">MEPROM-equipped Lego Mindstorms robot </a>with a larger group of kids. As expected, this did not go quite as expected.</p>
<p><span id="more-1103"></span></p>
<p>It turned out that trying to show a group of ten impatient kids that the robot read instruction codes and moved accordingly failed. Using a chaser program, where the robot drove around waiting for something to show up close in front of it and then drove full speed forward to try to hit it, was much easier to appreciate.  Classics like driving around avoiding to hit walls was also just as much fun as ever. Like my previous attempts, the kids piled up on the robot and tried to make it turn the way they wanted.</p>
<p>Clearly, physical exercise is easier to sell than cerebral exercise.</p>
<p>That said, I did manage to get some more thoughtful kids interested in getting the robot to go particular places. The setup I used was to put the robot on a starting square marked on the floor, and then putting a red bucket out on the floor some distance away. The kids were asked to help me program the robot to either hit the bucket or drive around it. I explained what the robot did as taking steps forward and turning, and actually the approximately 50 cm long runs it did for each blue programming tile was fairly similar to a serious step by a five-year-old (some kids instead started tip-toeing forward, which did not quite provide the correct stride).</p>
<p>As a safety device and to retain a semblance on intelligence on the part of the robot, I equipped it with a bumper in front. As soon as the bumper is hit, the robot is supposed to say “stop” and stop all activities.</p>
<p>The problems we tried were:</p>
<ul>
<li>Put the bucket down in front and try to hit it, needing three forward to get there</li>
<li>Drive around said bucket, which required a program like blue, green, blue, yellow, blue, blue, yellow, blue, green (forward, right, forward, left, forward, forward, left, forward, right).</li>
<li>Leave the base and drive to the back instead of front.</li>
</ul>
<p>I sat down with a group of three kids who really got into this part (even with ten other kids running around playing cops and robbers at a very high level of intensity). They did get the idea and did propose steps towards the solution. However, it is clear that at least initially; one cannot expect them to plan out an entire program in their heads.</p>
<p>Rather, we ended up in a style quite familiar to anyone learning a new programming language or taking their first programming course. Try one step, see where it takes us, add another step or two to the program, and try again. Very much how I myself solve programming and scripting problems where I interact with a complex and possibly unpredictable environment. In this way, we did manage to solve some problems, and I do think the kids understood what was going on.</p>
<p>To me, I feel the idea of the Lego-programmable robot as a preschool-level programming course is at least partially proven. As in most other educational ventures, what is needed is a good overall teaching environment. Next time, I will have to try this with a small group of kids, just after they have had a snack so that they are alert and fresh. I will also make sure to break up the hard work with some simple play, since that is needed to keep the kids from being bored.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/1103"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/1103" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/1103" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/1103/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Graphical Programming in (Mis)use</title>
		<link>http://jakob.engbloms.se/archives/1096?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/1096#comments</comments>
		<pubDate>Tue, 02 Mar 2010 21:12:57 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[Fortran]]></category>
		<category><![CDATA[Graphical programming]]></category>
		<category><![CDATA[LabView]]></category>
		<category><![CDATA[lego]]></category>
		<category><![CDATA[Matlab]]></category>
		<category><![CDATA[Mindstorms]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=1096</guid>
		<description><![CDATA[When I got the Lego Mindstorms robotics kit that I have been blogging about before (1,2,3), one of my goals was to try my hands on some graphical &#8220;model-driven&#8221; programming. Thanks for the various tips for other more traditional programming environments that I have received over comments, Facebook, and personal email. But my main goal [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jakob.engbloms.se/wp-content/uploads/2010/03/j0434881.png"><img class="alignleft size-full wp-image-1099" title="j0434881" src="http://jakob.engbloms.se/wp-content/uploads/2010/03/j0434881.png" alt="" width="90" height="90" /></a>When I got the Lego Mindstorms robotics kit that I have been blogging about before (<a href="http://jakob.engbloms.se/archives/1058">1</a>,<a href="http://jakob.engbloms.se/archives/1079">2</a>,<a href="http://jakob.engbloms.se/archives/1086">3</a>), one of my goals was to try my hands on some graphical &#8220;model-driven&#8221; programming. Thanks for the various tips for other more traditional programming environments that I have received over comments, Facebook, and personal email. But my main goal was really to try to use the NXT environment as a graphical, domain-specific, rapid programming environment. Having played around with some simple projects for a couple of months now, it is clear that somethings are easier to do than others.</p>
<p><span id="more-1096"></span>Back in the late 1980s, in what seems to have been a golden era of software innovation, there were a number of companies trying to sell graphical programming environments for the graphics-oriented Macintosh computer. Makes sense, right? I remember that I did not think so at the time, and the reason was that things tended to look more complex in a visual system than when expressed as plain text. I think one of the examples I saw was <a href="http://en.wikipedia.org/wiki/Prograph">Prograph</a>, where unwieldy flow charts replaced nice and dense if-then statements.</p>
<p>Today, twenty years later, it is hard to dispute the success of model-driven and graphical environments like MatLab, LabView, and others. Dataflow is very good paradigm for many things in signal processing, and it fits very nicely with graphical representations. UML statecharts do express state machines in a pretty readable manner which is far superior to any particular code encoding of the same information.</p>
<p>However, I think the key here is that the languages are domain-specific to a large extent. General-purpose programming is still not really feasible in a graphical way, and I doubt it will ever be. You also need to &#8220;go with the flow&#8221; in these systems to get full benefit from them. If you start to think in imperative coding terms, you tend to quickly get lost&#8230; Here is a personal example that a friend (who will remain anonymous to protect the guilty) and I cooked up in NXT, trying to code an algorithm to guide a robot along a line. The picture both contains the graphical representation and the approximately equivalent imperative-style code.</p>
<p><a href="http://jakob.engbloms.se/wp-content/uploads/2010/03/graphical-computation-in-mindstorms.png"><img class="aligncenter size-medium wp-image-1097" title="graphical computation in mindstorms" src="http://jakob.engbloms.se/wp-content/uploads/2010/03/graphical-computation-in-mindstorms-300x131.png" alt="" width="300" height="131" /></a>All the little red boxes are value reads, writes, and manipulations. It is kind of elegant that you can pass values on from one block to the next, but overall the graphical representation must be said to be totally unreadable. The logic was pretty good, actually, but it did not do things like you are supposed to do in Mindstorms. Rather than a reactive &#8220;act wait act&#8221; cycle, we tried to code complex loops.</p>
<p>I guess this is an example of the old saying that a good (or determined) programmer can <a href="http://queue.acm.org/detail.cfm?id=1039535">write FORTRAN in any programming language</a>. As an aside, I recall a Russian-schooled professor I had as an undergraduate who managed to abuse Prolog to create a deterministic loop from its backtracking system. Ugly indeed, but also quite an impressive feat of semantic wrestling.</p>
<p>The Mindstorm-style solution to following a line was found by a bit of Googling, and for the robot that I built a fairly (not entirely, though) robust program looked like this. Credit to <a href="http://www.nxtprograms.com/line_follower/steps.html">http://www.nxtprograms.com/line_follower/steps.html </a>for the original program that I had to modify just a bit to work with Mindstorms NXT 2.0.</p>
<p><a href="http://jakob.engbloms.se/wp-content/uploads/2010/03/line-follower.png"><img class="aligncenter size-full wp-image-1098" title="line follower" src="http://jakob.engbloms.se/wp-content/uploads/2010/03/line-follower.png" alt="" width="623" height="450" /></a></p>
<p>In a sense, this program is bad since it obviously relies on non-functional properties of the NXT environment which are not semantically specified (i.e., the speed of sensing and how to drive the motors the fastest). However, the sense-act loop with no state saving is the right way.</p>
<p>Obviously, other graphical environments will have other strengths and weaknesses, but I think that this is a nice illustration that the typical constructs of general-purpose programming languages are poor fits for graphical visualization. Variables are simply not very visual in their nature&#8230;</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/1096"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/1096" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/1096" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/1096/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kindergarten Robot 2: Going Programmable</title>
		<link>http://jakob.engbloms.se/archives/1086?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/1086#comments</comments>
		<pubDate>Sun, 21 Feb 2010 20:32:03 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[embedded systeme]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[teaching]]></category>
		<category><![CDATA[Kindergarten]]></category>
		<category><![CDATA[lego]]></category>
		<category><![CDATA[MEPROM]]></category>
		<category><![CDATA[Mindstorms]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=1086</guid>
		<description><![CDATA[As discussed in my previous blog post about Kindergarten robots, I wanted to see if I can teach kids the core idea of programming. This project has now progressed to the point that I have a working prototype of a programmable robot. Essentially, the robot is programmed by putting colored Lego bricks in a sequence [...]]]></description>
			<content:encoded><![CDATA[<h2><img class="alignleft size-full wp-image-1057" style="margin: 5px;" title="lego mindstorms nxt2" src="http://jakob.engbloms.se/wp-content/uploads/2010/01/lego-mindstorms-nxt2.png" alt="lego mindstorms nxt2" width="146" height="126" /></h2>
<p>As discussed in my <a href="http://jakob.engbloms.se/archives/1079">previous blog post </a>about Kindergarten robots, I wanted to see if I can teach kids the core idea of programming. This project has now progressed to the point that I have a working prototype of a programmable robot.</p>
<p>Essentially,  the robot is programmed by putting colored Lego bricks in a sequence on  top of the robot. This should be accessible and direct enough to work  with kids &#8212; and with no computer needed, just direct physical interaction with  the system. For some reason, I think the extra level of abstraction from a screen to a robot is just an unnecessary obstacle at this level.</p>
<p><span id="more-1086"></span><br />
For an example run, see the <a href="http://www.youtube.com/watch?v=U-18jmUnGqU">Youtube video </a>linked below:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/U-18jmUnGqU&amp;hl=sv_SE&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/U-18jmUnGqU&amp;hl=sv_SE&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>The robot is shown in the picture below. Since I use the same base as a fast chaser robot, it uses the large wheels from a <a href="http://www.brickset.com/detail/?Set=8284-1">Technic kit I happened to have around</a>, and a decent swiveling rear wheel. Using treads for the drive would probably have given me a bit more precision, but this is faster and simply feels more fun.</p>
<p><img class="aligncenter size-full wp-image-1089" title="P1110612" src="http://jakob.engbloms.se/wp-content/uploads/2010/02/P1110612.JPG" alt="P1110612" width="550" height="491" /></p>
<p>The inspiration for the programming method came from the boardgame <a href="http://www.boardgamegeek.com/boardgame/18/roborally">Roborally</a>, where you are dealt a set of card with meanings like &#8220;forward&#8221;, &#8220;back&#8221;, &#8220;turn right&#8221;, &#8220;turn around&#8221;, etc., and have to make your robot navigate a hazardous landscape to get to a destination. In my kindergarten robot, I simplified the programming to just forward, left, and right. And there are no conveyor belts, lasers, pits, or other hazards on the field.</p>
<p>The program steps available are the following (the color sensor can only distinguish a few primary colors):</p>
<ul>
<li>Black &#8211; start bit</li>
<li>Blue &#8211; move forward</li>
<li>Green &#8211; turn right</li>
<li>Yellow &#8211; turn left</li>
<li>Red &#8211; honk the horn (beep)</li>
<li>White &#8211; stop bit</li>
</ul>
<p>As a programming language, this is definitely not Turing-complete and nothing that you could program anything useful with. In particular, the programming model lacks decision statements, loops, and variables. However, it conveys what I feel is at the heart of programming: obtaining a goal by putting together a sequence of very small and simple steps. If you cannot grasp the idea of many small steps, you will never be able to program in any meaningful way.</p>
<h2>User Testing</h2>
<p>I have not tested this with a group of kids yet, but only with myself and my five-year-old son. So far, it seems to work. After some initial confusion, he is starting to get the idea of putting steps in order and having the robot execute them.</p>
<p>Here are some very simple missions that can be used to get the programming thinking going:</p>
<ul>
<li>Turn around a corner (of the fridge in this case)</li>
<li>Move to hit a balloon lying on the floor some distance away</li>
<li>Move in a square pattern to get back where it started</li>
</ul>
<p>I am sure I will think of more as I go along. I will blog some more once I have more experience with the robot.</p>
<h2>Details of the Program Memory</h2>
<p>The major problem that had to be solved to build this robot was creating a working program memory. I have decided to call the program memory <strong>MEPROM</strong>, for &#8220;Mechanically Erasable Programmable Read-Only Memory&#8221;. It is a ROM, since the robot itself cannot change it.  Since you can both remove program steps and put in new steps using mechanical means (human hands, typically), it is definitely an M-EPROM.</p>
<p>The idea for the memory is simple: use Lego bricks to represent moves.  It took a while to come up with the current form, as there are many ways  to move colored bricks past a sensor.</p>
<p>Two of the program steps can be seen below: I used 3&#215;1 standard lego bricks (which I borrowed from my son&#8217;s Legos, since  it seems very hard to find good kits containing this particular type of brick):</p>
<p><img class="aligncenter size-medium wp-image-1087" title="P1110625" src="http://jakob.engbloms.se/wp-content/uploads/2010/02/P1110625-300x210.jpg" alt="P1110625" width="300" height="210" /></p>
<p>To move these programming blocks past the color sensor in order to read them, I used some classic Lego treads (which seems to have been in use <a href="http://www.brickset.com/detail/?Set=856-1">since the late 1970s</a>!). Today, these can be best obtained by buying the <a href="http://http://www.brickset.com/detail/?Set=8259-1">Mini Bulldozer kit (8259)</a>. The program steps are put on alternate tread elements:</p>
<p><img class="aligncenter size-full wp-image-1088" title="P1110631" src="http://jakob.engbloms.se/wp-content/uploads/2010/02/P1110631.JPG" alt="P1110631" width="550" height="405" /></p>
<p>The Mindstorms color sensor only sees six colors, as discussed above. Worse, it tends to see black in dark shadows. For this reason, it needs to read the bricks head-on to be reliable. I have tried in vain to make the system self-adjusting, so currently, the program start has to be manually aligning the start bit (black brick) in front of  the sensor. For the rest of the run, turning the driving motor 90 degrees reliably puts the next brick in place in front of the sensor.</p>
<p>The program turns out to be quite simple in the NXT programming environment. Turn program motor 90 degrees, sample the color sensor, and act accordingly using a &#8220;switch statement&#8221;:</p>
<p><a href="http://jakob.engbloms.se/wp-content/uploads/2010/02/Program.jpg"><img class="alignright size-medium wp-image-1090" title="Program" src="http://jakob.engbloms.se/wp-content/uploads/2010/02/Program.jpg" alt="Program" width="550" /></a></p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/1086"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/1086" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/1086" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/1086/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Kindergarten Robot</title>
		<link>http://jakob.engbloms.se/archives/1079?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/1079#comments</comments>
		<pubDate>Tue, 09 Feb 2010 20:16:50 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[appearances]]></category>
		<category><![CDATA[embedded systeme]]></category>
		<category><![CDATA[teaching]]></category>
		<category><![CDATA[lego]]></category>
		<category><![CDATA[Mindstorms]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=1079</guid>
		<description><![CDATA[One of my little projects while on parental leave has been to play around with my Lego Mindstorms NXT 2.0 robotics kit. Apart from being fun for a serious dad like myself, I always had in mind how I could use it with kids to get them interested in technology. When I was a PhD [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-1057" style="margin: 10px 5px;" title="lego mindstorms nxt2" src="http://jakob.engbloms.se/wp-content/uploads/2010/01/lego-mindstorms-nxt2.png" alt="lego mindstorms nxt2" width="146" height="126" />One of my little projects while on parental leave has been to play around with my Lego Mindstorms NXT 2.0 robotics kit. Apart from being fun for a serious dad like myself, I always had in mind how I could use it with kids to get them interested in technology.</p>
<p>When I was a PhD student in Uppsala back around 2000, we bought a pile of the Lego Mindstorms RCX kits, for use in real-time courses. Obviously, the students loved the opportunity to play with Lego (including the few females). What was less obvious and much more interesting was what happened when we brought in a bunch of children from a local kindergarten to visit &#8212; they really took a liking to our little yellow robots running around a classroom. They treated the robots as little animals, wondering what they were doing and why&#8230;</p>
<p>With that in mind, I decided to try to reprise this myself with my own son and his kindergarten friends. <img title="More..." src="../wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="" />Last week, I took my robot kit with me and went to meet the kids.</p>
<p><span id="more-1079"></span>My top-level goal with exercise was really to get the kids interested in technology as a future field of study and venture&#8230; you have to start early to counteract the prevalent tendency of people to want to be famous and work in media or something&#8230; Only time will tell if this had any effect at all (I doubt it).</p>
<p>In addition to the top-level goal, I wanted to communicate some about how things work. Make technology more understandable and less magical, and more accessible. In particular:</p>
<ul>
<li>Autonomy: the robot is not under remote control, it acts autonomously based on its programming.</li>
<li>Sense-compute-actuate: the robot perceives the world and makes decisions that get sent to the motors.</li>
<li>Limited sensors: the robot does not see like we do, it uses far simpler sensing.</li>
<li>Programmability: the same physical setup can do a lot of different things just by switching to a different program.</li>
<li>Concurrency: the robot can do several unrelated things at once.</li>
<li>Stupidity: the robot is really dumb and just reacts very predictably to its environment.</li>
</ul>
<p>I think these points can be brought across using an indirect approach. You cannot tell a four-year-old about programmability. But you can show that if you go to the robot&#8217;s control unit and press some buttons it does something different.</p>
<p>Note that some of the points above are artificial, in that you could build much smarter programs with more complex behaviors and less direct reactions. But that would make things more magical and &#8220;human-like&#8221;, which is not what I wanted to communicate.</p>
<p>Anyway, in the end I used two configurations of a driving base, with a few different programs.</p>
<p>The first configuration is shown below, using a color sensor pointing downwards and an ultrasound sensor pointing forward.It also had a shooter pointing forward (in this picture, the organic styling of the <a href="http://bionicle.wikia.com/wiki/Zamor_Launcher">Lego Bionicle Zamor</a>-derived shooter comes across very nicely, as well as the apparently <a href="http://www.brickset.com/detail/?Set=8719-1">quite special silver- and gold-colored </a>balls I picked up on a sale).</p>
<p><img class="aligncenter size-full wp-image-1080" title="shooterbot" src="http://jakob.engbloms.se/wp-content/uploads/2010/02/shooterbot.jpg" alt="shooterbot" width="500" height="620" /></p>
<p>First, I had this robot follow a black line on the floor. Putting the line down was fun, watching the robot follow the line did not work out as intended. Too hard to explain the algorithm for following the contrast between black and not-black. Adding the behavior to stop when the robot hit a red line was also too subtle.</p>
<p>Next, I tried to put the robot on a table with the program &#8220;stay within black lines&#8221;. Or rather &#8220;reverse and turn if you hit a black line&#8221;. Problem was that the table had a spotted pattern that included small specks of black, and the robot just kept doing avoidance maneuvers&#8230; so that failed. I still want to do a table-dancing robot, but I guess relying on an ultrasound sensor pointing downwards to detect the chasm at the edge will work better.</p>
<p>What was fun though was when I activated the ultrasound sensor and the shooter: the robot would crawl along the line, and if something got in the way, it would fire a ball. That was huge fun! All the kids crowded around to get the robot to shoot and collect the balls. Note for future attempts: dramatic actions are great!</p>
<p>It was even better when I set the robot to rove freely, using the ultrasound sensor to turn when something got in its way. This was an easy-to-understand behavior that the kids appreciated, putting feet and hands in the way of the robot to make it turn. The poor robot was often the center of a pile of kids that were all trying to make it turn.</p>
<p>I also tried a configuration using bumper sensors:</p>
<p><img class="aligncenter size-full wp-image-1081" title="bumberbot" src="http://jakob.engbloms.se/wp-content/uploads/2010/02/bumberbot.jpg" alt="bumberbot" width="500" height="375" />Here, the robot only had one program, to move forward until it hit something, and based on the side that hit, back up and turn to avoid hitting the same obstacle again. This was a very successful configuration. The kids started to play &#8220;don&#8217;t touch the robot&#8221; with it, having it drive between their legs or bending over the robot to make a bridge &#8211; but not touching it and making it turn.</p>
<p>Note that I did not bring any computer with me, all programs were preloaded on the NXT brick. Very handy, actually.</p>
<p>In summary, I had a great time doing this, and I will be back with new configurations and programs. Creating the programs was very quick and easy in the Mindstorms environment, proving the value of domain-specific programming.</p>
<p>The kids have hopefully learned that you can play with and control technology, and that you should not be too respectful. Maybe someone also picked up some of the ideas I presented at the start of this blog post.</p>
<h3>Gender-Theoretical Notes</h3>
<p>I do have to end with a slightly sad note.</p>
<p>It was surprising to me just how differently the boys and the girls reacted and behaved. I had assumed that kids would just be kids at this age (three to five years old), with no gender-related differences. It was very striking that this was not the case in reality. The boys just ran in and started playing, and very quite hard to get to listen to anything I had to say. The girls walked in and quietly waited for instructions, and took some warming-up before they would interact with the robot.</p>
<p>I cannot blame our kindergarten for this, they are definitely trying to avoid gender-based stereotypes.I guess it shows that fighting societal norms is just as hard as everyone says it is.</p>
<p>It was also interesting that the kids were surprised to see a parent build with Lego and have a great time. For some reason, that was not expected behavior from a dad. Sad too.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/1079"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/1079" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/1079" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/1079/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Concurrency in Lego Mindstorms NXT</title>
		<link>http://jakob.engbloms.se/archives/1058?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/1058#comments</comments>
		<pubDate>Fri, 08 Jan 2010 21:19:54 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[parallel computing]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ARM]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[Domain-specific languages]]></category>
		<category><![CDATA[LabView]]></category>
		<category><![CDATA[lego]]></category>
		<category><![CDATA[Mindstorms]]></category>
		<category><![CDATA[NXT]]></category>
		<category><![CDATA[parallelized software]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=1058</guid>
		<description><![CDATA[For my parental leave, I have just bought myself a Lego Mindstorm NXT 2.0 kit. It is not much fun for our youngest, who mostly gets a bit scared by a piece of Lego driving around making noises, but I hope to be able to use it to teach my older child (almost five) to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-1057" style="margin: 5px 10px;" title="lego mindstorms nxt2" src="http://jakob.engbloms.se/wp-content/uploads/2010/01/lego-mindstorms-nxt2.png" alt="lego mindstorms nxt2" width="146" height="126" /></p>
<p>For my parental leave, I have just bought myself a <a href="http://www.mindstorms.com">Lego Mindstorm NXT 2.0 kit</a>. It is not much fun for our youngest, who mostly gets a bit scared by a piece of Lego driving around making noises, but I hope to be able to use it to teach my older child (almost five) to program. Let&#8217;s see how that turns out. It looks hard to make the NXT environment provide the kind of <a href="http://www.boardgamegeek.com/boardgame/18/roborally">Roborally</a>-style programming blocks that I had hoped to create, as I cannot for some reason get a sufficiently custom icon onto custom blocks.</p>
<p>It also presented me with an opportunity to try some domain-specific high-level graphical programming. The programming environment provided for the NXT series of Mindstorms kits is based on LabView from National Instruments, and it really does seem to work. It even features parallel tasks, which I tried to use&#8230;</p>
<p><span id="more-1058"></span>It turned out that it is not that easy to get it right. I was trying to have a few different tasks look at different sensors and steer the robot in different directions based on the sensor readings. However, this quickly turned into a literal deadlock: the robot just sat there, doing nothing, after the first time that my ultrasound sensor task tried to steer it. Failure.</p>
<p>The manual is quite silent on the tasking semantics, and there are no (or I have not yet found) shared variables, locks, or message-passing mechanisms to synchronize the tasks.</p>
<p>Looking for an answer on the web, I came across a nice tutorial on tasking:</p>
<ul>
<li><a href="http://www.ortop.org/NXT_Tutorial/tasks.html">http://www.ortop.org/NXT_Tutorial/tasks.html</a></li>
</ul>
<p>It is a video, and it ends with the note that the only reliable way to multitask in the NXT environment is to NOT try to control the same thing from multiple tasks. If I want to listen to multiple sensors, the only way is to create a loop with switching on inputs. I.e., manual polling. So much for using the natural language of tasks to handle naturally concurrent activities. At some point, I might figure out if I can construct it from tasks and data value transfers, but for now, I will just go with the flow and write (or rather draw) some polling loops.</p>
<p>Here is an example from the manual. Note that the top &#8220;beam&#8221; controls motor A, and the bottom controls motors B and C:</p>
<p><img class="aligncenter size-full wp-image-1059" title="mindstorms manual excerpt" src="http://jakob.engbloms.se/wp-content/uploads/2010/01/mindstorms-manual-excerpt.png" alt="mindstorms manual excerpt" width="691" height="448" /></p>
<p>That last part about data wires is intriguing&#8230; but I will need to find some more reference materials.</p>
<p>Anyway, the way to express parallel tasks here is really quite neat. At least as long as they are dealing with completely separate aspects of the control of the robot.</p>
<p>If this had been a more hard-core environment, it would have been fun to put different tasks on the ARM7 and AVR processors that are inside the NXT 2.0 brick. Yes, it is a true multiprocessor, if very limited in capabilities. At <a href="http://mindstorms.lego.com/en-us/whatisnxt/default.aspx">http://mindstorms.lego.com/en-us/whatisnxt/default.aspx </a>you have the specs. ARM7, 256 kB of FLASH, 64 kB of RAM, and the AVR has 512 bytes of RAM and 4 kB of FLASH. A nice real embedded machine!</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/1058"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/1058" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/1058" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/1058/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Off-Topic: Old and New Lego</title>
		<link>http://jakob.engbloms.se/archives/1048?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/1048#comments</comments>
		<pubDate>Fri, 08 Jan 2010 18:09:08 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[gadgets]]></category>
		<category><![CDATA[general history]]></category>
		<category><![CDATA[history]]></category>
		<category><![CDATA[off-topic]]></category>
		<category><![CDATA[lego]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=1048</guid>
		<description><![CDATA[During the Christmas holidays, I got the chance to compare my oldest child&#8217;s brand new Lego set with some from the mid-1980s. It is quite striking how much larger the things in the sets have become, and how much more affordable (in relative terms) Lego has become since then. In the picture below, we have [...]]]></description>
			<content:encoded><![CDATA[<p>During the Christmas holidays, I got the chance to compare my oldest child&#8217;s brand new Lego set with some from the mid-1980s. It is quite striking how much larger the things in the sets have become, and how much more affordable (in relative terms) Lego has become since then.</p>
<p><span id="more-1048"></span>In the picture below, we have the <a href="http://www.brickset.com/detail/?Set=6073-1">&#8220;Knight&#8217;s Castle&#8221; kit from 1984 (set #6073)</a>. I remember this as being a major kit at the time, one of the dream things to buy, and one of the biggest ones around. Compare it to the new <a href="http://www.brickset.com/detail/?Set=7743-1">Police Command Center (set #7743)</a> from 2008. The small police station accompanying the large trailer is as high as the old castle, and the trailer as long as the castle is wide. It has about 25% more pieces that the old castle.</p>
<p><img class="aligncenter size-full wp-image-1050" title="20091225_Gammalt och nytt lego_01_1" src="http://jakob.engbloms.se/wp-content/uploads/2010/01/20091225_Gammalt-och-nytt-lego_01_1.jpg" alt="20091225_Gammalt och nytt lego_01_1" width="600" height="413" /></p>
<p>Also, note the old small vehicles in the front. Four Lego notches wide, unlike the six-wide police trailer. I remember the <a href="http://www.brickset.com/detail/?Set=6653-1">highway truck </a>as being one of the magical models of my childhood.</p>
<p>To me, the most interesting aspect of comparing Lego sets is that it is a very good illustration of the economic growth that we have seen over the past 30 years. In relative terms, Lego sets have become far more affordable. Average income has certainly increased faster than the price of Lego, and my kids have quite a few more pieces to play with than I did at the same age. The nice thing with comparing Lego buying power with my childhood is that it is a product that is mostly &#8220;the same&#8221;, unlike comparisons involving electronics&#8230;</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/1048"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/1048" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/1048" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/1048/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lego Racers Boardgame &#8212; and why Old is Better in Software (mostly)</title>
		<link>http://jakob.engbloms.se/archives/256?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/256#comments</comments>
		<pubDate>Mon, 08 Sep 2008 07:30:05 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[desktop software]]></category>
		<category><![CDATA[multicore software]]></category>
		<category><![CDATA[parallel computing]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[boardgames]]></category>
		<category><![CDATA[lego]]></category>
		<category><![CDATA[maturity]]></category>
		<category><![CDATA[operating systems]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=256</guid>
		<description><![CDATA[This might appear as a stretched analogy, but it struck as me as obvious when I tried playing the Lego Racers boardgame with my 3-year old this weekend. The game is ranked pretty low on Boardgamegeek, and deservedly so. The promise and premise is great: use Lego cars to race around a track and pick [...]]]></description>
			<content:encoded><![CDATA[<p>This might appear as a stretched analogy, but it struck as me as obvious when I tried playing the <a href="http://www.boardgamegeek.com/game/10043">Lego Racers boardgame </a>with my 3-year old this weekend. The game is ranked pretty low on Boardgamegeek, and deservedly so. The promise and premise is great: use Lego cars to race around a track and pick up new pieces to modify the powers of your car&#8230; sounds like great fun. Right? But it is not, and that&#8217;s where my analogy with the age of software comes in.</p>
<p><span id="more-256"></span></p>
<p>Lego Racers is a very buggy game. It takes almost no playing to get to a situation that is not covered by the rules, which would seem to indicate that play testing was not part of the design process. It seems that the designers made the same mistake as many programmers do: explore the obvious and primary path of execution, without thinking about what could go differently or go wrong. For something as simple as this games, that is simply sloppy. For something as complex as say, an operating system or telephone switch, it is more understandable.</p>
<p>This is where the age of software comes in: the more a particular piece of software has been used, the more different cases will have been explored, and the more errors, mistakes, and simple design holes will have been fixed. Steve Gibson at <a href="http://www.grc.com">grc.com </a>and Leo Laporte&#8217;s <a href="http://www.twit.tv/sn">Security Now </a>podcast often says that a completely new piece of software cannot be said to be secure, since there is no evidence to support that. It might well have been developed, in principle, with lots of security in mind. But until proven in the real world with real adversaries, there is no support for calling it secure.</p>
<p>It is also the case that no amount of internal testing can provide full coverage for all the cases that will appear in actual use at real customer and user sites. It is a matter of volume, but also a matter of sheer inspiration and creativity. Someone with a real problem to solve will use the tools they have in any way they can imagine&#8230; and your own developers cannot be expected have the same imagination as a user population many times their own size. That&#8217;s why beta testing and customer early access and iterative development are so important: only then will all the possible ways of using something be explored. It often turns out that users feel that your software can do something that you never quite thought it would &#8212; and that you sometimes have to insert specific limitations into the documention saying that &#8220;sorry, you cannot do that (for some not initially obvious but deep technical reason)&#8221;.</p>
<p>It also puts an interesting perspective on new creative software. Any new software entering a market will not have support for all possible users and all possible use cases. If there is an established older piece of software in the same domain, the new software will tend to solve fewer problems with fewer odd boundary conditions. The new software will typically be designed to solve some part of the problem better (or cheaper) than existing software (otherwise, its existence is hard to motivate), but initially it will not have the breadth and depth of coverage that a decade-old package will have. Simply from having been subject to users and their creativity and requirements for a long time.</p>
<p>That sounds like an awfully academic argument. One concrete example: the Linux operating system is now catching up to the old heavy-weights like Solaris and Aix in terms of scalability and robustness and features. Solaris still seems to scale better to really large number of cores and processes, but compared to where Linux used to be in the pre-2.6 kernel versions the situation is vastly improved. But doing multiprocessing like that well simply seems to take calendar time. More users does not help. You need the grind of having to transition through a few different generations of hardware of different types, and with different trends being judged important. Similary, the real-time operating systems now becoming SMP-aware will not scale as well as Linux does, at least not when judged from shared-memory flat designs. They do have their areas of merit, but they simply will not accumulate the same kind of shared-memory experience until a few years have passed. On the other hand, for the domains where predictability, control, and performance count, they are far superior to the general-purpose operating systems like Linux and Solaris, since they have been accumulating far more experience there. The same fact is evident in military history: time upon time, history shows how &#8220;seasoned troops&#8221; have a quality that no amount of quantity or training quality of fresh troops can match. Troops and equipment have to prove themselves in real battles with real enemies before their true quality can be assessed and their full potential realized.</p>
<p>To sum up, it seems to me that while cool new software is exciting to write and exciting to use, in heavy-duty real-world use, you want seasoned well-aged software that has been proven and tested in a wide variety of real-world caes over a significant period of time. Nothing beats experience, at least as long as the software system is maintained well so that it evolves in a way that keeps it open to future evolution. It does happen that old software gets worse with age&#8230; but there are many examples that are like fine wines and just tend to get better with time.</p>
<p>As a final aside,  we also own some other Lego-branded children&#8217;s games, and they, while not the most complex games in existence, at least are consistent and work without a problem. So the Lego brand itself needs not be avoided.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/256"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/256" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/256" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/256/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

