<?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>Brad Heap &#187; Computer Science</title>
	<atom:link href="http://www.bradheap.id.au/blog/tag/computer-science/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bradheap.id.au/blog</link>
	<description>One kiwi&#039;s news and views on politics, science, computers, god, religion, and other ramblings from Sydney, Australia</description>
	<lastBuildDate>Thu, 02 Feb 2012 08:11:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Android Blog Reader Application &#8211; Honours Assignment</title>
		<link>http://www.bradheap.id.au/blog/2009/10/android-blog-reader-application-honours-assignment/</link>
		<comments>http://www.bradheap.id.au/blog/2009/10/android-blog-reader-application-honours-assignment/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 07:40:15 +0000</pubDate>
		<dc:creator>Brad Heap</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[University]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Honours]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.brad.net.nz/blog/?p=2038</guid>
		<description><![CDATA[One of my papers this semester is focused on Google Android Mobile Operating System. The brief for my final assignment is: Your task is to write any application you like. The are no restrictions on what your application can do &#8230; <a href="http://www.bradheap.id.au/blog/2009/10/android-blog-reader-application-honours-assignment/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of my papers this semester is focused on Google Android Mobile Operating System.</p>
<p>The brief for my final assignment is:</p>
<blockquote><p>Your task is to write any application you like. The are no restrictions on what your application can do but it should show of the capabilities of the platform and be well written.</p>
<p>Marks will be awarded for interesting applications that make good use of the Android platform.</p>
<p>Make sure your application works on the emulator but I will also test it on a real device.</p></blockquote>
<p>For this assignment I decided to create a Blog Reader that reads the RSS XML feeds off blogs to display them in a Android Application.<br />
I have spent around three days coding this assignment. I will not release the code until after the assignment has been marked, however here are some screen shots of the work</p>
<div id="attachment_2039" class="wp-caption aligncenter" style="width: 330px"><img class="size-full wp-image-2039" title="Menu" src="http://www.brad.net.nz/blog/wp-content/uploads/2009/10/Menu.png" alt="My Application Sitting in the Android Application Menu on my phone" width="320" height="480" /><p class="wp-caption-text">My Application Sitting in the Android Application Menu on my phone</p></div>
<div id="attachment_2040" class="wp-caption alignleft" style="width: 330px"><img src="http://www.brad.net.nz/blog/wp-content/uploads/2009/10/HomeScreen.png" alt="The application's home screen" title="HomeScreen" width="320" height="480" class="size-full wp-image-2040" /><p class="wp-caption-text">The applications home screen</p></div>
<div id="attachment_2041" class="wp-caption alignleft" style="width: 330px"><img src="http://www.brad.net.nz/blog/wp-content/uploads/2009/10/AddNewBlog.png" alt="Adding a new blog feed into the application" title="AddNewBlog" width="320" height="480" class="size-full wp-image-2041" /><p class="wp-caption-text">Adding a new blog feed into the application</p></div>
<div id="attachment_2042" class="wp-caption alignleft" style="width: 330px"><img src="http://www.brad.net.nz/blog/wp-content/uploads/2009/10/BlogList.png" alt="Viewing a list of blogs" title="BlogList" width="320" height="480" class="size-full wp-image-2042" /><p class="wp-caption-text">Viewing a list of blogs</p></div>
<div id="attachment_2043" class="wp-caption alignleft" style="width: 330px"><img src="http://www.brad.net.nz/blog/wp-content/uploads/2009/10/RemoveBlog.png" alt="Removing a blog feed" title="RemoveBlog" width="320" height="480" class="size-full wp-image-2043" /><p class="wp-caption-text">Removing a blog feed</p></div>
<div id="attachment_2044" class="wp-caption alignleft" style="width: 330px"><img src="http://www.brad.net.nz/blog/wp-content/uploads/2009/10/BradPosts.png" alt="Viewing a list of blog posts" title="BradPosts" width="320" height="480" class="size-full wp-image-2044" /><p class="wp-caption-text">Viewing a list of blog posts</p></div>
<div id="attachment_2045" class="wp-caption alignleft" style="width: 330px"><img src="http://www.brad.net.nz/blog/wp-content/uploads/2009/10/KiwiblogPosts.png" alt="Viewing list of blog posts" title="KiwiblogPosts" width="320" height="480" class="size-full wp-image-2045" /><p class="wp-caption-text">Viewing list of blog posts</p></div>
<div id="attachment_2046" class="wp-caption alignleft" style="width: 330px"><img src="http://www.brad.net.nz/blog/wp-content/uploads/2009/10/ViewSingle.png" alt="Viewing single post" title="ViewSingle" width="320" height="480" class="size-full wp-image-2046" /><p class="wp-caption-text">Viewing single post</p></div>
<div class="social4i" style="height:29px;">
<div class="social4in" style="height:29px;float: left;">
<div class="socialicons s4twitter" style="float:left;margin-right: 10px;background:url(&quot;http://goo.gl/zjqd1&quot;) no-repeat;"><a href="http://twitter.com/share" data-url="http://www.bradheap.id.au/blog/2009/10/android-blog-reader-application-honours-assignment/" data-counturl="http://www.bradheap.id.au/blog/2009/10/android-blog-reader-application-honours-assignment/" data-text="Android Blog Reader Application &#8211; Honours Assignment" class="twitter-share-button" data-count="horizontal" data-via=""></a></div>
<div class="socialicons s4fblike" style="float:left;margin-right: 10px;">
<div id="fb-root"></div>
<p><fb:like href="http%3A%2F%2Fwww.bradheap.id.au%2Fblog%2F2009%2F10%2Fandroid-blog-reader-application-honours-assignment%2F" send="false" layout="button_count" width="100" height="21" show_faces="false" font=""></fb:like></div>
<div class="socialicons s4plusone" style="float:left;margin-right: 10px;"><g:plusone size="medium" href="http://www.bradheap.id.au/blog/2009/10/android-blog-reader-application-honours-assignment/" count="true"></g:plusone></div>
</div>
<div style="clear:both"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bradheap.id.au/blog/2009/10/android-blog-reader-application-honours-assignment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Traffic Simulation Intersection Controllers Video</title>
		<link>http://www.bradheap.id.au/blog/2009/07/traffic-simulation-intersection-controllers-video/</link>
		<comments>http://www.bradheap.id.au/blog/2009/07/traffic-simulation-intersection-controllers-video/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 02:59:07 +0000</pubDate>
		<dc:creator>Brad Heap</dc:creator>
				<category><![CDATA[University]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Honours]]></category>
		<category><![CDATA[Massey University]]></category>
		<category><![CDATA[Study]]></category>
		<category><![CDATA[Traffic Simulation]]></category>

		<guid isPermaLink="false">http://www.brad.net.nz/blog/?p=1732</guid>
		<description><![CDATA[Another week, time for another video. This one shows changes that have been made to the intersection controllers within the Traffic Simulator. The give-way controller makes all the cars give way to all the other roads connected into the intersection &#8230; <a href="http://www.bradheap.id.au/blog/2009/07/traffic-simulation-intersection-controllers-video/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Another week, time for another video.</p>
<p>This one shows changes that have been made to the intersection controllers within the Traffic Simulator.</p>
<p>The give-way controller makes all the cars give way to all the other roads connected into the intersection with a minimum of 2.5 seconds between vehicles.</p>
<p>The traffic lights controller makes all the cars on the green road go at 2 second intervals and makes the others queue with a minimum wait time of 16 seconds.</p>
<p>The round-a-bout controller makes each car give way to the right and then go with a minimum of 3.9 seconds between each car on a road, but multiple cars from multiple roads can cross the intersection at the same time&#8230; hence the chaos on the video.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/d0icfbBVWP0&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/d0icfbBVWP0&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>
<div class="social4i" style="height:29px;">
<div class="social4in" style="height:29px;float: left;">
<div class="socialicons s4twitter" style="float:left;margin-right: 10px;background:url(&quot;http://goo.gl/zjqd1&quot;) no-repeat;"><a href="http://twitter.com/share" data-url="http://www.bradheap.id.au/blog/2009/07/traffic-simulation-intersection-controllers-video/" data-counturl="http://www.bradheap.id.au/blog/2009/07/traffic-simulation-intersection-controllers-video/" data-text="Traffic Simulation Intersection Controllers Video" class="twitter-share-button" data-count="horizontal" data-via=""></a></div>
<div class="socialicons s4fblike" style="float:left;margin-right: 10px;">
<div id="fb-root"></div>
<p><fb:like href="http%3A%2F%2Fwww.bradheap.id.au%2Fblog%2F2009%2F07%2Ftraffic-simulation-intersection-controllers-video%2F" send="false" layout="button_count" width="100" height="21" show_faces="false" font=""></fb:like></div>
<div class="socialicons s4plusone" style="float:left;margin-right: 10px;"><g:plusone size="medium" href="http://www.bradheap.id.au/blog/2009/07/traffic-simulation-intersection-controllers-video/" count="true"></g:plusone></div>
</div>
<div style="clear:both"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bradheap.id.au/blog/2009/07/traffic-simulation-intersection-controllers-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Second Traffic Simulator Video</title>
		<link>http://www.bradheap.id.au/blog/2009/07/second-traffic-simulator-video/</link>
		<comments>http://www.bradheap.id.au/blog/2009/07/second-traffic-simulator-video/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 10:06:36 +0000</pubDate>
		<dc:creator>Brad Heap</dc:creator>
				<category><![CDATA[University]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Honours]]></category>
		<category><![CDATA[Massey University]]></category>
		<category><![CDATA[Study]]></category>
		<category><![CDATA[Traffic Simulation]]></category>

		<guid isPermaLink="false">http://www.brad.net.nz/blog/?p=1701</guid>
		<description><![CDATA[This one turned out much better than the first one, enjoy.]]></description>
			<content:encoded><![CDATA[<p>This one turned out much better than the first one, enjoy.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/1rPIwxpt2A8&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/1rPIwxpt2A8&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>
<div class="social4i" style="height:29px;">
<div class="social4in" style="height:29px;float: left;">
<div class="socialicons s4twitter" style="float:left;margin-right: 10px;background:url(&quot;http://goo.gl/zjqd1&quot;) no-repeat;"><a href="http://twitter.com/share" data-url="http://www.bradheap.id.au/blog/2009/07/second-traffic-simulator-video/" data-counturl="http://www.bradheap.id.au/blog/2009/07/second-traffic-simulator-video/" data-text="Second Traffic Simulator Video" class="twitter-share-button" data-count="horizontal" data-via=""></a></div>
<div class="socialicons s4fblike" style="float:left;margin-right: 10px;">
<div id="fb-root"></div>
<p><fb:like href="http%3A%2F%2Fwww.bradheap.id.au%2Fblog%2F2009%2F07%2Fsecond-traffic-simulator-video%2F" send="false" layout="button_count" width="100" height="21" show_faces="false" font=""></fb:like></div>
<div class="socialicons s4plusone" style="float:left;margin-right: 10px;"><g:plusone size="medium" href="http://www.bradheap.id.au/blog/2009/07/second-traffic-simulator-video/" count="true"></g:plusone></div>
</div>
<div style="clear:both"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bradheap.id.au/blog/2009/07/second-traffic-simulator-video/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Video Glimpse of Traffic Simulator</title>
		<link>http://www.bradheap.id.au/blog/2009/07/video-glimpse-of-traffic-simulator/</link>
		<comments>http://www.bradheap.id.au/blog/2009/07/video-glimpse-of-traffic-simulator/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 04:28:55 +0000</pubDate>
		<dc:creator>Brad Heap</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[University]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Honours]]></category>
		<category><![CDATA[Massey University]]></category>
		<category><![CDATA[Traffic Simulation]]></category>

		<guid isPermaLink="false">http://www.brad.net.nz/blog/?p=1695</guid>
		<description><![CDATA[Silly computer has taken almost two hours to process this single video into a usable format but at least it can show some of my work.]]></description>
			<content:encoded><![CDATA[<p>Silly computer has taken almost two hours to process this single video into a usable format but at least it can show some of my work. <img src='http://www.bradheap.id.au/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/6q1mx7QWjeY&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/6q1mx7QWjeY&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>
<div class="social4i" style="height:29px;">
<div class="social4in" style="height:29px;float: left;">
<div class="socialicons s4twitter" style="float:left;margin-right: 10px;background:url(&quot;http://goo.gl/zjqd1&quot;) no-repeat;"><a href="http://twitter.com/share" data-url="http://www.bradheap.id.au/blog/2009/07/video-glimpse-of-traffic-simulator/" data-counturl="http://www.bradheap.id.au/blog/2009/07/video-glimpse-of-traffic-simulator/" data-text="Video Glimpse of Traffic Simulator" class="twitter-share-button" data-count="horizontal" data-via=""></a></div>
<div class="socialicons s4fblike" style="float:left;margin-right: 10px;">
<div id="fb-root"></div>
<p><fb:like href="http%3A%2F%2Fwww.bradheap.id.au%2Fblog%2F2009%2F07%2Fvideo-glimpse-of-traffic-simulator%2F" send="false" layout="button_count" width="100" height="21" show_faces="false" font=""></fb:like></div>
<div class="socialicons s4plusone" style="float:left;margin-right: 10px;"><g:plusone size="medium" href="http://www.bradheap.id.au/blog/2009/07/video-glimpse-of-traffic-simulator/" count="true"></g:plusone></div>
</div>
<div style="clear:both"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bradheap.id.au/blog/2009/07/video-glimpse-of-traffic-simulator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simulating / Emulating a MPI Cluster or Supercomputer under Ubuntu Linux</title>
		<link>http://www.bradheap.id.au/blog/2009/04/simulating-emulating-a-mpi-cluster-or-supercomputer-under-ubuntu-linux/</link>
		<comments>http://www.bradheap.id.au/blog/2009/04/simulating-emulating-a-mpi-cluster-or-supercomputer-under-ubuntu-linux/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 07:10:59 +0000</pubDate>
		<dc:creator>Brad Heap</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[University]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MPI]]></category>
		<category><![CDATA[Supercomputers]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.brad.net.nz/blog/?p=1385</guid>
		<description><![CDATA[Okay a few posts ago I mentioned that I had been successful in setting up my laptop as a virtual supercomputer. Here are hopefully some relatively clear instructions on how simple it was to do. Setting up a MPI development &#8230; <a href="http://www.bradheap.id.au/blog/2009/04/simulating-emulating-a-mpi-cluster-or-supercomputer-under-ubuntu-linux/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Okay a few posts ago I mentioned that I had been successful in setting up my laptop as a virtual supercomputer.</p>
<p>Here are hopefully some relatively clear instructions on how simple it was to do.</p>
<p style="margin-bottom: 0cm;">Setting up a MPI development system on Ubuntu Linux</p>
<ol>
<li>
<p style="margin-bottom: 0cm;">Download Ubuntu – check out the 	latest version at <a href="http://www.ubuntu.com/">www.ubuntu.com</a></p>
</li>
<li>
<p style="margin-bottom: 0cm;">Intall the required mpi files.</p>
<p style="margin-bottom: 0cm;">For Ubuntu 9.04:<br />
In a terminal window enter:<br />
sudo apt-get install 		libopenmpi1 libopenmpi-dbg libopenmpi-dev openmpi-bin openmpi-common openmpi-dev</p>
<p>For Ubuntu 10.04:<br />
In a terminal window enter:<br />
sudo apt-get install libopenmpi1.3 libopenmpi-dbg libopenmpi-dev openmpi-bin openmpi-common openmpi-dev</li>
<li>
<p style="margin-bottom: 0cm;">Test the mpi install by compiling 	and running a simple program</p>
<ol>
<li>
<p style="margin-bottom: 0cm;">mpicc testfile.c -o testfile</p>
</li>
<li>
<p style="margin-bottom: 0cm;">mpirun -np 2 ./testfile</p>
<ol>
<li>
<p style="margin-bottom: 0cm;">Where np is the number of cores 			* number of processes on your system.</p>
</li>
<li>
<p style="margin-bottom: 0cm;">e.g. on a two core laptop np 			should be 2.</p>
</li>
</ol>
</li>
</ol>
</li>
<li>
<p style="margin-bottom: 0cm;">If you get an error regarding ssh 	when you enter the mpirun command install ssh</p>
<ol>
<li>
<p style="margin-bottom: 0cm;">sudo apt-get install ssh</p>
</li>
</ol>
</li>
<li>
<p style="margin-bottom: 0cm;">If you get requested for your 	password everytime you run mpirun set up a stored RSA key control</p>
<ol>
<li>
<p style="margin-bottom: 0cm;">cd $HOME</p>
</li>
<li>
<p style="margin-bottom: 0cm;">ssh-keygen -t dsa</p>
</li>
<li>
<p style="margin-bottom: 0cm;">cp .ssh/id_dsa.pub 		.ssh/authorized_keys2</p>
</li>
</ol>
</li>
</ol>
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">Further reference:</p>
<p style="margin-bottom: 0cm;"><a href="http://www.csc.cam.ac.uk/academic/practicals.html">http://www.csc.cam.ac.uk/academic/practicals.html</a></p>
<p style="margin-bottom: 0cm;"><a href="http://www.math.umbc.edu/~gobbert/mpi.html">http://www.math.umbc.edu/~gobbert/mpi.html</a></p>
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">
<p style="margin-bottom: 0cm;">
<div class="social4i" style="height:29px;">
<div class="social4in" style="height:29px;float: left;">
<div class="socialicons s4twitter" style="float:left;margin-right: 10px;background:url(&quot;http://goo.gl/zjqd1&quot;) no-repeat;"><a href="http://twitter.com/share" data-url="http://www.bradheap.id.au/blog/2009/04/simulating-emulating-a-mpi-cluster-or-supercomputer-under-ubuntu-linux/" data-counturl="http://www.bradheap.id.au/blog/2009/04/simulating-emulating-a-mpi-cluster-or-supercomputer-under-ubuntu-linux/" data-text="Simulating / Emulating a MPI Cluster or Supercomputer under Ubuntu Linux" class="twitter-share-button" data-count="horizontal" data-via=""></a></div>
<div class="socialicons s4fblike" style="float:left;margin-right: 10px;">
<div id="fb-root"></div>
<p><fb:like href="http%3A%2F%2Fwww.bradheap.id.au%2Fblog%2F2009%2F04%2Fsimulating-emulating-a-mpi-cluster-or-supercomputer-under-ubuntu-linux%2F" send="false" layout="button_count" width="100" height="21" show_faces="false" font=""></fb:like></div>
<div class="socialicons s4plusone" style="float:left;margin-right: 10px;"><g:plusone size="medium" href="http://www.bradheap.id.au/blog/2009/04/simulating-emulating-a-mpi-cluster-or-supercomputer-under-ubuntu-linux/" count="true"></g:plusone></div>
</div>
<div style="clear:both"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bradheap.id.au/blog/2009/04/simulating-emulating-a-mpi-cluster-or-supercomputer-under-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wubi</title>
		<link>http://www.bradheap.id.au/blog/2009/04/wubi/</link>
		<comments>http://www.bradheap.id.au/blog/2009/04/wubi/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 07:58:20 +0000</pubDate>
		<dc:creator>Brad Heap</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Cool Stuff]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating Systems]]></category>

		<guid isPermaLink="false">http://www.brad.net.nz/blog/?p=1374</guid>
		<description><![CDATA[Okay, now there is no excuse for any geek or anyone with a keen interest in computers to not try out linux. For the past year and a bit I have been playing around with Virtualbox and virtualization, the major &#8230; <a href="http://www.bradheap.id.au/blog/2009/04/wubi/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Okay, now there is no excuse for any geek or anyone with a keen interest in computers to not try out linux.</p>
<p>For the past year and a bit I have been playing around with Virtualbox and virtualization, the major problem here however is the speed of booting, and drivers etc as it is in an emulated/simulated environment.</p>
<p>Enter WUBI. Wubi is an installer that allows you to install Ubuntu and Linux Mint on an NTFS partiation and use the windows boot loader so it does absolute nothing to windows at all. And to make matters better you can access your windows files straight out of the box.</p>
<p>I have now had a WUBI Ubunutu set up for the past week and it is brilliant.</p>
<p>I am now trying a new distro called Linux Mint which is aimed at end users.</p>
<p>If you want some help getting it installed or just want to try it out just contact me, it is brilliant just really awesome.
<div class="social4i" style="height:29px;">
<div class="social4in" style="height:29px;float: left;">
<div class="socialicons s4twitter" style="float:left;margin-right: 10px;background:url(&quot;http://goo.gl/zjqd1&quot;) no-repeat;"><a href="http://twitter.com/share" data-url="http://www.bradheap.id.au/blog/2009/04/wubi/" data-counturl="http://www.bradheap.id.au/blog/2009/04/wubi/" data-text="Wubi" class="twitter-share-button" data-count="horizontal" data-via=""></a></div>
<div class="socialicons s4fblike" style="float:left;margin-right: 10px;">
<div id="fb-root"></div>
<p><fb:like href="http%3A%2F%2Fwww.bradheap.id.au%2Fblog%2F2009%2F04%2Fwubi%2F" send="false" layout="button_count" width="100" height="21" show_faces="false" font=""></fb:like></div>
<div class="socialicons s4plusone" style="float:left;margin-right: 10px;"><g:plusone size="medium" href="http://www.bradheap.id.au/blog/2009/04/wubi/" count="true"></g:plusone></div>
</div>
<div style="clear:both"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bradheap.id.au/blog/2009/04/wubi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Traffic Simulation Update: Multiple Cars, Multiple Lanes</title>
		<link>http://www.bradheap.id.au/blog/2009/03/traffic-simulation-update-multiple-cars-multiple-lanes/</link>
		<comments>http://www.bradheap.id.au/blog/2009/03/traffic-simulation-update-multiple-cars-multiple-lanes/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 00:34:59 +0000</pubDate>
		<dc:creator>Brad Heap</dc:creator>
				<category><![CDATA[University]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Honours]]></category>
		<category><![CDATA[Traffic Simulation]]></category>

		<guid isPermaLink="false">http://www.brad.net.nz/blog/?p=1362</guid>
		<description><![CDATA[Okay, the traffic simulator project has been slow going over the past few weeks, just not been very focussed and playing with DLA and other assignments too much. This morning/arvo I changed some of the code and layout of how &#8230; <a href="http://www.bradheap.id.au/blog/2009/03/traffic-simulation-update-multiple-cars-multiple-lanes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Okay, the traffic simulator project has been slow going over the past few weeks, just not been very focussed and playing with DLA and other assignments too much.</p>
<p>This morning/arvo I changed some of the code and layout of how cars were being generated. Now instead of a car know what road it is on it has been reversed, so each road has its own collection of cars to manage. With some changes to how the graphics are produced this now means that cars are now rendered at the same time as each road. A that allows perfect placement of cars onto roads rather than having to do a mathematically approximation. Clear as mud?</p>
<p><img class="aligncenter size-full wp-image-1363" title="carsonlanes" src="http://www.brad.net.nz/blog/wp-content/uploads/2009/03/carsonlanes.jpg" alt="carsonlanes" width="800" height="501" />
<div class="social4i" style="height:29px;">
<div class="social4in" style="height:29px;float: left;">
<div class="socialicons s4twitter" style="float:left;margin-right: 10px;background:url(&quot;http://goo.gl/zjqd1&quot;) no-repeat;"><a href="http://twitter.com/share" data-url="http://www.bradheap.id.au/blog/2009/03/traffic-simulation-update-multiple-cars-multiple-lanes/" data-counturl="http://www.bradheap.id.au/blog/2009/03/traffic-simulation-update-multiple-cars-multiple-lanes/" data-text="Traffic Simulation Update: Multiple Cars, Multiple Lanes" class="twitter-share-button" data-count="horizontal" data-via=""></a></div>
<div class="socialicons s4fblike" style="float:left;margin-right: 10px;">
<div id="fb-root"></div>
<p><fb:like href="http%3A%2F%2Fwww.bradheap.id.au%2Fblog%2F2009%2F03%2Ftraffic-simulation-update-multiple-cars-multiple-lanes%2F" send="false" layout="button_count" width="100" height="21" show_faces="false" font=""></fb:like></div>
<div class="socialicons s4plusone" style="float:left;margin-right: 10px;"><g:plusone size="medium" href="http://www.bradheap.id.au/blog/2009/03/traffic-simulation-update-multiple-cars-multiple-lanes/" count="true"></g:plusone></div>
</div>
<div style="clear:both"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bradheap.id.au/blog/2009/03/traffic-simulation-update-multiple-cars-multiple-lanes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>6000 Point Balanced DLA</title>
		<link>http://www.bradheap.id.au/blog/2009/03/6000-point-balanced-dla/</link>
		<comments>http://www.bradheap.id.au/blog/2009/03/6000-point-balanced-dla/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 23:00:00 +0000</pubDate>
		<dc:creator>Brad Heap</dc:creator>
				<category><![CDATA[University]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Study]]></category>

		<guid isPermaLink="false">http://www.brad.net.nz/blog/?p=1359</guid>
		<description><![CDATA[Yes I am still making DLAs just trying to make the maths that little bit nicer, and get that all impressive performance boost. This is a 6,000 point balanced model, it took just under 1.5 hours to generate, compared to &#8230; <a href="http://www.bradheap.id.au/blog/2009/03/6000-point-balanced-dla/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yes I am still making DLAs just trying to make the maths that little bit nicer, and get that all impressive performance boost. </p>
<p>This is a 6,000 point balanced model, it took just under 1.5 hours to generate, compared to 4+ hours for a 5,000 point unbalanced DLA on Sunday</p>
<p><img class="aligncenter size-full wp-image-1360" title="6000" src="http://www.brad.net.nz/blog/wp-content/uploads/2009/03/6000.jpg" alt="6000" width="500" height="806" />
<div class="social4i" style="height:29px;">
<div class="social4in" style="height:29px;float: left;">
<div class="socialicons s4twitter" style="float:left;margin-right: 10px;background:url(&quot;http://goo.gl/zjqd1&quot;) no-repeat;"><a href="http://twitter.com/share" data-url="http://www.bradheap.id.au/blog/2009/03/6000-point-balanced-dla/" data-counturl="http://www.bradheap.id.au/blog/2009/03/6000-point-balanced-dla/" data-text="6000 Point Balanced DLA" class="twitter-share-button" data-count="horizontal" data-via=""></a></div>
<div class="socialicons s4fblike" style="float:left;margin-right: 10px;">
<div id="fb-root"></div>
<p><fb:like href="http%3A%2F%2Fwww.bradheap.id.au%2Fblog%2F2009%2F03%2F6000-point-balanced-dla%2F" send="false" layout="button_count" width="100" height="21" show_faces="false" font=""></fb:like></div>
<div class="socialicons s4plusone" style="float:left;margin-right: 10px;"><g:plusone size="medium" href="http://www.bradheap.id.au/blog/2009/03/6000-point-balanced-dla/" count="true"></g:plusone></div>
</div>
<div style="clear:both"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bradheap.id.au/blog/2009/03/6000-point-balanced-dla/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The C# battle of the SortedList, SortedDictionary, and List</title>
		<link>http://www.bradheap.id.au/blog/2009/01/the-c-battle-of-the-sortedlist-sorteddictionary-and-list/</link>
		<comments>http://www.bradheap.id.au/blog/2009/01/the-c-battle-of-the-sortedlist-sorteddictionary-and-list/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 09:28:23 +0000</pubDate>
		<dc:creator>Brad Heap</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sorting]]></category>

		<guid isPermaLink="false">http://www.brad.net.nz/blog/?p=1010</guid>
		<description><![CDATA[Okay as part of my internship I have to deal with a huge number of text strings. These strings come into the program unsorted and they must be sorted and each one must be unique. (i.e. no duplicates). Now there &#8230; <a href="http://www.bradheap.id.au/blog/2009/01/the-c-battle-of-the-sortedlist-sorteddictionary-and-list/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Okay as part of my internship I have to deal with a huge number of text strings.</p>
<p>These strings come into the program unsorted and they must be sorted and each one must be unique. (i.e. no duplicates).</p>
<p>Now there are a few different ways to be able to store this data.</p>
<p>A SortedList, SortedDictionary, or two different forms of lists, the first where before each add you check to make sure that the data doesn&#8217;t already exist, and the second where you just add then sort then remove duplicates at a later time.</p>
<p>Two work out what one would be best I wrote a program to determine which form of storage operated the fastest on input. The results follow and then the code for how I did it.</p>
<p>As you can see the SortedDictionary worked the best, however at the early stages both the SortedList and Duplicate List gave it a run for it&#8217;s money.</p>
<p>Results</p>
<pre>Sorted List Test:        00:00:00.1169883 Input:    5000    4000 List Size:    2838
Sorted Dictionary Test:  00:00:00.1339866 Input:    5000    4000 List Size:    2858
Unique List Test:        00:00:00.1119888 Input:    5000    4000 List Size:    2862
Duplicate List Test:     00:00:00.0239976 Input:    5000    4000 List Size:    2832</pre>
<pre>Sorted List Test:        00:00:01.3768623 Input:   50000   40000 List Size:   28516
Sorted Dictionary Test:  00:00:01.0678932 Input:   50000   40000 List Size:   28466
Unique List Test:        00:00:12.3097689 Input:   50000   40000 List Size:   28384
Duplicate List Test:     00:00:01.2058794 Input:   50000   40000 List Size:   28549</pre>
<pre>Sorted List Test:        00:01:36.9733017 Input:  500000  400000 List Size:  285367
Sorted Dictionary Test:  00:00:12.3307668 Input:  500000  400000 List Size:  285422
Duplicate List Test:     00:02:32.7467238 Input:  500000  400000 List Size:  285506</pre>
<pre>Sorted Dictionary Test:  00:02:37.8040000 Input: 5000000 4000000 List Size: 2854095</pre>
<p><span id="more-1010"></span></p>
<p>Code for Program.cs</p>
<p><code>using System;<br />
using System.Collections.Generic;<br />
using System.Text;</code></p>
<p><code>namespace SortTest<br />
{<br />
class Program<br />
{<br />
public static void Main()<br />
{<br />
// 5,000 item list<br />
SortedListTest.run(5000,4000);<br />
SortedDictionaryTest.run(5000, 4000);<br />
UniqueListTest.run(5000, 4000);<br />
DuplicateListTest.run(5000, 4000);</code></p>
<p><code>// 50,000 item list<br />
SortedListTest.run(50000, 40000);<br />
SortedDictionaryTest.run(50000, 40000);<br />
UniqueListTest.run(50000, 40000);<br />
DuplicateListTest.run(50000, 40000);</code></p>
<p><code>// 500,000 item list<br />
SortedListTest.run(500000, 400000);<br />
SortedDictionaryTest.run(500000, 400000);<br />
//UniqueListTest.run(500000, 400000);<br />
DuplicateListTest.run(500000, 400000);</code></p>
<p><code>// 5,000,000 item list<br />
//SortedListTest.run(5000000, 4000000);<br />
SortedDictionaryTest.run(5000000, 4000000);<br />
//UniqueListTest.run(5000000, 4000000);<br />
//DuplicateListTest.run(5000000, 4000000);</code></p>
<p><code>}<br />
}<br />
}</code></p>
<p>Code for SortedListTest.cs<br />
<code>using System;<br />
using System.Collections.Generic;<br />
using System.Text;</code></p>
<p><code>namespace SortTest<br />
{<br />
    class SortedListTest<br />
    {<br />
        private static SortedList<string ,char> words = null;</string></code></p>
<p><code>        public static void run(int loopSize, int multiplier)<br />
        {<br />
            words = new SortedList<string , char>();<br />
            DateTime startTime = DateTime.Now;<br />
            Random rand = new Random();<br />
            int i;<br />
            for (int j = 0; j != loopSize; j++)<br />
            {<br />
                i = (int)(rand.NextDouble() * multiplier);<br />
                try<br />
                {<br />
                    string s = i.ToString();<br />
                    words.Add(s, s[0]);<br />
                }<br />
                catch (Exception e)<br />
                {<br />
                    continue;<br />
                }<br />
            }<br />
            DateTime stopTime = DateTime.Now;<br />
            TimeSpan duration = stopTime - startTime;<br />
            Console.WriteLine("Sorted List Test: " + duration.ToString() + " Input: " + loopSize + " " + multiplier + " List Size: " + words.Count);<br />
        }<br />
    }<br />
}</string></code></p>
<p>Code for SortedDictionaryTest.cs</p>
<p><code>using System;<br />
using System.Collections.Generic;<br />
using System.Text;</code></p>
<p><code>namespace SortTest<br />
{<br />
    class SortedDictionaryTest<br />
    {<br />
        private static SortedDictionary<string , char> words = null;</string></code></p>
<p><code>        public static void run(int loopSize, int multiplier)<br />
        {<br />
            words = new SortedDictionary<string , char>();<br />
            DateTime startTime = DateTime.Now;<br />
            Random rand = new Random();<br />
            int i;<br />
            for (int j = 0; j != loopSize; j++)<br />
            {<br />
                i = (int)(rand.NextDouble() * multiplier);<br />
                try<br />
                {<br />
                    string s = i.ToString();<br />
                    words.Add(s, s[0]);<br />
                }<br />
                catch (Exception e)<br />
                {<br />
                    continue;<br />
                }<br />
            }<br />
            DateTime stopTime = DateTime.Now;<br />
            TimeSpan duration = stopTime - startTime;<br />
            Console.WriteLine("Sorted Dictionary Test: " + duration.ToString() + " Input: " + loopSize + " " + multiplier + " List Size: " + words.Count);<br />
        }<br />
    }<br />
}</string></code></p>
<p>Code for UniqueListTest.cs</p>
<p><code>using System;<br />
using System.Collections.Generic;<br />
using System.Text;</code></p>
<p><code>namespace SortTest<br />
{<br />
    class UniqueListTest<br />
    {<br />
        private static List<string> words = null;</string></code></p>
<p><code>        public static void run(int loopSize, int multiplier)<br />
        {<br />
            words = new List<string>();<br />
            DateTime startTime = DateTime.Now;<br />
            Random rand = new Random();<br />
            int i;<br />
            for (int j = 0; j != loopSize; j++)<br />
            {<br />
                i = (int)(rand.NextDouble() * multiplier);<br />
                try<br />
                {<br />
                    string s = i.ToString();<br />
                    bool matchfound = false;<br />
                    foreach (string w in words) // ignore duplicates<br />
                    {</string></code></p>
<p><code>                        if (w == s)<br />
                        {<br />
                            matchfound = true;<br />
                            break;<br />
                        }<br />
                    }<br />
                    if (!matchfound) words.Add(s);<br />
                }<br />
                catch (Exception e)<br />
                {<br />
                    continue;<br />
                }<br />
            }<br />
            words.Sort();<br />
            DateTime stopTime = DateTime.Now;<br />
            TimeSpan duration = stopTime - startTime;<br />
            Console.WriteLine("Unique List Test: " + duration.ToString() + " Input: " + loopSize + " " + multiplier + " List Size: " + words.Count);<br />
        }<br />
    }<br />
}</code></p>
<p>Code for DuplicateListTest.cs</p>
<p><code>using System;<br />
using System.Collections.Generic;<br />
using System.Text;</code></p>
<p><code>namespace SortTest<br />
{<br />
    class DuplicateListTest<br />
    {</code></p>
<p>        <code>private static List<string> words = null;</string></code></p>
<p><code>        public static void run(int loopSize, int multiplier)<br />
        {<br />
            words = new List<string>();<br />
            DateTime startTime = DateTime.Now;<br />
            Random rand = new Random();<br />
            int i;<br />
            for (int j = 0; j != loopSize; j++)<br />
            {<br />
                i = (int)(rand.NextDouble() * multiplier);<br />
                try<br />
                {<br />
                    string s = i.ToString();<br />
                    words.Add(s);<br />
                }<br />
                catch (Exception e)<br />
                {<br />
                    continue;<br />
                }<br />
            }<br />
            words.Sort();<br />
            string prev = null;<br />
            for(int counter = 0; counter < words.Count; counter++)<br />
            {</code></p>
<p><code>                if (prev == words[counter])<br />
                {<br />
                    words.RemoveAt(counter);<br />
                    counter--;<br />
                }<br />
                prev = words[counter];<br />
            }<br />
            DateTime stopTime = DateTime.Now;<br />
            TimeSpan duration = stopTime - startTime;<br />
            Console.WriteLine("Duplicate List Test: " + duration.ToString() + " Input: " + loopSize + " " + multiplier + " List Size: " + words.Count);<br />
        }<br />
    }<br />
}</code></p>
<p></string></code>
<div class="social4i" style="height:29px;">
<div class="social4in" style="height:29px;float: left;">
<div class="socialicons s4twitter" style="float:left;margin-right: 10px;background:url(&quot;http://goo.gl/zjqd1&quot;) no-repeat;"><a href="http://twitter.com/share" data-url="http://www.bradheap.id.au/blog/2009/01/the-c-battle-of-the-sortedlist-sorteddictionary-and-list/" data-counturl="http://www.bradheap.id.au/blog/2009/01/the-c-battle-of-the-sortedlist-sorteddictionary-and-list/" data-text="The C# battle of the SortedList, SortedDictionary, and List" class="twitter-share-button" data-count="horizontal" data-via=""></a></div>
<div class="socialicons s4fblike" style="float:left;margin-right: 10px;">
<div id="fb-root"></div>
<p><fb:like href="http%3A%2F%2Fwww.bradheap.id.au%2Fblog%2F2009%2F01%2Fthe-c-battle-of-the-sortedlist-sorteddictionary-and-list%2F" send="false" layout="button_count" width="100" height="21" show_faces="false" font=""></fb:like></div>
<div class="socialicons s4plusone" style="float:left;margin-right: 10px;"><g:plusone size="medium" href="http://www.bradheap.id.au/blog/2009/01/the-c-battle-of-the-sortedlist-sorteddictionary-and-list/" count="true"></g:plusone></div>
</div>
<div style="clear:both"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bradheap.id.au/blog/2009/01/the-c-battle-of-the-sortedlist-sorteddictionary-and-list/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Word of the day: Reabsorbsinged</title>
		<link>http://www.bradheap.id.au/blog/2009/01/word-of-the-day-reabsorbsinged/</link>
		<comments>http://www.bradheap.id.au/blog/2009/01/word-of-the-day-reabsorbsinged/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 07:33:57 +0000</pubDate>
		<dc:creator>Brad Heap</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.brad.net.nz/blog/?p=939</guid>
		<description><![CDATA[Okay I got a lession in why you shouldn&#8217;t rush code on a Friday night. This morning on my internship I was cleaning up some code I had written last friday and making sure everything worked as planned. While checking &#8230; <a href="http://www.bradheap.id.au/blog/2009/01/word-of-the-day-reabsorbsinged/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Okay I got a lession in why you shouldn&#8217;t rush code on a Friday night.</p>
<p>This morning on my internship I was cleaning up some code I had written last friday and making sure everything worked as planned.</p>
<p>While checking some of the output of the program I came accross this word: Reabsorbsinged. I thought it looked a little odd and upon closer inspection of the code I found out why.</p>
<p>The word Reabsorbsinged is made up of one base word: absorb. From this you can combine prefix and suffix to build more words e.g. Reabsorb, Absorbs, Reabsorbs etc.</p>
<p>However in my blind coding last week I had failed to realise a cruicial mistake I had made when trying to take a shortcut. I had fed my input variable into a function and overwritten it at the sametime. This is a good trick if you want to minimise memory and you don&#8217;t need to worry if you input variable is overwritten.</p>
<p>Unfortunately I needed my input variable to stay intact to be able to generate the other words (like above). Instead I ended up with just one huge word: re+absorb+s+ing+ed So like you end up with dick of the day in some jobs I now have word of the day.</p>
<p>And on an entirely different note:</p>
<p>I am currently converting the code that generated this mistake from c++ to c#. Easy enough C# is pretty similar to java and doesn&#8217;t have pointers, yes! However as I discovered it doesn&#8217;t have a string reverse function either.</p>
<p>Glancing on the internet there are a few around pretty much going from extremely long and memory expensive, i.e. copying each character onto a new string at each step, or extremely quick but near impossible to read, understand or debug. So I got smart and wrote my on.</p>
<p>The code was a long the lines of this:</p>
<p><code><br />
string normalString = "abcdef";<br />
char[] tempString = normalString.toCharArray();<br />
for(int i=0; i &lt; tempString.length / 2; i++) {<br />
char tempc = tempString[i];<br />
tempString[i] = tempString[tempString.length - i -1];<br />
tempString[tempString.length - i - 1] = tempc;<br />
}<br />
string reversedString = tempString.ToString();<br />
</code>
<div class="social4i" style="height:29px;">
<div class="social4in" style="height:29px;float: left;">
<div class="socialicons s4twitter" style="float:left;margin-right: 10px;background:url(&quot;http://goo.gl/zjqd1&quot;) no-repeat;"><a href="http://twitter.com/share" data-url="http://www.bradheap.id.au/blog/2009/01/word-of-the-day-reabsorbsinged/" data-counturl="http://www.bradheap.id.au/blog/2009/01/word-of-the-day-reabsorbsinged/" data-text="Word of the day: Reabsorbsinged" class="twitter-share-button" data-count="horizontal" data-via=""></a></div>
<div class="socialicons s4fblike" style="float:left;margin-right: 10px;">
<div id="fb-root"></div>
<p><fb:like href="http%3A%2F%2Fwww.bradheap.id.au%2Fblog%2F2009%2F01%2Fword-of-the-day-reabsorbsinged%2F" send="false" layout="button_count" width="100" height="21" show_faces="false" font=""></fb:like></div>
<div class="socialicons s4plusone" style="float:left;margin-right: 10px;"><g:plusone size="medium" href="http://www.bradheap.id.au/blog/2009/01/word-of-the-day-reabsorbsinged/" count="true"></g:plusone></div>
</div>
<div style="clear:both"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bradheap.id.au/blog/2009/01/word-of-the-day-reabsorbsinged/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

