<?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>Defcon3 by Fredre</title>
	<atom:link href="http://fredreh.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://fredreh.wordpress.com</link>
	<description>Still thinking of a tagline</description>
	<lastBuildDate>Fri, 09 Dec 2011 05:21:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='fredreh.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Defcon3 by Fredre</title>
		<link>http://fredreh.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://fredreh.wordpress.com/osd.xml" title="Defcon3 by Fredre" />
	<atom:link rel='hub' href='http://fredreh.wordpress.com/?pushpress=hub'/>
		<item>
		<title>How to add a ppa key if you are behind a restrictive firewall (port 11371 is blocked)</title>
		<link>http://fredreh.wordpress.com/2011/12/07/how-to-add-a-ppa-key-if-you-are-behind-a-restrictive-firewall-port-11371-is-blocked/</link>
		<comments>http://fredreh.wordpress.com/2011/12/07/how-to-add-a-ppa-key-if-you-are-behind-a-restrictive-firewall-port-11371-is-blocked/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 09:43:39 +0000</pubDate>
		<dc:creator>fredreh</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://fredreh.wordpress.com/?p=201</guid>
		<description><![CDATA[Before you can begin to use an Ubuntu ppa you have to add the signing key. The instruction on the ppa is very clear on how to do this.  (sudo add-apt-repository ppa:user/ppa-name) The problem with this approach is that gpg will request the key over port 11371 that may be blocked by you corporate firewall. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredreh.wordpress.com&amp;blog=3067023&amp;post=201&amp;subd=fredreh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Before you can begin to use an Ubuntu ppa you have to add the signing key.</p>
<p>The instruction on the ppa is very clear on how to do this.  (<code>sudo add-apt-repository ppa:user/ppa-name</code>)</p>
<p>The problem with this approach is that gpg will request the key over port 11371 that may be blocked by you corporate firewall. Trying to add the Firefox Stable Channel Packages (https://launchpad.net/~mozillateam/+archive/firefox-stable) with command:</p>
<p>sudo add-apt-repository ppa:mozillateam/firefox-stable</p>
<p>I get the following errors:</p>
<p>gpg: requesting key CE49EC21 from hkp server keyserver.ubuntu.com<br />
gpgkeys: HTTP fetch error 7: couldn&#8217;t connect to host<br />
gpg: no valid OpenPGP data found.<br />
gpg: Total number processed: 0</p>
<p>The solution to this problem is to download the key from the ubuntu key server manually.</p>
<p>On the ppa page look for the key server link located under the heading &#8220;Signing key:&#8221; in the case of the firefox ppa the link was:</p>
<p>http://keyserver.ubuntu.com:11371/pks/lookup?search=0x0AB215679C571D1C8325275B9BDB3D89CE49EC21&#038;op=index</p>
<p>Notice how the port 11371 is used ;(</p>
<p>Take the link and change the 11371 to 80 as shown below</p>
<p>http://keyserver.ubuntu.com:80/pks/lookup?search=0x0AB215679C571D1C8325275B9BDB3D89CE49EC21&#038;op=index</p>
<p>Open the changed link in your browser if everything went well you should see a big heading saying &#8220;Search results for &#8230;..&#8221;</p>
<p>Below the heading click on the key id link (it is the first one) in the case of the firefox ppa the link was:</p>
<p>http://keyserver.ubuntu.com/pks/lookup?op=get&#038;search=0x9BDB3D89CE49EC21</p>
<p>You should now see a heading &#8220;Public Key Server &#8212; Get &#8230;..&#8221; with the key information below:</p>
<pre>-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: SKS 1.0.10
...
...
...
-----END PGP PUBLIC KEY BLOCK-----</pre>
<p>Copy the key text into a new file named key.txt and save the file. (Dont copy the page heading)</p>
<p>Now that you have the key open a terminal and navigate to the same directory were you key is saved. Mine was saved as key.txt in the home directory</p>
<p>Add the key using the command</p>
<p>sudo apt-key add ./key.txt</p>
<p>If all went well you should see the message:</p>
<p>OK</p>
<p>Now you can do the normal sudo apt-get update and sudo apt-get upgrade. Or install the software however you like.</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredreh.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredreh.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredreh.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredreh.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fredreh.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fredreh.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fredreh.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fredreh.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredreh.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredreh.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredreh.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredreh.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredreh.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredreh.wordpress.com/201/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredreh.wordpress.com&amp;blog=3067023&amp;post=201&amp;subd=fredreh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fredreh.wordpress.com/2011/12/07/how-to-add-a-ppa-key-if-you-are-behind-a-restrictive-firewall-port-11371-is-blocked/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/261c50bef03f7c2ca33d339bd785c3a3?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">fredreh</media:title>
		</media:content>
	</item>
		<item>
		<title>2010 in review</title>
		<link>http://fredreh.wordpress.com/2011/01/02/2010-in-review/</link>
		<comments>http://fredreh.wordpress.com/2011/01/02/2010-in-review/#comments</comments>
		<pubDate>Sun, 02 Jan 2011 17:14:09 +0000</pubDate>
		<dc:creator>fredreh</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://fredreh.wordpress.com/?p=196</guid>
		<description><![CDATA[Dear InterWeb Happy new year !!!! My new years resolution is to try and understand what is so great about twitter,[IMPOSSIBLE] and also to write at least one blog post this year [DONE]. In the meanwhile feast your eyes on my wonderful blog stats for 2010 I believe it is only a matter of time [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredreh.wordpress.com&amp;blog=3067023&amp;post=196&amp;subd=fredreh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Dear InterWeb</p>
<p>Happy new year !!!!</p>
<p>My new years resolution is to try and understand what is so great about twitter,[IMPOSSIBLE]</p>
<p>and also to write at least one blog post this year [DONE].</p>
<p>In the meanwhile feast your eyes on my wonderful blog stats for 2010 I believe it is only a matter of time before I become an Internet celebrity <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here&#8217;s a high level summary of its overall blog health:</p>
<p><img style="border:1px solid #ddd;background:#f5f5f5;padding:20px;" src="http://s0.wp.com/i/annual-recap/meter-healthy2.gif" alt="Healthy blog!" width="250" height="183" /></p>
<p>The <em>Blog-Health-o-Meter™</em> reads This blog is doing awesome!.</p>
<h2>Crunchy numbers</h2>
<p><a href="http://fredreh.files.wordpress.com/2008/06/gimp3.png"><img style="max-height:230px;float:right;border:1px solid #ddd;background:#fff;margin:0 0 1em 1em;padding:6px;" src="http://fredreh.files.wordpress.com/2008/06/gimp3.png?w=288" alt="Featured image" /></a></p>
<p>A Boeing 747-400 passenger jet can hold 416 passengers.  This blog was viewed about <strong>8,200</strong> times in 2010.  That&#8217;s about 20 full 747s.</p>
<p>&nbsp;</p>
<p>In 2010, there were <strong>2</strong> new posts, growing the total archive of this blog to 33 posts.</p>
<p>The busiest day of the year was November 10th with <strong>52</strong> views. The most popular post that day was <a style="color:#08c;" href="http://fredreh.wordpress.com/2008/06/01/gimp-for-dummies-how-to-highlight-part-of-image/">GIMP for dummies &#8211; How to highlight part of image !!!!!!</a>.</p>
<h2>Where did they come from?</h2>
<p>The top referring sites in 2010 were <strong>google.com</strong>, <strong>search.conduit.com</strong>, <strong>google.co.in</strong>, <strong>google.co.za</strong>, and <strong>hoiantoday.info</strong>.</p>
<p>Some visitors came searching, mostly for <strong>gimp highlight</strong>, <strong>banshee media player</strong>, <strong>gimp for dummies</strong>, <strong>highlight in gimp</strong>, and <strong>how to highlight in gimp</strong>.</p>
<h2>Attractions in 2010</h2>
<p>These are the posts and pages that got the most views in 2010.</p>
<div style="clear:left;float:left;font-size:24pt;line-height:1em;margin:-5px 10px 20px 0;">1</div>
<p><a style="margin-right:10px;" href="http://fredreh.wordpress.com/2008/06/01/gimp-for-dummies-how-to-highlight-part-of-image/">GIMP for dummies &#8211; How to highlight part of image !!!!!!</a> <span style="color:#999;font-size:8pt;">June 2008</span><br />
12 comments</p>
<div style="clear:left;float:left;font-size:24pt;line-height:1em;margin:-5px 10px 20px 0;">2</div>
<p><a style="margin-right:10px;" href="http://fredreh.wordpress.com/2008/06/12/insert-date-time-in-netbeans-module/">Insert Date Time in NetBeans &#8211; Module</a> <span style="color:#999;font-size:8pt;">June 2008</span><br />
3 comments</p>
<div style="clear:left;float:left;font-size:24pt;line-height:1em;margin:-5px 10px 20px 0;">3</div>
<p><a style="margin-right:10px;" href="http://fredreh.wordpress.com/my-projects/netbeans-insert-date-time-plug-in-module/">NetBeans Insert Date Time plug in (module)</a> <span style="color:#999;font-size:8pt;">June 2008</span><br />
6 comments</p>
<div style="clear:left;float:left;font-size:24pt;line-height:1em;margin:-5px 10px 20px 0;">4</div>
<p><a style="margin-right:10px;" href="http://fredreh.wordpress.com/2008/07/23/afrikaans-spellchecker-in-web-browser-firefox/">Afrikaans spell checker in Web-browser (Firefox)</a> <span style="color:#999;font-size:8pt;">July 2008</span><br />
1 comment</p>
<div style="clear:left;float:left;font-size:24pt;line-height:1em;margin:-5px 10px 20px 0;">5</div>
<p><a style="margin-right:10px;" href="http://fredreh.wordpress.com/2008/07/15/how-2-view-images-in-the-terminal-command-line-console/">How 2: View Images in the Terminal (Command line, Console)</a> <span style="color:#999;font-size:8pt;">July 2008</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredreh.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredreh.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredreh.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredreh.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fredreh.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fredreh.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fredreh.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fredreh.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredreh.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredreh.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredreh.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredreh.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredreh.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredreh.wordpress.com/196/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredreh.wordpress.com&amp;blog=3067023&amp;post=196&amp;subd=fredreh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fredreh.wordpress.com/2011/01/02/2010-in-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/261c50bef03f7c2ca33d339bd785c3a3?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">fredreh</media:title>
		</media:content>

		<media:content url="http://s0.wp.com/i/annual-recap/meter-healthy2.gif" medium="image">
			<media:title type="html">Healthy blog!</media:title>
		</media:content>

		<media:content url="http://fredreh.files.wordpress.com/2008/06/gimp3.png?w=288" medium="image">
			<media:title type="html">Featured image</media:title>
		</media:content>
	</item>
		<item>
		<title>My Ubuntu IRC friends</title>
		<link>http://fredreh.wordpress.com/2010/09/04/my-ubuntu-irc-friends/</link>
		<comments>http://fredreh.wordpress.com/2010/09/04/my-ubuntu-irc-friends/#comments</comments>
		<pubDate>Sat, 04 Sep 2010 11:52:02 +0000</pubDate>
		<dc:creator>fredreh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fredreh.wordpress.com/?p=189</guid>
		<description><![CDATA[I have never been a heavy IRC user. IRC version 1 There has been times (long ago) when I would chat around on various South-African servers mostly to try and pickup girls (without any success) or to chat in &#8220;hacker&#8221; and programming channels trying to impress everyone with my &#8220;skillz&#8221; (you do stupid things when [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredreh.wordpress.com&amp;blog=3067023&amp;post=189&amp;subd=fredreh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have never been a heavy IRC user.</p>
<p><strong>IRC version 1</strong></p>
<p>There has been times (long ago) when I would chat around on various South-African servers mostly to try and pickup girls (without any success) or to chat in &#8220;hacker&#8221; and programming channels trying to impress everyone with my &#8220;skillz&#8221; (you do stupid things when you are young) I even played a game or two.</p>
<p><strong>IRC version 2<br />
</strong></p>
<p>My second go at the IRC thing came in March of this year when when I joined the #ubuntu-za and #ubuntu-afr channels on freenode. I even registered my nick:</p>
<p>-Notice- {from NickServ} Registered : Mar 04 09:44:48 2010 (26 weeks, 2 days, 00:56:03 ago)</p>
<p>The only reason I did this was because I was bored between classes and  I thought  it would be interesting to chat to a few other South-African Linux users.</p>
<p>The first few server and channel combinations did not deliver much. The people mostly want to debate the whole Microsoft vs Linux thing or talk about how bad all the other operating system are. There was also a lot of mine is bigger then yours mostly IRC version 1 stuff</p>
<p>I have not used Ubuntu since the beginning of the year on any of my own systems rather opting for Arch but decided to try the Ubuntu-Za loco channels and I was pleasantly surprised !!! So what makes chatting on the ubuntu-za loco channels so nice ?</p>
<ul>
<li>Everyone is friendly</li>
<li>No mine is bigger then yours talk</li>
<li>The people</li>
<li>I have never seen anyone talk down to new users or say things like RTFM</li>
<li>No basing Microsoft constantly</li>
<li>Again the people</li>
<li>I can speak afrikaans in #ubuntu-afr</li>
</ul>
<p>I don&#8217;t say much most of the time and <a href="http://mileyssignificantblog.blogspot.com/2010/09/data-loss.html" target="_blank">try to help other people when and where I can</a>. The only strange thing about this is that I now spend time in the channels of a distro that I am no longer using, luckily nobody seems to mind and from what I have seen even Windows / Mac user would be more then welcome.</p>
<p>So if you are looking for a few nice South-Africans who also like open-source and Linux drop in and say hello you might just make a few new Ubuntu IRC friends.</p>
<p><strong>ps.</strong></p>
<p>Need help getting started with IRC ? Just ask your question in the comment section or <a href="http://ubuntu-za.org/get-support" target="_blank">click here</a></p>
<p><a href="http://ubuntu-za.org/" target="_blank">For more info on Ubuntu-Za click  here to go to their website </a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredreh.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredreh.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredreh.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredreh.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fredreh.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fredreh.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fredreh.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fredreh.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredreh.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredreh.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredreh.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredreh.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredreh.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredreh.wordpress.com/189/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredreh.wordpress.com&amp;blog=3067023&amp;post=189&amp;subd=fredreh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fredreh.wordpress.com/2010/09/04/my-ubuntu-irc-friends/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/261c50bef03f7c2ca33d339bd785c3a3?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">fredreh</media:title>
		</media:content>
	</item>
		<item>
		<title>My first IDE</title>
		<link>http://fredreh.wordpress.com/2010/04/02/my-first-ide/</link>
		<comments>http://fredreh.wordpress.com/2010/04/02/my-first-ide/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 12:22:49 +0000</pubDate>
		<dc:creator>fredreh</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://fredreh.wordpress.com/?p=34</guid>
		<description><![CDATA[Wikipedia defines an IDE as: &#8220;integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of a source code editor, a compiler and/or interpreter, build automation tools, and (usually) a debugger.&#8221; QBasic The first  programs I wrote was in BASIC  using my P1 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredreh.wordpress.com&amp;blog=3067023&amp;post=34&amp;subd=fredreh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Wikipedia defines an IDE  as:</p>
<p>&#8220;<strong>integrated development environment</strong> (<strong>IDE</strong>) is a <a class="mw-redirect" title="Software application" href="http://en.wikipedia.org/wiki/Software_application">software application</a> that provides comprehensive facilities to <a class="mw-redirect" title="Computer programmer" href="http://en.wikipedia.org/wiki/Computer_programmer">computer programmers</a> for <a title="Software development" href="http://en.wikipedia.org/wiki/Software_development">software development</a>. An IDE normally consists of a <a title="Source code editor" href="http://en.wikipedia.org/wiki/Source_code_editor">source code editor</a>, a <a title="Compiler" href="http://en.wikipedia.org/wiki/Compiler">compiler</a> and/or <a title="Interpreter (computing)" href="http://en.wikipedia.org/wiki/Interpreter_%28computing%29">interpreter</a>, <a title="Build automation" href="http://en.wikipedia.org/wiki/Build_automation">build automation</a> tools, and (usually) a <a title="Debugger" href="http://en.wikipedia.org/wiki/Debugger">debugger</a>.&#8221;</p>
<p><strong>QBasic</strong></p>
<p>The first  programs I wrote was in BASIC  using my P1 75 Mhz computer.</p>
<p>Back in primary school the IT teacher gave BASIC lessons at R10 a hour giving me my first taste of programming.</p>
<p>A little more research on Wikipedia revealed that I was actually using a variant of BASIC called QuickBasic.</p>
<p>So my first ever IDE was QBasic:</p>
<p>&#8220;<strong>QBasic</strong> is an <a title="Integrated development environment" href="http://en.wikipedia.org/wiki/Integrated_development_environment">IDE</a> and <a title="Interpreted language" href="http://en.wikipedia.org/wiki/Interpreted_language">interpreter</a> for a variant of the <a class="mw-redirect" title="BASIC programming language" href="http://en.wikipedia.org/wiki/BASIC_programming_language">BASIC programming language</a> which is based on <a class="mw-redirect" title="QuickBasic" href="http://en.wikipedia.org/wiki/QuickBasic">QuickBasic</a>. Code entered into the IDE is compiled to an intermediate form, and this intermediate form is immediately interpreted on demand within the IDE.&#8221;</p>
<p><a href="http://fredreh.files.wordpress.com/2008/05/qbasic_opening_screen.png"><img class="aligncenter size-medium wp-image-35" src="http://fredreh.files.wordpress.com/2008/05/qbasic_opening_screen.png?w=300&#038;h=225" alt="QBasic IDE" width="300" height="225" /></a></p>
<p>Don&#8217;t you just love the good old days&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredreh.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredreh.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredreh.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredreh.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fredreh.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fredreh.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fredreh.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fredreh.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredreh.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredreh.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredreh.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredreh.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredreh.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredreh.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredreh.wordpress.com&amp;blog=3067023&amp;post=34&amp;subd=fredreh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fredreh.wordpress.com/2010/04/02/my-first-ide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/261c50bef03f7c2ca33d339bd785c3a3?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">fredreh</media:title>
		</media:content>

		<media:content url="http://fredreh.files.wordpress.com/2008/05/qbasic_opening_screen.png?w=300" medium="image">
			<media:title type="html">QBasic IDE</media:title>
		</media:content>
	</item>
		<item>
		<title>C Tutorial: switch, loops, and recursive functions</title>
		<link>http://fredreh.wordpress.com/2009/08/25/c-tutorial-switch-loops-and-recursive-functions/</link>
		<comments>http://fredreh.wordpress.com/2009/08/25/c-tutorial-switch-loops-and-recursive-functions/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 08:04:32 +0000</pubDate>
		<dc:creator>fredreh</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://fredreh.wordpress.com/?p=170</guid>
		<description><![CDATA[This is the Tutorial I recently created for my Software Design students that we use during lab time here at the university. SFD is a basic intro to C type subject. I cannot post the other tutorials since they have been created by other lecturers but this one I can share. Enjoy !!! Tutorial 5 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredreh.wordpress.com&amp;blog=3067023&amp;post=170&amp;subd=fredreh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is the Tutorial I recently created for my Software Design students that we use during lab time here at the university. SFD is a basic intro to C type subject. I cannot post the other tutorials since they have been created by other lecturers but this one I can share. Enjoy !!!</p>
<p><strong>Tutorial 5 (Outcome 3 ,4)</strong></p>
<p><strong>Part 1:  switch Multiple-Selection Statement </strong></p>
<p>When testing for many conditions the if statements that will be needed will grow large and make the code of your program harder to read. There is also some performance loss when using the if statement to check the same variable for many conditions. So when checking one variable for many conditions it is better to use the switch statement.</p>
<p>The basic syntax for a switch statement is:</p>
<p>switch (variable)<br />
{</p>
<p>case test :<br />
statement(s) if is case is true<br />
break;</p>
<p>case test :<br />
statement(s) if is case is true<br />
even more statements<br />
break;</p>
<p>&#8230;</p>
<p>default:<br />
statement(s) if not one of the cases evaluated to true<br />
break;</p>
<p>}</p>
<p>variable is the variables value you want to test.<br />
test is the value you want to test variable for.<br />
the statement(s) is the code that is going to be executed if true.<br />
default: contains the code that is going to be executed if not one case evaluates to true.<br />
always remember to end the case with a break;</p>
<p>Lets look at example one that uses a switch statement. In the example the user is asked to enter a number (int) between 1 and 5. The program first checks if the number is between one and five using an if statement. Then it displays on the screen the number the user entered but it shows the number in word format. So if the user enters 5 the program will display FIVE. </p>
<div id="attachment_171" class="wp-caption aligncenter" style="width: 520px"><img src="http://fredreh.files.wordpress.com/2009/08/ex1.png?w=510&#038;h=603" alt="Example 1" title="Example 1" width="510" height="603" class="size-full wp-image-171" /><p class="wp-caption-text">Example 1</p></div>
<p>In example 1 the switch statement starts at line 25 and ends at line 47. In line 25 the variable number is sent to the switch. Line 28 contains the first case and checks if the number was 1. If the number was indeed one the program will move to line 29 were the printf() statement is executed. After the printf() in line 29 the program will encounter a break; statement in line 30 letting it know the case is done. If the number was not 1 the program moves to the next case etc.  </p>
<p>You would notice that the switch statement in example one does not contain a default case. This is because the default case is optional. We can rewrite the code in example 1 and add a default case to the switch statement. The default case will only be executed if no other cases matched. This means if the user did not enter a number between 1 and 5 the default statement will execute. Since we now have a default case we can remove the if statement on lines 15 &#8211; 22 that checks if the number is between 1 and 5. Example 2 contains a switch with a default statement:</p>
<p><img src="http://fredreh.files.wordpress.com/2009/08/ex2.png?w=510&#038;h=552" alt="Example 2" title="Example 2" width="510" height="552" class="aligncenter size-full wp-image-173" /></p>
<p>In example 2 the if statement was removed.  Line 38 &#8211; 43 now contains a default case. Note that each case including the default case ends with a break; statement. The break statement is very important since it tells the program that the statements in the case was executed and the program can now &#8220;break&#8221; out of the switch.</p>
<p><strong>Part 2: Loop structures</strong></p>
<p>Most programs contain structures known as loops. Loops allow for repetition in programs. Each loop structure will contain a number of instructions that gets repeated a certain number of times. The three basic loop structures are For, While and Do While.</p>
<p>Although the three types of loop structures do the same thing (repeat instructions) the way that they are implemented and used differ. Deciding on what type of loop structure to use will depend mostly on the type of repetition that is needed. The two types of repetition is Counter-controlled repetition and Sentinel-controlled repetition.</p>
<p>Counter-controlled repetition needs 3 things:</p>
<p>The loop counter that will count how many times the loop has been executed. The loop counter also needs an initial value.</p>
<p>The increment (+) or decrement (-) by which the loop counter is modified each time the loop is executed.</p>
<p>The  test to check the loop counter and determine if the loop should be executed again.</p>
<p><strong>Part 2.1: The while loop</strong></p>
<p>The while loop will execute its statements while a certain condition is true. The basic syntax for a while loop is as follows:</p>
<p>while(test condition = = true)<br />
{<br />
//Execute some statements like incrementing the counter<br />
}</p>
<p>Example 3 shows a basic while loop that will loop 10 times and display the counter. On line 8 the variable counter is created. counter Is the variable that will keep track of how many times the loop was executed and gets an initial value of 1. Line 10 &#8211; 15 contains the while loop. In line 10 one can see the test for the while loop. This loop will execute only while counter is less then or is 10. In line 14 after all the normal statements but still inside the loop counter is incremented with 1. This is done so that each time the loops executes counter gets larger by one until counter is more then 10 and the loop is not executed. If we do not increment counter at the end of each loop each time we will get what is called an infinite loop.</p>
<p>Infinite loops occur when the loop just gets executed for ever usually there is no way the test can result in false so the loop just keeps going. </p>
<p><img src="http://fredreh.files.wordpress.com/2009/08/ex3.png?w=510" alt="Example 3" title="Example 3"   class="aligncenter size-full wp-image-174" /></p>
<p><strong>Part 2.2: The for loop</strong></p>
<p>Unlike when using the while loop with the for loop you can initialise the counter, test the counter and increment / decrement the counter in one line. The syntax for the for loop is as follows:</p>
<p>for(assign value to counter ; test condition ; counter increment / decrement)<br />
{<br />
// Statements to execute<br />
} </p>
<p>Example 4 shows an for loop implementation that does exactly the same thing as example 3.</p>
<p><img src="http://fredreh.files.wordpress.com/2009/08/ex4.png?w=510&#038;h=303" alt="Example 4" title="Example 4" width="510" height="303" class="aligncenter size-full wp-image-175" /></p>
<p>In example 4 a variable counter is declared on line 8. counter Will keep track of how many times the loop has been executed. The for loop is located at line 10 &#8211; 13. The counter was set to 1 the test will make sure the counter is not more then ten before the loop is executed and the counter is incremented by 1 each time the loop is executed. This al happens in line 10.</p>
<p><strong>Part 2.3: The do&#8230;while loop</strong></p>
<p>Very similar to the while loop the do&#8230;while loop is only different in that it tests the loop condition at the end of the loop instead of the beginning. This means that the statements included in the loop body will be executed at least once before the test condition is evaluated. If after the initial execution the test condition evaluates to false the loop will not be executed again. You can use the do&#8230;while loop when you want to ensure the statements inside the loop is executed at least once in your application. The syntax for the do&#8230;while loop is:</p>
<p>do<br />
{<br />
	//Statements to be executed<br />
}<br />
while (condition)</p>
<p>Example 5 shows the do&#8230;while in action. Notice that even if the counter variable is set to more then 10 the statements will be executed at least once. This is different to the for and while loops that will first evaluate the test condition before any statements is executed:</p>
<p><img src="http://fredreh.files.wordpress.com/2009/08/ex5.png?w=510" alt="Example 5" title="Example 5"   class="aligncenter size-full wp-image-176" /></p>
<p>In example 5 a variable counter with default value 1 is created in line 8. The do&#8230;while statement is located in lines 6 -15. Notice how the while is located at the end in line 15. Also be sure to remember to increment the counter each time the loop is executed as in line 13.</p>
<p><strong>Part 2.4: break and continue</strong></p>
<p>We can use the break and continue statements to alter the flow of programs especially inside loops. </p>
<p>The break statement is used to exit the loop completely even if the next condition will still evaluate to true. We have used the break statement in the switch statement before to exit the switch after the cases statements have been executed. break Can perform the same function loops. </p>
<p>The continue statement will continue with next iteration of the loop ignoring any additional statements in the loop body after the statement.</p>
<p>Example program 6 shows the use of break and continue:</p>
<p><img src="http://fredreh.files.wordpress.com/2009/08/ex61.png?w=510" alt="Example 6" title="Example 6"   class="aligncenter size-full wp-image-178" /></p>
<p>Example program 6 tracks the numbers of years that the Dalton gang spends in jail. Line 6 -7 contains variables that is used in the program. jail_years is the number of years in jail and rnum is a random number between 0 &#8211; 10  </p>
<p>Line 13 &#8211; 39 contains the for loop. On line 13 a new for loop is created. The for loop is created in such a way that the loop will execute until a break statement is encountered. </p>
<p>The first statement in the the for loop (line 16) will use the the getran() function  (line 45 -54) to get a random number between 0 and 10.</p>
<p>The first if in the for loop will execute if the random number is 4 and then break out of the loop. A message is displayed showing that the Dalton gang breaks out of jail.</p>
<p>The second if in the for loop (line 28) will check if the random number is more then 5. If that is the case the number of years in jail will be incremented two times. The continue statement is then executed ignoring any other lines of code in the for loop (lines 37 &#8211; 38) .</p>
<p>If the random number was not more then 5 then the jail time is only incremented once in line 37.  </p>
<p><strong>Part 2.5: Nested loops</strong></p>
<p>Just like if statements loops can also be nested. A nested loop will contain an outer and inner loop. With nested loops the inner loop is executed for each time that the outer loop is executed. Example 7 shows a nested loop:</p>
<p><img src="http://fredreh.files.wordpress.com/2009/08/ex7.png?w=510&#038;h=380" alt="Example 7" title="Example 7" width="510" height="380" class="aligncenter size-full wp-image-179" /></p>
<p><strong>Part 3: Recursive functions</strong></p>
<p>A recursive function is  a function that calls itself repeatedly until some condition is met and the function can return a value. This sounds very much like loops and in a way they are the same. The most basic recursive function you can create is shown in example 8:</p>
<p><img src="http://fredreh.files.wordpress.com/2009/08/ex8.png?w=510" alt="Example 8" title="Example 8"   class="aligncenter size-full wp-image-180" /></p>
<p> In Example program 8 the function recurse(int count) (line 15) receives as an argument one integer. Then inside the function on line 18 the function calls itself with the original count + 1. This will lead to each instance of the recurse function receiving an argument that was incremented by one. The recurse function will keep calling itself and never return a value leading to an infinite recurse.</p>
<p>To make sure that the function does not just keep calling itself one needs to add a base case to the function. The base case is a condition that will return something from the function and stop the cycle of calls. </p>
<p>Example 9 shows a recursive function with a base case. The function will receive a number and start counting down until 0 is reached where it will the return 0 :</p>
<p><img src="http://fredreh.files.wordpress.com/2009/08/exp9.png?w=510&#038;h=302" alt="Example 9 " title="Example 9 " width="510" height="302" class="aligncenter size-full wp-image-181" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredreh.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredreh.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredreh.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredreh.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fredreh.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fredreh.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fredreh.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fredreh.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredreh.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredreh.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredreh.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredreh.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredreh.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredreh.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredreh.wordpress.com&amp;blog=3067023&amp;post=170&amp;subd=fredreh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fredreh.wordpress.com/2009/08/25/c-tutorial-switch-loops-and-recursive-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/261c50bef03f7c2ca33d339bd785c3a3?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">fredreh</media:title>
		</media:content>

		<media:content url="http://fredreh.files.wordpress.com/2009/08/ex1.png" medium="image">
			<media:title type="html">Example 1</media:title>
		</media:content>

		<media:content url="http://fredreh.files.wordpress.com/2009/08/ex2.png" medium="image">
			<media:title type="html">Example 2</media:title>
		</media:content>

		<media:content url="http://fredreh.files.wordpress.com/2009/08/ex3.png" medium="image">
			<media:title type="html">Example 3</media:title>
		</media:content>

		<media:content url="http://fredreh.files.wordpress.com/2009/08/ex4.png" medium="image">
			<media:title type="html">Example 4</media:title>
		</media:content>

		<media:content url="http://fredreh.files.wordpress.com/2009/08/ex5.png" medium="image">
			<media:title type="html">Example 5</media:title>
		</media:content>

		<media:content url="http://fredreh.files.wordpress.com/2009/08/ex61.png" medium="image">
			<media:title type="html">Example 6</media:title>
		</media:content>

		<media:content url="http://fredreh.files.wordpress.com/2009/08/ex7.png" medium="image">
			<media:title type="html">Example 7</media:title>
		</media:content>

		<media:content url="http://fredreh.files.wordpress.com/2009/08/ex8.png" medium="image">
			<media:title type="html">Example 8</media:title>
		</media:content>

		<media:content url="http://fredreh.files.wordpress.com/2009/08/exp9.png" medium="image">
			<media:title type="html">Example 9 </media:title>
		</media:content>
	</item>
		<item>
		<title>My Podcast selection</title>
		<link>http://fredreh.wordpress.com/2009/06/21/my-podcast-selection/</link>
		<comments>http://fredreh.wordpress.com/2009/06/21/my-podcast-selection/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 16:32:14 +0000</pubDate>
		<dc:creator>fredreh</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://fredreh.wordpress.com/?p=166</guid>
		<description><![CDATA[I have a 30 min drive to work each day. The road I use is single lane and used by big trucks, taxi&#8217;s and a wide array of mine vehicles. I always thought that taxi drivers were the worst but have since changed my mind. In my opinion the worst drivers are people driving mine [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredreh.wordpress.com&amp;blog=3067023&amp;post=166&amp;subd=fredreh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have a 30 min drive to work each day. The road I use is single lane and used by big trucks, taxi&#8217;s and a wide array of mine vehicles. I always thought that taxi drivers were the worst but have since changed my mind.</p>
<p>In my opinion the worst drivers are people driving mine vehicles especially the ones with 4&#215;4&#8242;s. But luckily I have found something to take my mind of the driving in a range of nice podcasts. This is my selection in order of preference:</p>
<p>1.  <a href="http://www.dancarlin.com/disp.php/hh">Dan Carlin&#8217;s Hardcore History</a></p>
<p>WOW History presented in an interesting and fun way. You can hear that Dan does much research before each show. The way he presents each topic makes you think differently about history and the present day.</p>
<p>2. <a href="http://www.thenakedscientists.com/">The Naked Scientists</a></p>
<p>Not just science news but also stuff you can do at home. Great for learning about all the different science fields </p>
<p>3. <a href="http://linuxoutlaws.com/">Linux Outlaws </a></p>
<p>Fabian and Dan are just two normal Linux users talking about Linux and related free/open source topics. The show always has a great selection of news and is probably the best pod cast when it comes to finding out what distribution released when. The Microwatch section also keeps tabs on what the evil Micro$oft is up to. </p>
<p>4. <a href="http://podcast.ubuntu-uk.org/">Ubuntu UK Podcast</a>   </p>
<p>A few Brits talking about Linux and Ubuntu. Because of their link to the Ubuntu distribution you get a good idea about the latest ongoings at Canonical and the Ubuntu distro. Also look out for the competitions.</p>
<p>There you go. If you have any other podcasts that you like please let me know so that I can try them.   </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredreh.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredreh.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredreh.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredreh.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fredreh.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fredreh.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fredreh.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fredreh.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredreh.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredreh.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredreh.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredreh.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredreh.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredreh.wordpress.com/166/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredreh.wordpress.com&amp;blog=3067023&amp;post=166&amp;subd=fredreh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fredreh.wordpress.com/2009/06/21/my-podcast-selection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/261c50bef03f7c2ca33d339bd785c3a3?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">fredreh</media:title>
		</media:content>
	</item>
		<item>
		<title>Google Web Toolkit (GWT) &#8211; Generate FileMenu from XML</title>
		<link>http://fredreh.wordpress.com/2009/06/21/google-web-toolkit-gwt-generate-filemenu-from-xml/</link>
		<comments>http://fredreh.wordpress.com/2009/06/21/google-web-toolkit-gwt-generate-filemenu-from-xml/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 09:48:06 +0000</pubDate>
		<dc:creator>fredreh</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://fredreh.wordpress.com/?p=159</guid>
		<description><![CDATA[I have been playing around with GWT the last few weeks and wrote a nice little function that reads a XML file and builds a FileMenu. Real GWT programmers will probably frown on the code but please keep in mind this is only for fun. The XML structure looks like this: links mainLink name='My Links' [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredreh.wordpress.com&amp;blog=3067023&amp;post=159&amp;subd=fredreh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have been playing around with GWT the last few weeks and wrote a nice little function that reads a XML file and builds a FileMenu.</p>
<p>Real GWT programmers will probably frown on the code but please keep in mind this is only for fun. The XML structure looks like this:</p>
<p><code><br />
links</p>
<p>mainLink name='My Links'<br />
subLink name='Blog' url='http://fredreh.wordpress.com' title='My Blog' /subLink<br />
subLink name='Facebook' url='http://facebook.com' title='See some friends' /subLink<br />
/mainLink</p>
<p>mainLink name='Test'<br />
subLink name='Tester' url='http://www.test.ac.za/' title='Tester' /subLink<br />
/mainLink</p>
<p>mainLink name='Search Engines'<br />
subLink name='Google' url='http://www.google.com/' title='Google'  /subLink<br />
subLink name='Wolfram' url='http://www.google.com/' title='Wolfram' /subLink<br />
/mainLink</p>
<p>/links<br />
</code></p>
<p>The file name is links.xml the function BuildMenu() looks like this:</p>
<p><code><br />
public void BuildMenu()<br />
{<br />
//Build the menus<br />
//The requist builder for the XML passwords<br />
RequestBuilder buildL = new RequestBuilder(RequestBuilder.GET,"links.xml");<br />
//The main menu<br />
final MenuBar linksmen = new MenuBar(true);<br />
try<br />
{<br />
buildL.sendRequest(null,new RequestCallback()<br />
{<br />
public void onError(Request request, Throwable exception)<br />
{<br />
Window.alert("Could not get a list of Links for MenuBar");<br />
}</code></p>
<p><code>public void onResponseReceived(Request request, Response response)<br />
{</p>
<p>//Check the xml file and load the nodes inside<br />
Element TopLvl = XMLParser.parse(response.getText()).getDocumentElement();</p>
<p>//Get a list of nodes under the main  node<br />
NodeList mainLink = TopLvl.getElementsByTagName("mainLink");</p>
<p>//Loop through the list of mainLink nodes<br />
for(int j=0;j&lt;mainLink.getLength();j++)<br />
{<br />
//Create the Element representing a<br />
Element main = (Element)mainLink.item(j);</p>
<p>//The menubar representing a<br />
MenuBar MLink = new MenuBar(true);</p>
<p>//A list of nodes inside the   each one is a<br />
NodeList subLink = main.getElementsByTagName("subLink");</p>
<p>//Loop through the list of subLink nodes<br />
for(int i=0;i&lt;subLink.getLength();i++)<br />
{<br />
//Create the Element representing a<br />
final Element sub = (Element)subLink.item(i);<br />
//Add the subLink details to the Mlink MenuBar<br />
MLink.addItem(sub.getAttribute("name"),new Command(){public void execute(){Window.open(sub.getAttribute("url"),sub.getAttribute("title"),"");}});<br />
}</p>
<p>//Add the completed MLink menubar to the main linksmen MenuBar<br />
linksmen.addItem( main.getAttribute("name"),MLink);<br />
}</p>
<p>}<br />
}<br />
);<br />
}<br />
catch (RequestException e)<br />
{<br />
Window.alert("Error");<br />
return;<br />
}</p>
<p>GLeftMen.setWidget(0,0,lblLinks);<br />
GLeftMen.setWidget(1,0,linksmen);<br />
}</p>
<p></code></p>
<p>I commented the code heavily and it shoud be clear.</p>
<p>Looking at the code I wonder how difficult it would be to take the XML generated by Glade and then build an interface when the user loads the page.</p>
<p>Anyway I hope someone can use the code it is licenced under WTFPL</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredreh.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredreh.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredreh.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredreh.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fredreh.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fredreh.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fredreh.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fredreh.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredreh.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredreh.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredreh.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredreh.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredreh.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredreh.wordpress.com/159/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredreh.wordpress.com&amp;blog=3067023&amp;post=159&amp;subd=fredreh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fredreh.wordpress.com/2009/06/21/google-web-toolkit-gwt-generate-filemenu-from-xml/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/261c50bef03f7c2ca33d339bd785c3a3?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">fredreh</media:title>
		</media:content>
	</item>
		<item>
		<title>A Cyber-Attack on an American City&#8230; (by South Africans)</title>
		<link>http://fredreh.wordpress.com/2009/04/23/a-cyber-attack-on-an-american-city-by-south-africans/</link>
		<comments>http://fredreh.wordpress.com/2009/04/23/a-cyber-attack-on-an-american-city-by-south-africans/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 07:53:14 +0000</pubDate>
		<dc:creator>fredreh</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://fredreh.wordpress.com/?p=157</guid>
		<description><![CDATA[Bruce Perens writes about a recent cyber attack on an American  city: &#8220;Just after midnight on Thursday, April 9, unidentified attackers climbed down four manholes serving the Northern California city of Morgan Hill and cut eight fiber cables in what appears to have been an organized attack on the electronic infrastructure of an American city. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredreh.wordpress.com&amp;blog=3067023&amp;post=157&amp;subd=fredreh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Bruce Perens <a href="http://perens.com/works/articles/MorganHill/">writes about</a> a recent cyber attack on an American  city:</p>
<p style="padding-left:30px;">&#8220;Just after midnight on Thursday, April 9, unidentified attackers climbed         down four manholes serving the Northern California city of Morgan Hill and         <a href="http://www.mercurynews.com/localnewsheadlines/ci_12106300"> cut eight fiber cables </a> in what appears to have been an organized attack on the electronic         infrastructure of an         American city. Its implications, though startling, have gone almost         un-reported.&#8221;</p>
<p>We have been having problems with criminals stealing the Telkom cables maybe they upped their game and went International with this job.  Did anyone check if the cables was removed instead of just cut ?.</p>
<p>But it is interesting on how a city can be technology disabled by cutting a cable in America, luckily we don&#8217;t suffer from the same problem since we can not  rely on fixed lines in the first place.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredreh.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredreh.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredreh.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredreh.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fredreh.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fredreh.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fredreh.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fredreh.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredreh.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredreh.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredreh.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredreh.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredreh.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredreh.wordpress.com/157/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredreh.wordpress.com&amp;blog=3067023&amp;post=157&amp;subd=fredreh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fredreh.wordpress.com/2009/04/23/a-cyber-attack-on-an-american-city-by-south-africans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/261c50bef03f7c2ca33d339bd785c3a3?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">fredreh</media:title>
		</media:content>
	</item>
		<item>
		<title>Long time no post</title>
		<link>http://fredreh.wordpress.com/2009/04/19/long-time-no-post/</link>
		<comments>http://fredreh.wordpress.com/2009/04/19/long-time-no-post/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 09:17:22 +0000</pubDate>
		<dc:creator>fredreh</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://fredreh.wordpress.com/?p=155</guid>
		<description><![CDATA[I am happy to report that my lack of posting is because of a few nice changes in my life. I have started a new job as Junior Lecturer at Tswane University of Technology teaching 1st and 3rd years. This doest leave a lot of time for working on projects but I have made some [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredreh.wordpress.com&amp;blog=3067023&amp;post=155&amp;subd=fredreh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am happy to report that my lack of posting is because of a few nice changes in my life.</p>
<p>I have started a new job as Junior Lecturer at Tswane University of Technology teaching 1st and 3rd years. This doest leave a lot of time for working on projects but I have made some progress on the Mxit perl library.</p>
<p>Since Mxit have released the protocol specification I have moved the project over to their site located here:<a href="http://devzone.mxit.com/"> http://devzone.mxit.com/</a></p>
<p>The project has its own space located<a href="http://devzone.mxit.com/trac/libmxit_perl"> here (Wiki)</a> and <a href="http://devzone.mxit.com/libmxit_perl/">here (Blog) </a></p>
<p>Since the campus were I teach is located in Witbank I have moved back in with my parents in Middelburg about 30 km from the campus. I will probably get my own place before the end of the year.</p>
<p>One cool application I can report on is <a href="https://www.getdropbox.com/link/21.X7hWEhmrJV">DropBox</a> . DropBox allows you to sync files over multiple computers and is nicely<br />
integrated with Gnome. The registration process is totally painless and you get 2 GB free when you sign up (250 mb extra for using this <a href="https://www.getdropbox.com/link/21.X7hWEhmrJV">https://www.getdropbox.com/link/21.X7hWEhmrJV</a> link)</p>
<p>I have also upgraded to Ubuntu 9.04 and will report on the experience at a later time.</p>
<p>Remember keep the source open and have a nice series of long weekends (If you are in S.A)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredreh.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredreh.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredreh.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredreh.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fredreh.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fredreh.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fredreh.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fredreh.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredreh.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredreh.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredreh.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredreh.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredreh.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredreh.wordpress.com/155/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredreh.wordpress.com&amp;blog=3067023&amp;post=155&amp;subd=fredreh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fredreh.wordpress.com/2009/04/19/long-time-no-post/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/261c50bef03f7c2ca33d339bd785c3a3?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">fredreh</media:title>
		</media:content>
	</item>
		<item>
		<title>Why you dont steal a Linux users car</title>
		<link>http://fredreh.wordpress.com/2008/11/22/why-you-dont-steal-a-linux-users-car/</link>
		<comments>http://fredreh.wordpress.com/2008/11/22/why-you-dont-steal-a-linux-users-car/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 17:47:38 +0000</pubDate>
		<dc:creator>fredreh</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://fredreh.wordpress.com/?p=153</guid>
		<description><![CDATA[I just picked this story up from the GLUG mailing list. Apparently Andre Coetzee and his family was driving along when they spotted his wife&#8217;s car that was stolen a while back. He then chased the criminals down and got his own back. My own car was also stolen about six months ago but unfortunately [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredreh.wordpress.com&amp;blog=3067023&amp;post=153&amp;subd=fredreh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just picked <a href="http://www.andre.co.za/a.php?a=191/How-to-Hijack-a-car-in-Johannesburg">this</a> story up from the GLUG mailing list. </p>
<p>Apparently Andre Coetzee and his family was driving along when they spotted his wife&#8217;s car that was stolen a while back. He then chased the criminals down and got his own back.</p>
<p>My own car was also stolen about six months ago but unfortunately I have had no such luck.</p>
<p>Read the full story on his site:<br />
<a href="http://www.andre.co.za/a.php?a=191/How-to-Hijack-a-car-in-Johannesburg">http://www.andre.co.za/a.php?a=191/How-to-Hijack-a-car-in-Johannesburg</a> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredreh.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredreh.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredreh.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredreh.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fredreh.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fredreh.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fredreh.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fredreh.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredreh.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredreh.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredreh.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredreh.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredreh.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredreh.wordpress.com/153/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fredreh.wordpress.com&amp;blog=3067023&amp;post=153&amp;subd=fredreh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fredreh.wordpress.com/2008/11/22/why-you-dont-steal-a-linux-users-car/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/261c50bef03f7c2ca33d339bd785c3a3?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">fredreh</media:title>
		</media:content>
	</item>
	</channel>
</rss>
