<?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; Programming</title>
	<atom:link href="http://www.bradheap.id.au/blog/tag/programming/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>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>
		<item>
		<title>The ongoing Toll Road Website Saga</title>
		<link>http://www.bradheap.id.au/blog/2009/01/the-ongoing-toll-road-website-saga/</link>
		<comments>http://www.bradheap.id.au/blog/2009/01/the-ongoing-toll-road-website-saga/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 07:56:44 +0000</pubDate>
		<dc:creator>Brad Heap</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[New Zealand]]></category>
		<category><![CDATA[News & Current Events]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[NZTA]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Roads]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.brad.net.nz/blog/?p=909</guid>
		<description><![CDATA[And today&#8217;s other top story. NZTA was told in mid December they had security issues but did nothing. http://www.nzherald.co.nz/technology/news/article.cfm?c_id=5&#38;objectid=10550914]]></description>
			<content:encoded><![CDATA[<p>And today&#8217;s other top story.</p>
<p>NZTA was told in mid December they had security issues but did nothing.</p>
<p><a href="http://www.nzherald.co.nz/technology/news/article.cfm?c_id=5&amp;objectid=10550914" target="_blank">http://www.nzherald.co.nz/technology/news/article.cfm?c_id=5&amp;objectid=10550914</a>
<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-ongoing-toll-road-website-saga/" data-counturl="http://www.bradheap.id.au/blog/2009/01/the-ongoing-toll-road-website-saga/" data-text="The ongoing Toll Road Website Saga" 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-ongoing-toll-road-website-saga%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-ongoing-toll-road-website-saga/" 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-ongoing-toll-road-website-saga/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Does the NZTA even know what HTTPS is?</title>
		<link>http://www.bradheap.id.au/blog/2009/01/does-the-nzta-even-know-what-https-is/</link>
		<comments>http://www.bradheap.id.au/blog/2009/01/does-the-nzta-even-know-what-https-is/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 06:59:29 +0000</pubDate>
		<dc:creator>Brad Heap</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[New Zealand]]></category>
		<category><![CDATA[News & Current Events]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[NZTA]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Roads]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.brad.net.nz/blog/?p=900</guid>
		<description><![CDATA[I have been laughing over the last few days as the New Zealand Transport Authority has become more red faced over the massive security hole in their toll road payment system. On January 25 the Silverdale to Puhoi motorway extension &#8230; <a href="http://www.bradheap.id.au/blog/2009/01/does-the-nzta-even-know-what-https-is/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have been laughing over the last few days as the New Zealand Transport Authority has become more red faced over the massive security hole in their toll road payment system.</p>
<p>On January 25 the Silverdale to Puhoi motorway extension will open, however to drive on it you will need to pay tolls, and for the last two months or so the NZTA have been advertising the www.tollroad.govt.nz website heavily so regulary uses of the new road can set up accounts.</p>
<p>On Monday a computer user realised that the website was not encrypting credit card information which means that anyone who knows anything about packet snifting or the like could intercept peoples credit card details as they used the website.</p>
<p>Now first and foremost this should never happen. Not on any ecommerce site, let alone a government website. Ecommerce programing 101 would surely teach you that first you must always encrypt data through using SSL and HTTPS not plain HTTP.</p>
<p>But what was more funny is that the red faced NZTA denied that there was anything wrong with the site! Refusing to take it offline or stop processing accounts.</p>
<p>That was until today when with egg on their face they took down the site for maintenance and admitted they stuffed up. Time to get new programmers one thinks.</p>
<p>Read more here:</p>
<p><a href="http://www.nzherald.co.nz/connect/news/article.cfm?c_id=1501833&amp;objectid=10550614" target="_blank">http://www.nzherald.co.nz/connect/news/article.cfm?c_id=1501833&amp;objectid=10550614</a></p>
<p>and</p>
<p><a href="http://www.nzherald.co.nz/nz/news/article.cfm?c_id=1&amp;objectid=10550744" target="_blank">http://www.nzherald.co.nz/nz/news/article.cfm?c_id=1&amp;objectid=10550744</a></p>
<p><img src="http://www.metservice.co.nz/phpads/adimage.php?filename=760x120.gif&#038;contenttype=gif"/>
<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/does-the-nzta-even-know-what-https-is/" data-counturl="http://www.bradheap.id.au/blog/2009/01/does-the-nzta-even-know-what-https-is/" data-text="Does the NZTA even know what HTTPS is?" 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%2Fdoes-the-nzta-even-know-what-https-is%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/does-the-nzta-even-know-what-https-is/" count="true"></g:plusone></div>
</div>
<div style="clear:both"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bradheap.id.au/blog/2009/01/does-the-nzta-even-know-what-https-is/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JOGL Rocks!</title>
		<link>http://www.bradheap.id.au/blog/2008/08/jogl-rocks/</link>
		<comments>http://www.bradheap.id.au/blog/2008/08/jogl-rocks/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 11:22:35 +0000</pubDate>
		<dc:creator>Brad Heap</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Cool Stuff]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JOGL]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Simulation]]></category>
		<category><![CDATA[Traffic]]></category>

		<guid isPermaLink="false">http://www.brad.net.nz/blog/?p=541</guid>
		<description><![CDATA[For the past few weeks I have been thinking seriously about heading back to uni to complete my honours degree. Currently some of the team in Computer Science at Massey have been playing with JOGL. I had a look at &#8230; <a href="http://www.bradheap.id.au/blog/2008/08/jogl-rocks/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For the past few weeks I have been thinking seriously about heading back to uni to complete my honours degree.</p>
<p>Currently some of the team in Computer Science at Massey have been playing with JOGL.</p>
<p>I had a look at it the other day but didn&#8217;t get very far. Well tonight I decided to really get my hands dirty.</p>
<p>And it rocks! Im currently seeing if I can convert my traffic simulator to JOGL.</p>
<p>Will keep this blog posted on updates.
<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/2008/08/jogl-rocks/" data-counturl="http://www.bradheap.id.au/blog/2008/08/jogl-rocks/" data-text="JOGL Rocks!" 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%2F2008%2F08%2Fjogl-rocks%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/2008/08/jogl-rocks/" count="true"></g:plusone></div>
</div>
<div style="clear:both"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bradheap.id.au/blog/2008/08/jogl-rocks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code to make my day!</title>
		<link>http://www.bradheap.id.au/blog/2008/01/code-to-make-my-day/</link>
		<comments>http://www.bradheap.id.au/blog/2008/01/code-to-make-my-day/#comments</comments>
		<pubDate>Sat, 19 Jan 2008 01:53:14 +0000</pubDate>
		<dc:creator>Brad Heap</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.brad.net.nz/blog/2008/01/code-to-make-my-day/</guid>
		<description><![CDATA[I am currently working on a complex website that requires two different companies on two different domains to share the same website. I have just mananged to create a piece of php code to analyse the domain name typed in &#8230; <a href="http://www.bradheap.id.au/blog/2008/01/code-to-make-my-day/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I am currently working on a complex website that requires two different companies on two different domains to share the same website. I have just mananged to create a piece of php code to analyse the domain name typed in and redirect to the correct section of the site for that company. Awesome!</p>
<blockquote><p>$url = $_SERVER['HTTP_HOST'];<br />
if(strpos( strtolower($url), &#8220;site2&#8243; )!=FALSE) {<br />
header(&#8216;location:site2/index.php&#8217;);<br />
} else {<br />
header(&#8216;location:site1/index.php&#8217;);<br />
}</p></blockquote>
<p>It is not often that code makes me happy.
<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/2008/01/code-to-make-my-day/" data-counturl="http://www.bradheap.id.au/blog/2008/01/code-to-make-my-day/" data-text="Code to make my day!" 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%2F2008%2F01%2Fcode-to-make-my-day%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/2008/01/code-to-make-my-day/" count="true"></g:plusone></div>
</div>
<div style="clear:both"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bradheap.id.au/blog/2008/01/code-to-make-my-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Year, New Website</title>
		<link>http://www.bradheap.id.au/blog/2008/01/new-year-new-website/</link>
		<comments>http://www.bradheap.id.au/blog/2008/01/new-year-new-website/#comments</comments>
		<pubDate>Sun, 06 Jan 2008 00:19:32 +0000</pubDate>
		<dc:creator>Brad Heap</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.brad.net.nz/blog/2008/01/new-year-new-website/</guid>
		<description><![CDATA[I have just rolled out a complete overhaul of my website. The changes in summary: New: Blog comments are back &#8211; provided I don&#8217;t get too much spam they will stay. Java Web Start for software section Text versions of &#8230; <a href="http://www.bradheap.id.au/blog/2008/01/new-year-new-website/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have just rolled out a complete overhaul of my website.</p>
<p>The changes in summary:</p>
<p>New:</p>
<ul>
<li>Blog comments are back &#8211; provided I don&#8217;t get too much spam they will stay.</li>
<li>Java Web Start for software section</li>
<li>Text versions of many articles</li>
</ul>
<p>Updated:</p>
<ul>
<li>About me page</li>
<li>Articles portfolio</li>
<li>Website portfolio</li>
<li>Software portfolio</li>
<li>Photos</li>
</ul>
<p>Deleted:</p>
<ul>
<li>Homepage &#8211; Replaced with blog</li>
<li>Outdoor Activities</li>
<li>Links &#8211; Blogroll will be its replacement</li>
<li>Other stuff I can&#8217;t remember</li>
</ul>
<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/2008/01/new-year-new-website/" data-counturl="http://www.bradheap.id.au/blog/2008/01/new-year-new-website/" data-text="New Year, New Website" 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%2F2008%2F01%2Fnew-year-new-website%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/2008/01/new-year-new-website/" count="true"></g:plusone></div>
</div>
<div style="clear:both"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bradheap.id.au/blog/2008/01/new-year-new-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

