<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>DatsBlog</title>
	<atom:link href="http://cmdrdats.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://cmdrdats.wordpress.com</link>
	<description>A little corner to ink down my thoughts</description>
	<lastBuildDate>Mon, 12 Dec 2011 17:13:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='cmdrdats.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>DatsBlog</title>
		<link>http://cmdrdats.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://cmdrdats.wordpress.com/osd.xml" title="DatsBlog" />
	<atom:link rel='hub' href='http://cmdrdats.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Clojure on Bukkit minecraft server</title>
		<link>http://cmdrdats.wordpress.com/2011/12/12/clojure-on-bukkit-minecraft-server/</link>
		<comments>http://cmdrdats.wordpress.com/2011/12/12/clojure-on-bukkit-minecraft-server/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 17:13:35 +0000</pubDate>
		<dc:creator>cmdrdats</dc:creator>
				<category><![CDATA[Everything Else]]></category>

		<guid isPermaLink="false">http://cmdrdats.wordpress.com/?p=170</guid>
		<description><![CDATA[&#160; This morning, I finally managed to get the basic skeleton of the bukkit clojure plugin &#8220;host&#8221; working correctly. Clojure doesn&#8217;t like having to straddle across classloaders in order to find the resources it needs! I can&#8217;t say I blame it It&#8217;s a fantastic feeling being able to code plugin stuff on the fly &#8211; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cmdrdats.wordpress.com&amp;blog=12310164&amp;post=170&amp;subd=cmdrdats&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>This morning, I finally managed to get the basic skeleton of the bukkit clojure plugin &#8220;host&#8221; working correctly. Clojure doesn&#8217;t like having to straddle across classloaders in order to find the resources it needs! I can&#8217;t say I blame it <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>It&#8217;s a fantastic feeling being able to code plugin stuff on the fly &#8211; and as a glimpse into that world, I&#8217;ve created a small timelapse video demo&#8217;ing some basic possibilities.&nbsp;Apply some imagination though, I&#8217;m sure you&#8217;ll come up with some awesome stuff..</p>
<p>Most importantly for me is the exploratory nature of Clojure &#8211; It fits very well into the nature of Minecraft. It&#8217;s thrilling to be able to discover and tweak code for your plugin on the fly.. But see for yourself: Make it full screen btw.</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='480' height='360' src='http://www.youtube.com/embed/MNcfG_gQ8eQ?version=3&amp;rel=0&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;hd=1&amp;wmode=transparent' frameborder='0'></iframe></span>
<p>And yes. I get killed by a spider.</p>
<p>Check out the code that makes this little thing tick:</p>
<p>The Clojure plugin source is at : <a href="https://github.com/CmdrDats/clj-minecraft">https://github.com/CmdrDats/clj-minecraft</a></p>
<p>The code (memorystone v2) used in this video: <a href="https://github.com/CmdrDats/clj-memorystone">https://github.com/CmdrDats/clj-memorystone</a></p>
<p>I&#8217;m planning to build a leiningen template so that starting a new clojure bukkit plugin is as simple as lein new bukkit-plugin [plugin-name]. I&#8217;m also re-implementing my MemoryStone plugin just so that I have a base to work from in order to really flesh out the shared clojure library.</p>
<p>One idea I&#8217;m toying with is making a more intuitive way of registering listeners to Bukkit. I&#8217;m not sure if I&#8217;ll actually end up with anything other than a convenience wrapper function for .registerEvent, but it&#8217;s worth messing with.</p>
<p>As you can see in the clj-minecraft project, I&#8217;m wanting to provide a fairly solid set of basic plugin building blocks so that you have simple access to the fundemental building blocks of plugins. My goal is also to implement and wrap some common plugins, such as SpoutCraft and the various Economy managers.</p>
<p>I would like the 3rd party libraries to be supported in a way that automatically &#8220;switches off&#8221; when the plugins aren&#8217;t present, so that plugin developers don&#8217;t have to worry about it besides actually making sure they have alternative methods of using their plugins.. But we&#8217;ll see as I thresh this out.</p>
<p>Feedback will be hugely appreciated and I always welcome a helping hand! So please, contact me, fork my repo&#8217;s and make pull requests!</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cmdrdats.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cmdrdats.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cmdrdats.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cmdrdats.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cmdrdats.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cmdrdats.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cmdrdats.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cmdrdats.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cmdrdats.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cmdrdats.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cmdrdats.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cmdrdats.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cmdrdats.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cmdrdats.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cmdrdats.wordpress.com&amp;blog=12310164&amp;post=170&amp;subd=cmdrdats&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cmdrdats.wordpress.com/2011/12/12/clojure-on-bukkit-minecraft-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/09067d0122aab496e5f3a8628c522a24?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cmdrdats</media:title>
		</media:content>
	</item>
		<item>
		<title>Clojure TopCoder Timelapse, Rainy Road, SRM 525, Div II, Level 1</title>
		<link>http://cmdrdats.wordpress.com/2011/12/01/clojure-topcoder-timelapse-rainy-road-srm-525-div-ii-level-1/</link>
		<comments>http://cmdrdats.wordpress.com/2011/12/01/clojure-topcoder-timelapse-rainy-road-srm-525-div-ii-level-1/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 19:58:58 +0000</pubDate>
		<dc:creator>cmdrdats</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://cmdrdats.wordpress.com/?p=163</guid>
		<description><![CDATA[I figured out how to make a timelapse video. Yay! Then I decided to tackle another topcoder challenge. RainyRoad - At the beginning of the video, you&#8217;ll notice that I have my browser open &#8211; I hadn&#8217;t read the problem statement yet, which is dangerous since it could be a really tough problem! Turns out, it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cmdrdats.wordpress.com&amp;blog=12310164&amp;post=163&amp;subd=cmdrdats&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I figured out how to make a timelapse video. Yay! Then I decided to tackle another topcoder challenge. <a href="http://community.topcoder.com/stat?c=problem_statement&amp;pm=11635">RainyRoad</a> -</p>
<p>At the beginning of the video, you&#8217;ll notice that I have my browser open &#8211; I hadn&#8217;t read the problem statement yet, which is dangerous since it could be a <strong>really</strong> tough problem!</p>
<p>Turns out, it was a dead simple problem. At first it looked like I needed to do some pathfinding (was about to brush up on a*).. but then it was just a matter of checking if both sides of the road is occupied with a &#8220;W&#8221; or not.. Fairly simple.</p>
<p>So I recorded myself building two solutions and have checked in another (better, imho) solution into the mix. The video is recorded at 5 fps, and each frame is 5 seconds apart, so each second is 25 real seconds..</p>
<p>Take note that I had not prepared at all for the problem. I hadn&#8217;t created a project yet or setup anything on my emacs. In the first second or two you&#8217;ll see me &#8216;lein new&#8217; and cd to the new project folder. And then a little later start the swank server for emacs to connect to (about 15s in).</p>
<p>My first approach was to map pairs of path together so that I could just test each pair individually &#8211; the second approach, i didn&#8217;t bother with that, just doing a for over and index range, concating the letters together and checking for &#8220;WW&#8221;, then filtering the result for the word &#8220;NO&#8221; and check the count</p>
<p>The third approach, <a href="https://github.com/CmdrDats/topcoder-clojure/blob/master/rainy-road/src/rainy_road/core.clj">which you can view here</a> as the function (another-reachable) was a lot more interesting &#8211; It interleaved the characters, then used a loop / recur to take pairs off the resulting array, concat the characters and check for &#8220;WW&#8221; &#8211; returning immediately with &#8220;NO&#8221; if not possible to cross.</p>
<p>You&#8217;ll notice that I&#8217;m running functions in a *slime-repl clojure* buffer &#8211; that&#8217;s connected to my running project (lein swank), so I could fire off a thread and have it continue without me being connected.. that&#8217;s pretty cool <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Otherwise &#8211; enjoy the video &#8211; As always, feedback is really appreciated <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='480' height='360' src='http://www.youtube.com/embed/IdQqfcExiTU?version=3&amp;rel=0&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;hd=1&amp;wmode=transparent' frameborder='0'></iframe></span>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cmdrdats.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cmdrdats.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cmdrdats.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cmdrdats.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cmdrdats.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cmdrdats.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cmdrdats.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cmdrdats.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cmdrdats.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cmdrdats.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cmdrdats.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cmdrdats.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cmdrdats.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cmdrdats.wordpress.com/163/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cmdrdats.wordpress.com&amp;blog=12310164&amp;post=163&amp;subd=cmdrdats&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cmdrdats.wordpress.com/2011/12/01/clojure-topcoder-timelapse-rainy-road-srm-525-div-ii-level-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/09067d0122aab496e5f3a8628c522a24?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cmdrdats</media:title>
		</media:content>
	</item>
		<item>
		<title>Clojure + TopCoder SRM</title>
		<link>http://cmdrdats.wordpress.com/2011/11/30/clojure-topcoder-srm/</link>
		<comments>http://cmdrdats.wordpress.com/2011/11/30/clojure-topcoder-srm/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 20:00:00 +0000</pubDate>
		<dc:creator>cmdrdats</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://cmdrdats.wordpress.com/?p=148</guid>
		<description><![CDATA[I&#8217;ve recently started delving into the interesting world of Functional Programming. This was sparked by an amazing video by Rich Hickey called &#8220;Simple Made Easy&#8221; &#8211; I highly advise every programmer to listen closely, this man has his head screwed on right and has given a lot of thought to his subject matter. Even if [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cmdrdats.wordpress.com&amp;blog=12310164&amp;post=148&amp;subd=cmdrdats&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img style="float:left;" src="http://cmdrdats.files.wordpress.com/2011/11/1322681497411.png?w=720" alt="" />I&#8217;ve recently started delving into the interesting world of Functional Programming. This was sparked by an amazing video by Rich Hickey called &#8220;<a title="Simple Made Easy" href="http://www.infoq.com/presentations/Simple-Made-Easy">Simple Made Easy</a>&#8221; &#8211; I highly advise every programmer to listen closely, this man has his head screwed on right and has given a lot of thought to his subject matter. Even if you&#8217;re not interested in Clojure, as a developer, I believe every one of his talks are highly valuable and worthwhile pondering.</p>
<p>In line with adopting Clojure, I&#8217;ve mostly switched to Emacs. I still use PhpStorm for PHP development and Eclipse for Java development &#8211; I would prefer to move away from them, but emacs has a rather significant &#8220;bootstrap&#8221; time, so I don&#8217;t think I&#8217;d really make much of a return on investment there.</p>
<p>Rather, I&#8217;m leveraging the excellent emacs clojure-mode with paredit, slime, lein and swank which really makes clojure development shine. I still can&#8217;t get over how amazing on the fly development is with emacs + clojure. I have to remind myself that I&#8217;m actually working on a program every now and then and not just having fun.</p>
<p>On that vein, my biggest challenge now is wrapping my head around Functional Programming thinking. And I don&#8217;t mean just how to do recursions, but to really get to grips with how to leverage the powerful constructs of Clojure &#8211; lazy evaluation, lazy sequences, macro&#8217;s, immutability, lambda functions, agents, refs, atoms and so on. There&#8217;s a lot of good stuff locked away just behind the doors of FP if I just care to take the time to pick the lock <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>To that end, I&#8217;ve decided to start doing past <a title="Topcoder" href="http://community.topcoder.com/tc?module=MatchList">TopCoder</a> SRM challenges in Clojure, as thinking practice. I could be doing something, you know, actually useful. But I&#8217;m looking for something that&#8217;s highly mentally stimulating but small and of a throw-away nature.</p>
<p>I&#8217;ve decided to host my solutions at <a href="https://github.com/CmdrDats/topcoder-clojure">GitHub</a> so that others can see my code, maybe comment and perhaps even learn from the code.. Or at least it&#8217;s just there <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p><span id="more-148"></span></p>
<p>My first challenge, <a href="http://community.topcoder.com/stat?c=problem_statement&amp;pm=11665">DropCoins</a> isn&#8217;t much to write home about, except that if you look at the <a href="https://github.com/CmdrDats/topcoder-clojure/blob/master/DropCoins/src/DropCoins/core.clj">code here</a>, there are a few things I&#8217;d like to point out that I especially enjoyed.</p>
<p>Notice the (board-empty?), (count-coins), (move-board-left), (move-board-right), (move-board-up), (move-board-down) functions. Notice how incredibly succint those functions are written? I&#8217;m loving the power of seq&#8217;s &#8211; the (count-coins) is my favourite:</p>
<blockquote><p><img src="http://cmdrdats.files.wordpress.com/2011/11/1322682540937.png?w=720" alt="" /></p></blockquote>
<p>In that, I take the board array of strings, concat them together, filter it so that it&#8217;s a seq of only &#8220;o&#8221; characters and then count the elements in that filtered array. Awesome.</p>
<p>I had taken a shortcut with the (move-board-up) and (move-board-down) fn&#8217;s which had me revamping my entire solution from a recursive function to a queueing system. I prefer the queueing anyhow. The astute observer will notice that I have a queue ref (which is just really a boxed pointer &#8211; the box never changes, but the contents might) that I slap lazy calls to (get-minimum-spin) onto. These calls add more onto the queue, but when a sufficient answer has been found, the rest of the queue doesn&#8217;t get evaluated.</p>
<p>I believe there&#8217;s a better way than using (delay) though. I&#8217;m convinced I could have used a far simpler method for this, but the actual implementation eludes me.</p>
<p>I do like the way I setup the queue with a single lazy call and then just start looping through it for the answer. Obviously, if this queue ends, it&#8217;ll just return -1..</p>
<p>It feels like I didn&#8217;t use the (recur) quite as effectively as I could have for the loop.. suggestions? Seems a little contrived to have exactly the same code again there :/</p>
<blockquote><p><img src="http://cmdrdats.files.wordpress.com/2011/11/1322683119083.png?w=720" alt="" /></p></blockquote>
<p>Here&#8217;s an example of me running a couple of the tests in the REPL on the loaded and &#8216;running&#8217; code:</p>
<blockquote><p><img src="http://cmdrdats.files.wordpress.com/2011/11/1322682919154.png?w=720" alt="" /></p></blockquote>
<p>Fun and games. Of course.. this all took me a lot longer to develop than the TopCoder SRM match would have allowed &#8211; but I&#8217;m still a Clojure newbie, so &#8211; oh well. I&#8217;ll get faster.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cmdrdats.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cmdrdats.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cmdrdats.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cmdrdats.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cmdrdats.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cmdrdats.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cmdrdats.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cmdrdats.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cmdrdats.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cmdrdats.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cmdrdats.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cmdrdats.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cmdrdats.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cmdrdats.wordpress.com/148/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cmdrdats.wordpress.com&amp;blog=12310164&amp;post=148&amp;subd=cmdrdats&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cmdrdats.wordpress.com/2011/11/30/clojure-topcoder-srm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/09067d0122aab496e5f3a8628c522a24?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cmdrdats</media:title>
		</media:content>

		<media:content url="http://cmdrdats.files.wordpress.com/2011/11/1322681497411.png" medium="image" />

		<media:content url="http://cmdrdats.files.wordpress.com/2011/11/1322682540937.png" medium="image" />

		<media:content url="http://cmdrdats.files.wordpress.com/2011/11/1322683119083.png" medium="image" />

		<media:content url="http://cmdrdats.files.wordpress.com/2011/11/1322682919154.png" medium="image" />
	</item>
		<item>
		<title>Hosting Change</title>
		<link>http://cmdrdats.wordpress.com/2010/03/04/hosting-change/</link>
		<comments>http://cmdrdats.wordpress.com/2010/03/04/hosting-change/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 05:56:21 +0000</pubDate>
		<dc:creator>cmdrdats</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://cmdrdats.wordpress.com/?p=113</guid>
		<description><![CDATA[I&#8217;ve finally managed (after almost 2 years) to make some time and get my dats.co.za domain updated. I was using HostRocket, but the 2 year renewal is coming up soon and I felt I didn&#8217;t use the facilities enough to warrant the price tag any longer. In order to keep the functionality of my dats.co.za [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cmdrdats.wordpress.com&amp;blog=12310164&amp;post=113&amp;subd=cmdrdats&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally managed (after almost 2 years) to make some time and get my dats.co.za domain updated. I was using HostRocket, but the 2 year renewal is coming up soon and I felt I didn&#8217;t use the facilities enough to warrant the price tag any longer.</p>
<p>In order to keep the functionality of my dats.co.za domain though, I needed these things :</p>
<ul>
<li>DNS Server</li>
<li>A new blog server</li>
<li>An app server of some sort (so I can host code)</li>
<li>Basic site</li>
</ul>
<p>The DNS server is by far the toughest of the lot, lucky I own the dats.co.za domain directly with the co.za registrar, so I could make changes there without much hassle. I looked at, and almost switched to, <a href="http://freedns.afraid.org/">http://freedns.afraid.org/</a>, but then I found out that they share the domain amongst all their users. Which is quite terrible.</p>
<p>I eventually settled on <a href="http://www.zoneedit.com">http://www.zoneedit.com</a>, which is free up to a certain amount of traffic. I&#8217;m happy with that since I don&#8217;t think my dats.co.za traffic is that great. ZoneEdit is quite minimalistic, but it works extremely well, so I&#8217;m very chuffed.</p>
<p>Another thing about ZoneEdit that I mustn&#8217;t forget to mention is that they support WebForwards and EmailForwards directly &#8211; which is great. I don&#8217;t know if all dns servers provide this, but it works like a charm!</p>
<p>Next up, a blog server. A major issue with running and hosting my own blog online is that hackers have an absolute field day &#8211; you need to keep on top of things and keep your software up to date so that they don&#8217;t exploit all sorts of arbitrary vulnerabilites. I found two or three folders on my dats.co.za site that were using my site as part of a botnet. fantastic. Not to mention the times I&#8217;ve had to entirely restore my site from backup because some script kiddie thought they were clever.</p>
<p>Anyway, to my point &#8211; I&#8217;m enjoying using an externally provided blogging solution, since the admin I have to do on my side is minimal.</p>
<p>It was a tough choice between <a href="http://www.wordpress.com">wordpress</a> and <a href="http://www.blogger.com">blogger</a> &#8211; WordPress has more advanced features, and I&#8217;m familiar with it &#8211; where blogger is simpler and is a Google product, so integrates more easily and tightly with other Google products. In the end, I customized wordpress and blogger to what I thought was the nicest way, and WordPress just won me over. So here I am <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  (To be honest,  I think it was the fact that I could nicely display my buzzes on the side &#8211; blogger didn&#8217;t do as good a job on that &#8211; ironic, no?)</p>
<p>App server was a simple choice &#8211; <a href="http://appengine.google.com">Google App Engine</a> &#8211; It supports Java now, so I&#8217;m going to be having a field day!</p>
<p>Basic site &#8211; I settled on using <a href="http://sites.google.com">Google Sites</a> since it already integrates well with the Google App Engine and I could see that it handles nicely when you point your DNS server to it. I enjoyed setting up the site, and while there&#8217;s more that could be done there, it serves it&#8217;s purpose well. Minimal effort for a well functioning site, what more could I ask for.</p>
<p>On the flip side I don&#8217;t have my Eashi wiki any longer, which is a little sad, but it was hardly being used so I think I can get away with running that locally, should I ever want to. I also don&#8217;t have the 5gb space any longer, but I don&#8217;t think that will ever be a problem, with the kind of free space floating around the internet.</p>
<p>Bottom line, my single point server from HostRocket has been fragmented across an array of free online services. That fragmenting is great because I get to drop and switch if I need to, without paying a cent.</p>
<p>Now, I just need to figure out how to do some kind of automated backup on all of this <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  oh well, if all my stuff gets wiped from the face of the earth I doubt anyone will even really notice.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cmdrdats.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cmdrdats.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cmdrdats.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cmdrdats.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cmdrdats.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cmdrdats.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cmdrdats.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cmdrdats.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cmdrdats.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cmdrdats.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cmdrdats.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cmdrdats.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cmdrdats.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cmdrdats.wordpress.com/113/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cmdrdats.wordpress.com&amp;blog=12310164&amp;post=113&amp;subd=cmdrdats&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cmdrdats.wordpress.com/2010/03/04/hosting-change/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/09067d0122aab496e5f3a8628c522a24?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cmdrdats</media:title>
		</media:content>
	</item>
		<item>
		<title>Legoduino!</title>
		<link>http://cmdrdats.wordpress.com/2010/03/02/legoduino/</link>
		<comments>http://cmdrdats.wordpress.com/2010/03/02/legoduino/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 19:51:13 +0000</pubDate>
		<dc:creator>cmdrdats</dc:creator>
				<category><![CDATA[Electronics]]></category>

		<guid isPermaLink="false">http://cmdrdats.wordpress.com/2010/03/02/legoduino/</guid>
		<description><![CDATA[Tonight I got a bee in my bonnet again.. was curious to see how the arduino would fit on a lego plate (well, technically not quite reaal lego, but let&#8217;s pretend for a while), and how I&#8217;d go about breaking that out into usable lego chunks.. Again, rather than bore you to tears with the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cmdrdats.wordpress.com&amp;blog=12310164&amp;post=100&amp;subd=cmdrdats&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Tonight I got a bee in my bonnet again.. was curious to see how the arduino would fit on a lego plate (well, technically not quite <em>reaal</em> lego, but let&#8217;s pretend for a while), and how I&#8217;d go about breaking that out into usable lego chunks..</p>
<p>Again, rather than bore you to tears with the explicit details, I&#8217;ll let the pictures do (most of) the talking :</p>
<p><img src="http://cmdrdats.files.wordpress.com/2010/03/dsc03895.jpg?w=720" alt="" /></p>
<p>Arduino Duemilanove, mounted on a lego plate.</p>
<p>As you can see, there&#8217;s an extra mounting hole &#8211; I had started off mounting it to the bottom of the plate, but I think that was just a disaster &#8211; there&#8217;s not enough space on the plate to break out properly with my paperclip method and trying to hold the whole thing up with just the top studs (against gravity) is precarious at best.. So I decided to put it on top.</p>
<p>Here&#8217;s the bottom view, to show the mountings :</p>
<p><img style="max-width:800px;" src="http://cmdrdats.files.wordpress.com/2010/03/dsc03896.jpg?w=720" alt="" /></p>
<p>I then decided I&#8217;ll use some header pins and break that out into sections &#8211; Luckily I have a bunch of old serial ports with their connector cables that I could salvage <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  (thanks to the guys at work donating me a bunch of old pc parts and stuff) :</p>
<p><img style="max-width:800px;" src="http://cmdrdats.files.wordpress.com/2010/03/dsc03897.jpg?w=720" alt="" /></p>
<p>If you&#8217;re sharp, you might notice the twisted red wire and the odd red wire in the next .. and if you&#8217;re an electronic engineer, you&#8217;ll probably also instantly guess that I&#8217;ve chosen the red wires on each set of connectors to go to ground.</p>
<p>Very handily (is that even a word?), there are 3 ground pins on the arduino, so perfect, since I&#8217;ve got 3 connectors out <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Here&#8217;s the finished product :</p>
<p><img style="max-width:800px;" src="http://cmdrdats.files.wordpress.com/2010/03/dsc03898.jpg?w=720" alt="" /></p>
<p>Now I just have to figure out how to connect those ends up to lego and break it in from there&#8230;. Any ideas?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cmdrdats.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cmdrdats.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cmdrdats.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cmdrdats.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cmdrdats.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cmdrdats.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cmdrdats.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cmdrdats.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cmdrdats.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cmdrdats.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cmdrdats.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cmdrdats.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cmdrdats.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cmdrdats.wordpress.com/100/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cmdrdats.wordpress.com&amp;blog=12310164&amp;post=100&amp;subd=cmdrdats&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cmdrdats.wordpress.com/2010/03/02/legoduino/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/09067d0122aab496e5f3a8628c522a24?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cmdrdats</media:title>
		</media:content>

		<media:content url="http://cmdrdats.files.wordpress.com/2010/03/dsc03895.jpg" medium="image" />

		<media:content url="http://cmdrdats.files.wordpress.com/2010/03/dsc03896.jpg" medium="image" />

		<media:content url="http://cmdrdats.files.wordpress.com/2010/03/dsc03897.jpg" medium="image" />

		<media:content url="http://cmdrdats.files.wordpress.com/2010/03/dsc03898.jpg" medium="image" />
	</item>
		<item>
		<title>Legotronics</title>
		<link>http://cmdrdats.wordpress.com/2010/03/01/legotronics/</link>
		<comments>http://cmdrdats.wordpress.com/2010/03/01/legotronics/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 18:06:48 +0000</pubDate>
		<dc:creator>cmdrdats</dc:creator>
				<category><![CDATA[Electronics]]></category>

		<guid isPermaLink="false">http://cmdrdats.wordpress.com/2010/03/01/legotronics/</guid>
		<description><![CDATA[Something that’s been intriguing me for a couple of days now is the possibility of integrating classic electronics directly into Lego. A quick prototype kind of thing where you can just clip things in and out and have them work. Now, I could fork out a sizeable amount of cash and get a Mindstorms NXT [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cmdrdats.wordpress.com&amp;blog=12310164&amp;post=14&amp;subd=cmdrdats&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Something that’s been intriguing me for a couple of days now is the possibility of integrating classic electronics directly into Lego. A quick prototype kind of thing where you can just clip things in and out and have them work.</p>
<p>Now, I could fork out a sizeable amount of cash and get a Mindstorms NXT 2.0, or, I could use the Lego I already have, my dremel and some paperclips lying around to make things happen..</p>
<p>I’ve got an Arduino, so I would like to break that out directly into Lego. My first obvious question is how to modify a brick with simple materials easily on hand (and a high-speed, teensy tiny drill press) and get them to be quickly stackable to build a circuit out of them.</p>
<p>I’ve seen a solution out there, using small nails and then clipping wires onto them, I’m not sure I like that approach though &#8211; way too many fickle wires to worry about..</p>
<p>A couple of minutes at the workbench, fiddling, and here’s what I came up with &#8211; Holes on top and on the sides, bend paperclip, and voila. It’s kinda springy too! I’ll let the pictures do the talking:</p>
<p>Top view:<br /><img src="http://cmdrdats.files.wordpress.com/2010/03/dsc03891.jpg?w=720" width="50%" /></p>
<p>Bottom View:<br /><img src="http://cmdrdats.files.wordpress.com/2010/03/dsc03892.jpg?w=720" width="50%/" /></p>
<p>Two clipped together, has a sturdy electrical connection:<br /><img src="http://cmdrdats.files.wordpress.com/2010/03/dsc03894.jpg?w=720" width="50%/" /></p>
<p>So will see where this ends up!</p>
<p>PS. Yes, I’m mauling my spare MegaBlocks which I consider aliens to my collection first <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  No sense in experimenting with the real thing just yet!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cmdrdats.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cmdrdats.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cmdrdats.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cmdrdats.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cmdrdats.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cmdrdats.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cmdrdats.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cmdrdats.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cmdrdats.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cmdrdats.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cmdrdats.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cmdrdats.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cmdrdats.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cmdrdats.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cmdrdats.wordpress.com&amp;blog=12310164&amp;post=14&amp;subd=cmdrdats&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cmdrdats.wordpress.com/2010/03/01/legotronics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/09067d0122aab496e5f3a8628c522a24?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cmdrdats</media:title>
		</media:content>

		<media:content url="http://cmdrdats.files.wordpress.com/2010/03/dsc03891.jpg" medium="image" />

		<media:content url="http://cmdrdats.files.wordpress.com/2010/03/dsc03892.jpg" medium="image" />

		<media:content url="http://cmdrdats.files.wordpress.com/2010/03/dsc03894.jpg" medium="image" />
	</item>
		<item>
		<title>Microprocessors.. Part 1</title>
		<link>http://cmdrdats.wordpress.com/2009/04/23/microprocessors-part-1/</link>
		<comments>http://cmdrdats.wordpress.com/2009/04/23/microprocessors-part-1/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 20:19:45 +0000</pubDate>
		<dc:creator>cmdrdats</dc:creator>
				<category><![CDATA[Electronics]]></category>

		<guid isPermaLink="false">http://www.dats.co.za/blog/?p=75</guid>
		<description><![CDATA[Frans (my youngest brother) has me suddenly hooked on microprocessors, and now I have a whole design in my head.. Thus a project is born.. Not sure what to call it yet, but the name that seems to stick in my head is &#8216;Raven&#8217;, so we&#8217;ll see how it pans out? From the top &#8211; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cmdrdats.wordpress.com&amp;blog=12310164&amp;post=88&amp;subd=cmdrdats&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Frans (my youngest brother) has me suddenly hooked on microprocessors, and now I have a whole design in my head.. Thus a project is born.. Not sure what to call it yet, but the name that seems to stick in my head is &#8216;Raven&#8217;, so we&#8217;ll see how it pans out?</p>
<p>From the top &#8211; My dad gave me a &#8216;Fundamental Electronics&#8217; handbook so I can get to grips with the basics and not lose my head in a random electrical explosion, and Frans gave me an Atmel <a href="http://www.atmel.com/dyn/Products/tools_card.asp?tool_id=2735">AVR STK500</a> board with an <a href="http://www.avrfreaks.net/index.php?module=Freaks%20Devices&amp;func=displayDev&amp;objectid=76">Atmega48</a> processor to mess with.</p>
<p>My end goal of my project is this : Build a modular rapid prototyping system, where I can slap in components like wifi, flashdisks, gps&#8217;es, motors, etc together via a unified interface (USB seems a logical choice) and quickly code something (in java, of course) to make it all work together.</p>
<p>As far as rapid prototyping languages go, assembler is definitely out of the question with C not far behind.. My choice of language is obviously Java, so I have my eyes fixed on a <a href="http://www.sunspotworld.com">Sun SPOT</a> &#8211; The $750 price tag isn&#8217;t going to happen plus getting it here is going to prove painful, so another solution is required.</p>
<p>After a bit of research, I found the <a href="http://research.sun.com/projects/squawk/squawk-rjvm.html">Squawk VM</a>, which (hey, surprise) is used on the Sun SPOT &#8211; perfect for the job. Now I need to find a chip that can support it &#8211; the <a href="http://www.arm.com/products/CPUs/ARM920T.html">ARM920T</a> is what the SPOT uses, so something based on that design should work with the least amount of hassles.</p>
<p>Googling somewhat finally turned up the <a href="http://www.keil.com/dd/chip/4088.htm">Atmel AT91RM9200</a>, based on the ARM920T it looks perfect for the job &#8211; now I just have to source it from an electronics company closeby and maybe find a development board for it, else I&#8217;ll have to figure out how to get it programmed manually. fun.</p>
<hr />
<p>Back to reality, I&#8217;ve had to clean up my garage somewhat and I still need to order a semi-decent soldering iron and multimeter (probably from somewhere like <a href="http://rabtron.co.za">rabtron.co.za</a>), put up some shelving and source some organizers and bunches of components.</p>
<p>I&#8217;ve downloaded the <a href="http://www.atmel.com/dyn/resources/prod_documents/doc2545.pdf">datasheets</a> and software (<a href="http://www.atmel.com/dyn/Products/tools_card.asp?tool_id=2725">AVR Studio 4</a> and <a href="http://winavr.sourceforge.net">WinAVR</a>) for my AVR STK500 and coded a little bit-runner.. the 8 LED&#8217;s simply flash down (in binary) to the number of the button you pressed.. quite simple, except for the weird peculiarity that the high 2-bits are on PORTC and the low 6-bits are on PORTB&#8230; I&#8217;m thinking there&#8217;s some kind of mis-wiring, if you ask me.. but anyhow, here&#8217;s my source code :</p>
<p><pre class="brush: plain;">
#include 

int main() {
	DDRB = 0xFF; // Output LED's
	DDRC = 0xFF; // Output LED's
	DDRD = 0x00; // Input buttons

	PORTB = 0xFF; // Set the default lights (0 = on and 1 = off)

	int pressed = 0xFF; // Set the default run value

	int gotoState = 0xFF;
	while (1) {
		// If a button is pressed, run to it
		if (PIND != 0xFF) {
			gotoState = PIND;
		}

		// While we're not at the last pressed button, run to it
		if (pressed  gotoState) {
			pressed --;
		}

		// Wait a little, else everything happens instantly!
		__builtin_avr_delay_cycles(500000);

		// Update the LED's according to the pressed value.
		PORTC = 0xFF &amp; (pressed &gt;&gt; 6);
		PORTB = 0xFF &amp; pressed;
	}
}
</pre></p>
<p>Going forward, I&#8217;m going to start sourcing all the components for my end-project, start doing a little more formal design-work (so that this becomes a lot less of a blur) and hunt for a victim lone calculator whose LED screen I can steal.. maybe I&#8217;ll get myself a full little LCD, but I&#8217;m not sure how much I can fit into 4k &#8211; i&#8217;ll have to figure out how to extend the execution size somewhat, i think, but lets see what pans out..</p>
<p>Till next time!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cmdrdats.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cmdrdats.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cmdrdats.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cmdrdats.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cmdrdats.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cmdrdats.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cmdrdats.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cmdrdats.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cmdrdats.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cmdrdats.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cmdrdats.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cmdrdats.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cmdrdats.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cmdrdats.wordpress.com/88/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cmdrdats.wordpress.com&amp;blog=12310164&amp;post=88&amp;subd=cmdrdats&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cmdrdats.wordpress.com/2009/04/23/microprocessors-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/09067d0122aab496e5f3a8628c522a24?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cmdrdats</media:title>
		</media:content>
	</item>
		<item>
		<title>Phun Challenge: Factory</title>
		<link>http://cmdrdats.wordpress.com/2008/07/18/phun-challenge-factory/</link>
		<comments>http://cmdrdats.wordpress.com/2008/07/18/phun-challenge-factory/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 10:59:52 +0000</pubDate>
		<dc:creator>cmdrdats</dc:creator>
				<category><![CDATA[Everything Else]]></category>

		<guid isPermaLink="false">http://www.dats.co.za/blog/?p=73</guid>
		<description><![CDATA[First off: whoever hasn&#8217;t got Phun &#8211; download it here! It&#8217;s a very cool 2D physics simulator. I built an interesting challenge in Phun last night,  Download it here, and now I&#8217;m curious to see what solutions people could come up with to make this work, so I&#8217;ve decided to issue it as a competition [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cmdrdats.wordpress.com&amp;blog=12310164&amp;post=86&amp;subd=cmdrdats&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>First off: whoever hasn&#8217;t got Phun &#8211; <a href="http://phun.cs.umu.se/wiki">download it here</a>! It&#8217;s a very cool 2D physics simulator.</p>
<p>I built an interesting challenge in Phun last night,  <a href="https://docs.google.com/leaf?id=0ByOyzr_wjyMnZjg2M2YyM2ItODg5MS00NmE5LTg5YTgtOWE1YTVlNTJiOTI3&amp;hl=en">Download it here</a>, and now I&#8217;m curious to see what solutions people could come up with to make this work, so I&#8217;ve decided to issue it as a competition with a small reward of R200 (approx $26) for the best solution.</p>
<p>Objective : Successfully and completely assemble as many of the 5 objects as illustrated in the orange zone example and place them in the demarcated delivery bays. This means you have to move the original pieces to the bays, they have to be attached together correctly and be placed right-side-up.</p>
<p>The simplified rules are :</p>
<p>- Don&#8217;t touch yellow area<br />
- Of the existing items you only modify RED gear<br />
- Don&#8217;t try looking for loopholes. <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>The extended rules are :</p>
<p>- You may not work in, or modify anything in the demarcated yellow areas &#8211; Those areas have to be exactly identical in your solution as the original state.<br />
- You may not move or modify any existing items/hinges except the RED gear.<br />
- You can create whatever you wish and attach to the background or floor plane.<br />
- At no point is your solution allowed to interfere with the orange (example) area.<br />
- I will be the sole judge of the winner, so you&#8217;ll be disqualified if I consider something cheating <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
- If you submit multiple entries, I&#8217;ll only be testing the last one I receive.</p>
<p>Update: No closing date &#8211; if you&#8217;re the first to send me a solution, I&#8217;ll edit this post and you get the R200 (via pocit &#8211; <a href="http://www.pocit.co.za">www.pocit.co.za</a>)</p>
<p>After the closing date, I will choose a winner on the best, valid submitted solution &#8211; A solution is valid if it gets at least 1 properly assembled object into a delivery bay at least once in the 10 times I run it.</p>
<p>I will be scoring each entry based on the amount of fully correct objects are assembled and placed correctly into the delivery bays over 10 tries (getting all 5 in all 10 runs = max score) &#8211; if there is more than 1 solution that can do that, I will tie-break it by the entry that is the most amazing and goes the extra mile &#8211; I favour faster, cleaner and more stable solutions.</p>
<p>Good luck and have fun!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/cmdrdats.wordpress.com/86/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/cmdrdats.wordpress.com/86/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cmdrdats.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cmdrdats.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cmdrdats.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cmdrdats.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cmdrdats.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cmdrdats.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cmdrdats.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cmdrdats.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cmdrdats.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cmdrdats.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cmdrdats.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cmdrdats.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cmdrdats.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cmdrdats.wordpress.com/86/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cmdrdats.wordpress.com&amp;blog=12310164&amp;post=86&amp;subd=cmdrdats&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cmdrdats.wordpress.com/2008/07/18/phun-challenge-factory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/09067d0122aab496e5f3a8628c522a24?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cmdrdats</media:title>
		</media:content>
	</item>
		<item>
		<title>How IDE’s could simplify Generics and Annotations in Java</title>
		<link>http://cmdrdats.wordpress.com/2008/05/08/how-ides-could-simplify-generics-and-annotations-in-java/</link>
		<comments>http://cmdrdats.wordpress.com/2008/05/08/how-ides-could-simplify-generics-and-annotations-in-java/#comments</comments>
		<pubDate>Thu, 08 May 2008 11:12:17 +0000</pubDate>
		<dc:creator>cmdrdats</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.dats.co.za/blog/?p=71</guid>
		<description><![CDATA[This blog entry by Michael Nygard got me thinking, what Michael says is quite true, Java is getting a little rough with all the compiler typesafety &#8216;help&#8217; we&#8217;re getting. Most of the pain is mitigated by all the friendly IDE help these days.. Seriously, I only ever type Map&#38;lt;String, List&#38;lt;String&#38;gt;&#38;gt; in once when I need [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cmdrdats.wordpress.com&amp;blog=12310164&amp;post=84&amp;subd=cmdrdats&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://java.dzone.com/articles/when-should-you-jump-jsr-308-t">This blog entry</a> by Michael Nygard got me thinking, what Michael says is quite true, Java is getting a little rough with all the compiler typesafety &#8216;help&#8217; we&#8217;re getting. Most of the pain is mitigated by all the friendly IDE help these days.. Seriously, I only ever <em>type </em>Map&amp;lt;String, List&amp;lt;String&amp;gt;&amp;gt; in once when I need it.. The rest propagates through the method declarations, instance creation and field declarations through alt+enter (or, ctrl+1, in eclipse)</p>
<p>My thought is that the major problem Michael is outlining is in the <em>view </em>of the java code.. Since IDE&#8217;s have full control of the view, we&#8217;re in full control to simplify somewhat.. Let&#8217;s take an example piece of code :</p>
<p><a href="http://cmdrdats.files.wordpress.com/2008/05/example_1.png"><img class="alignnone size-full wp-image-103" title="example_1" src="http://cmdrdats.files.wordpress.com/2008/05/example_1.png?w=720" alt=""   /></a></p>
<p>A bit of a contrived example, purely just to view some code with both generics and annotations. This kind of code is fairly commonplace though, just more prolific &#8211; so it gets much messier real fast. What would we prefer to see while working with the code though? I imagine the IDE could easily compress it to something like (ignore the errors for now <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  ) :</p>
<p><a href="http://cmdrdats.files.wordpress.com/2008/05/example_2.png"><img class="alignnone size-full wp-image-104" title="example_2" src="http://cmdrdats.files.wordpress.com/2008/05/example_2.png?w=720" alt=""   /></a></p>
<p>I can easily imagine it expanding as you move your cursor, or move over it when you&#8217;re interested in the actual detail, and it feels a lot simpler than the previous code listing..  The IDE could easily take it a step further by displaying it as subscript &#8211; kinda like so (excuse my slightly inconsistent photoshopping)  :</p>
<p><a href="http://cmdrdats.files.wordpress.com/2008/05/example_3.png"><img class="alignnone size-full wp-image-105" title="example_3" src="http://cmdrdats.files.wordpress.com/2008/05/example_3.png?w=720" alt=""   /></a></p>
<p>I think, however, that all of this info can just disappear though, into a seperate editable popup so that the extra compiler hints and functionality is edited in a separate popup (properly keyboard editable though &#8211; you might need to spend some time figuring out what feels correct) :</p>
<p><a href="http://cmdrdats.files.wordpress.com/2008/05/example_4.png"><img class="alignnone size-full wp-image-106" title="example_4" src="http://cmdrdats.files.wordpress.com/2008/05/example_4.png?w=720" alt=""   /></a></p>
<p>Again, excuse my quick photoshopping here.. I went all the way here and added icons for the &#8216;private&#8217; and &#8216;public&#8217; keywords as well &#8211; that may be a little overkill, but my point here is that we don&#8217;t need to stick to plain two-dimensional text in editors any more.. In my opinion, once you&#8217;re done writing the code, and want to glance it over, you don&#8217;t necessarily want to have all the in-depth information in your face all the time.. Which is what attracts people to dynamically typed languages in the first place (well, for me anyhow).</p>
<p>Using the IDE to clear up your view of the code a bit could be a nice bridge between compiler type-safety and code brevity for maintenance.. I&#8217;m sure it could open up a whole can of interesting squishy things that you could do, but I&#8217;ll leave that as an exercise for you <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>As a sidenote &#8211; this kind of functionality is one of the reasons I&#8217;m taking a liking to Groovy where, in its essence, it expands easier-to-read shorthand to the full java shebang (in the compiled class file)..</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/cmdrdats.wordpress.com/84/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/cmdrdats.wordpress.com/84/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cmdrdats.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cmdrdats.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cmdrdats.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cmdrdats.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cmdrdats.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cmdrdats.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cmdrdats.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cmdrdats.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cmdrdats.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cmdrdats.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cmdrdats.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cmdrdats.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cmdrdats.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cmdrdats.wordpress.com/84/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cmdrdats.wordpress.com&amp;blog=12310164&amp;post=84&amp;subd=cmdrdats&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cmdrdats.wordpress.com/2008/05/08/how-ides-could-simplify-generics-and-annotations-in-java/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/09067d0122aab496e5f3a8628c522a24?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cmdrdats</media:title>
		</media:content>

		<media:content url="http://cmdrdats.files.wordpress.com/2008/05/example_1.png" medium="image">
			<media:title type="html">example_1</media:title>
		</media:content>

		<media:content url="http://cmdrdats.files.wordpress.com/2008/05/example_2.png" medium="image">
			<media:title type="html">example_2</media:title>
		</media:content>

		<media:content url="http://cmdrdats.files.wordpress.com/2008/05/example_3.png" medium="image">
			<media:title type="html">example_3</media:title>
		</media:content>

		<media:content url="http://cmdrdats.files.wordpress.com/2008/05/example_4.png" medium="image">
			<media:title type="html">example_4</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting setup for some Netbeans development</title>
		<link>http://cmdrdats.wordpress.com/2008/03/28/getting-setup-for-some-netbeans-development/</link>
		<comments>http://cmdrdats.wordpress.com/2008/03/28/getting-setup-for-some-netbeans-development/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 13:56:04 +0000</pubDate>
		<dc:creator>cmdrdats</dc:creator>
				<category><![CDATA[Netbeans]]></category>

		<guid isPermaLink="false">http://www.dats.co.za/blog/?p=70</guid>
		<description><![CDATA[And this means some serious reading to be done (prepare for a bit of a link-fest) : My starting point is within the Community part of the Netbeans site &#8211; there is quite a bit that goes on here but it&#8217;s fairly straightforward. After a little digging I find some useful Guidelines, the most notable [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cmdrdats.wordpress.com&amp;blog=12310164&amp;post=83&amp;subd=cmdrdats&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>And this means some serious reading to be done (prepare for a bit of a link-fest) :</p>
<p>My starting point is within the <a href="http://www.netbeans.org/community">Community part of the Netbeans site</a> &#8211; there is quite a bit that goes on here but it&#8217;s fairly straightforward. After a little digging I find some useful <a target="_blank" href="http://www.netbeans.org/community/guidelines/">Guidelines</a>, the most notable of which (to me) is the <a href="http://www.netbeans.org/community/guidelines/code-conventions.html">Code Conventions</a>.</p>
<p>Luckily, the Netbeans Code Conventions follows the <a href="http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html">Sun Code Conventions for Java</a>, which I&#8217;ve been following for as long as I remember <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Take special note on the <a href="http://java.sun.com/j2se/javadoc/writingdoccomments/index.html">&#8220;How to Write Doc Comments for Javadoc&#8221;</a> &#8211; It contains some really neat info.</p>
<p>With the basic coding guidelines out of the way, the next thing to do is to get the <a href="http://wiki.netbeans.org/HgNetBeansSources">Netbeans source code</a> and get it compiled. To setup Mercurial, I need to download the <a href="http://www.selenic.com/mercurial/wiki/index.cgi/BinaryPackages">Mercurial Client</a>. I personally opt for <a href="http://www.selenic.com/mercurial/wiki/index.cgi/TortoiseHg">TortoiseHg</a> since I have experience with good old TortoiseCVS and TortoiseSVN &#8211; The shell integration is great when things outside IDE&#8217;s give hassles and I am personally not a fan of the command line.</p>
<p>Moving on, After installing TortoiseHg and restarting my machine, I just follow the steps <a href="http://wiki.netbeans.org/HgNetBeansSources">outlined here</a> and <a href="http://wiki.netbeans.org/HgHowTos#section-HgHowTos-InstallingMercurial">here</a> to properly get my Mercurial setup inside Netbeans 6.1Beta. And then wait for the clone to happen. This will take a while since, and I quote, &#8220;A clone can take anywhere between 1 and 5 hours to complete depending on connectivity&#8221;. I&#8217;m downloading it over iBurst, so it will likely take 10 hours.. More to come.. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/cmdrdats.wordpress.com/83/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/cmdrdats.wordpress.com/83/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cmdrdats.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cmdrdats.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cmdrdats.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cmdrdats.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cmdrdats.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cmdrdats.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cmdrdats.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cmdrdats.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cmdrdats.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cmdrdats.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cmdrdats.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cmdrdats.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cmdrdats.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cmdrdats.wordpress.com/83/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cmdrdats.wordpress.com&amp;blog=12310164&amp;post=83&amp;subd=cmdrdats&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cmdrdats.wordpress.com/2008/03/28/getting-setup-for-some-netbeans-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/09067d0122aab496e5f3a8628c522a24?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cmdrdats</media:title>
		</media:content>
	</item>
	</channel>
</rss>
