<?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>Kungfuice.com &#187; Computers</title>
	<atom:link href="http://www.kungfuice.com/index.php/category/technology/computers/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kungfuice.com</link>
	<description>The Ramblings Of A Programmer</description>
	<lastBuildDate>Mon, 27 Jul 2009 19:11:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Tail Recursive Algorithms In Scala</title>
		<link>http://www.kungfuice.com/index.php/2008/09/18/tail-recursive-algorithms-in-scala/</link>
		<comments>http://www.kungfuice.com/index.php/2008/09/18/tail-recursive-algorithms-in-scala/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 16:56:38 +0000</pubDate>
		<dc:creator>kungfuice</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">http://www.kungfuice.com/?p=88</guid>
		<description><![CDATA[
&#60; ![endif]&#8211;&#62;After the NFJS conference this weekend I have been spending more and more time working in Scala and trying to learn the ins-and-outs of the language.  One of the neat things I came across was tail recursive algorithm optimization within the language itself.
When writing in a functional language like Scala you rely heavily on [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if gte mso 10]></p>
<p><mce :style>< !   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-ansi-language:#0400; 	mso-fareast-language:#0400; 	mso-bidi-language:#0400;} --></p>
<p>&lt; ![endif]&#8211;&gt;After the NFJS conference this weekend I have been spending more and more time working in Scala and trying to learn the ins-and-outs of the language.  One of the neat things I came across was tail recursive algorithm optimization within the language itself.</p>
<p>When writing in a functional language like Scala you rely heavily on recursive algorithms to do your work, instead of iterative algorithms more present in OO languages like Java. This leads to an interesting problem with running functional languages within the JVM.</p>
<p>The Java Virtual Machine does not have support for tail-recursive algorithm optimizations.  What does that mean? Basically the JVM cannot spot when to optimize calls stacks for recursive algorithms. Well who cares right?<span> </span>If you’re writing in Java this issue doesn’t usually come up since most of us simply write our loops and are happy with the performance the JVM offers us.</p>
<p>However, when you are writing a lot of recursive algorithms you quickly start to see how tail-recursive algorithms help makes your code more efficient.</p>
<p>For those of you who don&#8217;t remember what a tail-recursive algorithm is, here is a short little explanation:</p>
<p>&#8220;<em>A Tail-recursive function is a function that ends in a recursive call to itself (effectively not building up any deferred operations). Tail recursive functions have the ability to re-use the same stack frame over and over and therefore are not bound by the number of available stack frames.  Many people have written the simple factorial function recursively, but many have noticed that if you pass it a value of N that is large enough you will see a dreaded Out of Memory exception. </em></p>
<p><em>The reason for this is due to the factorial functions deferred operation statement that comes at the end of the method.<span> </span>Let’s look at the simple factorial algorithm</em></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//INPUT: n is an Integer such that n &amp;gt;= 1</span>
<span style="color: #000066; font-weight: bold;">int</span> fact<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> n<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>n <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span>
      <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
   <span style="color: #000000; font-weight: bold;">else</span>
      <span style="color: #000000; font-weight: bold;">return</span> n<span style="color: #339933;">*</span> fact<span style="color: #009900;">&#40;</span>n<span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><em><span> </span>H You can see that at then end of the algorithm we have a deferred operation of multiplying n with the next value computed from factorial, this goes on and on until we finally hit a factorial function that returns one, at which point the stack is popped and everything returns nicely. However we are now bound by the available stack frames in terms of computing n (Also by the max size of an int, but that’s beside the point).</em></p>
<p><em>In a tail-recursive algorithm you do not see this deferred execution, and therefore the same stack frame can be reused over and over again.<span> </span>Here is the same algorithm rewritten using a tail-recursive algorithm.</em></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//INPUT: n is an Integer such that n &amp;gt;= 1</span>
<span style="color: #000066; font-weight: bold;">int</span> fact<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> n<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">return</span> fact_support<span style="color: #009900;">&#40;</span>n, <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">int</span> fact_support<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> n, <span style="color: #000066; font-weight: bold;">int</span> acc<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>n <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">return</span> acc<span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">return</span> fact_support<span style="color: #009900;">&#40;</span>n<span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span>,acc<span style="color: #339933;">*</span>n<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><em>As you can see there are no deferred operations in this example we have effectively gotten rid of having to use n number of stack frames.<span> </span>Each call to fact_support brings with it the current accumulated sum, and thus does not need to wait to “pop” the stack and rely on the stack pop to accumulate the sum of the factorials.</em></p>
<p class="MsoNormal">As you can see tail-recursive optimizations are very important to languages where recursion is relied on heavily.<span> </span>Without this type of optimization many of the recursive algorithms are now bound by the number of available stack frames.</p>
<p class="MsoNormal">
<p class="MsoNormal">So that can’t be so hard right? Why not just write all your algorithms to use tail-recursion? Well for one it’s not always possible to do this, but also it puts a lot of work in the hands of the developer.<span> </span>We have this beautiful thing called the JVM that should be able to spot cases where optimization can occur.</p>
<p class="MsoNormal">
<p class="MsoNormal">Unfortunately the JVM doesn’t know how to spot this optimization, therefore the Scala compiler must look at ways of optimizing your code.<span> </span>Even more unfortunate the Scala documentation explicitly states that you should not rely on the Scala compiler making this optimization.</p>
<p class="MsoNormal">
<p class="MsoNormal">It may optimize your code, but it may not as well, so really the only way to be sure is to write your algorithms guaranteeing that tail-recursion is being utilized from the get-go.</p>
<p class="MsoNormal">
<p class="MsoNormal">It would be really nice to see the JVM improved to allow for this type of optimization to be done in the Hotspot, and there has been talk about improving the JVM to support functional languages, but I guess time will only tell.</p>
<p></mce></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kungfuice.com/index.php/2008/09/18/tail-recursive-algorithms-in-scala/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>No Fluff Just Stuff Boston 2008 Overall Review</title>
		<link>http://www.kungfuice.com/index.php/2008/09/16/no-fluff-just-stuff-boston-2008-overall-review/</link>
		<comments>http://www.kungfuice.com/index.php/2008/09/16/no-fluff-just-stuff-boston-2008-overall-review/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 12:32:54 +0000</pubDate>
		<dc:creator>kungfuice</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Boston]]></category>
		<category><![CDATA[Conference]]></category>
		<category><![CDATA[NFJS 2008]]></category>
		<category><![CDATA[No fluff just stuff]]></category>

		<guid isPermaLink="false">http://www.kungfuice.com/?p=87</guid>
		<description><![CDATA[I&#8217;ve spent my weekend in Boston at the local No Fluff Just Stuff conference and I figured I&#8217;d write a little summary of what I observed and learnt over the weekend. 
To start this was my first conference that I&#8217;ve attended besides some small ones while in College and University, and I have to say [...]]]></description>
			<content:encoded><![CDATA[<p><span>I&#8217;ve spent my weekend in Boston at the local No Fluff Just Stuff conference and I figured I&#8217;d write a little summary of what I observed and learnt over the weekend. </span></p>
<p><span>To start this was my first conference that I&#8217;ve attended besides some small ones while in College and University, and I have to say that it was both exciting and disappointing. </span></p>
<p><span>Heading into the weekend I was very excited to hear Brian Goetz and Ted Neward give talks about cool things like Java Concurrency, The Java Memory Model, Hacking the JDK, Scala etc, and I expected most people at the conference to be of the same mind set. </span></p>
<p><span>I found through talking with many attendees that most people seemed to share a different set of values as to what was important to them.<span> </span>I found this to be very interesting as it really showed me the difference between people who are developing for the “Enterprise” or big business and people like me who develop more for a technology based company.</span></p>
<p class="MsoNormal"><span>When I heard people talking about Groovy and Grails I couldn’t understand why anyone would be so interested in a language that performed as poorly as Groovy <em>(Yes I know it’s been getting better but when you start from incredibly slow, and move to just being a little less incredibly slow I hardly see this as an improvement)</em> I started to see that there really is a difference between the enterprise developer and the developer.</span></p>
<p class="MsoNormal"><span>I think this was an amazing aspect of this conference is that it really opened my eyes to the other side of the coin, to the developers that work hard to create the applications that we use every single day from our Banks, Insurance companies etc and the different set of requirements that their applications have to deal with then what I’m used to. </span></p>
<p class="MsoNormal"><span>I also have to say that after this weekend I am VERY VERY glad to be working where I am. Some of the horror stories I heard from people as to how they have to work, the lack of tools support that they face, and an overall management’s lack of letting things change made me cringe in pain and a few times I just wanted to give them a hug to tell them that it would all be OK <em>(Yes sometimes it really was that bad like the guy who told me they were still using Java 1.4.2 because his boss thought if it works don’t fix it!)</em></span></p>
<p class="MsoNormal"><span> So after sitting back over the weekend and getting over the initial culture shock that I faced meeting a lot of these developers, I have to say that this conference helped me in a way I never thought it would.<span> </span></span></p>
<p class="MsoNormal"><span>Sure I learnt all about the Java Memory Model, and how I can modify byte code on the fly with tools like BCEL, but more importantly I learnt what other developers have to go through on a daily basis and what it’s like to be an Enterprise developer in the real world.</span></p>
<p class="MsoNormal"><span>All I have to say to that is, <strong>thank god</strong> I don’t have to deal with that shit every day.  Overall though I definitely would recommend this conference to someone working in the Enterprise world, I definitely got value out of it though with my talks with Brian and Ted and I have to say that if they weren&#8217;t there this show definitely would of been a wash for me.  So thanks Brian and Ted for really opening my mind and eyes to some cool new ways of doing things.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kungfuice.com/index.php/2008/09/16/no-fluff-just-stuff-boston-2008-overall-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Picked up some new books</title>
		<link>http://www.kungfuice.com/index.php/2008/09/01/picked-up-some-new-books/</link>
		<comments>http://www.kungfuice.com/index.php/2008/09/01/picked-up-some-new-books/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 18:49:23 +0000</pubDate>
		<dc:creator>kungfuice</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[reviews]]></category>

		<guid isPermaLink="false">http://www.kungfuice.com/?p=85</guid>
		<description><![CDATA[Last week I finished the book &#8220;Prelude to Foundations&#8221; by Isaac Asimov.  It was recommended to me by my boss, and I have to say it was one of the better books I have read in a while.  I usually try to switch up reading technical books with non-technical books, and since I haven&#8217;t read [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I finished the book &#8220;<a title="Prelude to Foundations Amazon.ca" href="http://www.amazon.ca/Prelude-Foundation-Isaac-Asimov/dp/0553278398" target="_blank">Prelude to Foundations</a>&#8221; by <a title="Isaac Asimov Wikipedia" href="http://en.wikipedia.org/wiki/Isaac_Asimov" target="_blank">Isaac Asimov</a>.  It was recommended to me by my boss, and I have to say it was one of the better books I have read in a while.  I usually try to switch up reading technical books with non-technical books, and since I haven&#8217;t read any new technical books I decided to head over to chapters and pickup some new books.</p>
<p>I have head great things about both <a href="http://www.amazon.ca/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1218117880&amp;sr=1-1" target="_blank">Java Concurrency</a> by <a href="http://www.briangoetz.com/" target="_blank">Brian Goetz</a>, and <a href="http://www.amazon.ca/Effective-Java-Joshua-Bloch/dp/0321356683/ref=pd_bxgy_b_img_b?ie=UTF8&amp;qid=1218117880&amp;sr=1-1" target="_blank">Effective Java 2nd Edition</a> by Joshua Bloch.  The real problem with both these books is they are hard to find in store.  I happened to come across both of them at my local Chapters, and quickly snatched them up.</p>
<p>I have been reading Java Concurrency over the past couple of days and I have to say this is one of the best Java books I&#8217;ve read in a while.  Brian Goetz has a way of writing that really helps bring complex problems into perspective.</p>
<p>One of my initial gripes about this book was the lack of exercises at the end of the Chapters, however now that I&#8217;m a little ways into the book I&#8217;ve noticed that the examples chosen for each Chapter progress almost as a set of exercises in themselves.  Not to mention that Brian picks examples that relate well to the real world, instead of most of the silly easy examples found in other books I&#8217;ve read.</p>
<p>I would definitely recommend this book to anyone looking to delve into the world of Java Concurrency, or even someone looking to freshen up on the latest stuff available in JDK 1.5 in terms of threading.  This book has really helped me in my pet projects and in my day-to-day work so I would definitely recommend getting it and keeping it close by.</p>
<p>I&#8217;ve yet to really get into Effective Java, but the little bits I&#8217;ve read here and there have really shown me that this this book lives up to all the hype about it.  Joshua is a smart man, and this book definitely reflects his intelligence.  It is well organized and shows you things about Java that you never thought even existed.  I&#8217;m really excited to delve deaper into this one.</p>
<p>I&#8217;ll write a more thorough review once I&#8217;m finished with it.  Anyway until next time &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kungfuice.com/index.php/2008/09/01/picked-up-some-new-books/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finally a new PC!</title>
		<link>http://www.kungfuice.com/index.php/2008/05/29/finally-a-new-pc/</link>
		<comments>http://www.kungfuice.com/index.php/2008/05/29/finally-a-new-pc/#comments</comments>
		<pubDate>Fri, 30 May 2008 03:08:50 +0000</pubDate>
		<dc:creator>kungfuice</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[computer]]></category>
		<category><![CDATA[do-it-yourself]]></category>
		<category><![CDATA[hackintosh]]></category>
		<category><![CDATA[OSx86]]></category>
		<category><![CDATA[PC]]></category>

		<guid isPermaLink="false">http://www.kungfuice.com/?p=83</guid>
		<description><![CDATA[Well I finally broke down and decided it was time to upgrade my old PC.  To be honest I couldn&#8217;t of asked for a better computer, I&#8217;ve had it since 2004 and it&#8217;s cost me nothing but a new hard drive once.  To me this is prove of why I always tell people the best [...]]]></description>
			<content:encoded><![CDATA[<p>Well I finally broke down and decided it was time to upgrade my old PC.  To be honest I couldn&#8217;t of asked for a better computer, I&#8217;ve had it since 2004 and it&#8217;s cost me nothing but a new hard drive once.  To me this is prove of why I always tell people the best computer money can buy is the one you build yourself.</p>
<p>Sure you can walk into your local Futureshop or PC Shop and get a pre manufactured/assembled PC, but you have zero guarantee as to what is inside of that PC.  In most cases large manufacturers use subpar components in order to keep prices competitive.  Small PC Shops are notorious for advertising certain components but giving you low cost alternatives in the final product, not to mention that their computers are usually more expensive then just buying the parts yourself.</p>
<p>As I&#8217;ve always built my own computer, this time was really no different.  I had been toying around with the idea of buying a Mac Pro, but I just couldn&#8217;t justify the cost, not to mention that I&#8217;ve been successfully running <a title="OSX86 Project Home Page" href="http://www.osx86project.org/" target="_blank">OSx86</a> for months on my PC.  In order to continue doing so I had a couple of requirements for my new PC which seems to be a theme of mine as of late.</p>
<p>First my new PC had to be power efficient.  I find myself becoming a lot more eco-friendly, and I feel that having a PC that is efficient can really help to reduce everyones carbon foot print.  This leads to my second requirement, which was my number one requirement in my previous PC, the computer had to be QUIET.</p>
<p>If there&#8217;s one thing I hate more then anything else, it&#8217;s having to listen to the hum of 5 fans churning away inside someone&#8217;s PC.  I don&#8217;t understand how people live with this.  I spend a good amount of time next to my computer, and the last thing I want is to have to listen to fans.</p>
<p>My previous PC utilized a lot of power efficient components that I could passively cool, in order to minimize noise.  I also made use of one of my favourite cases the <a title="Antec Sonata II Quiet PC Case" href="http://www.antec.com/us/productDetails.php?ProdID=15139" target="_blank">Antec Sonata II</a> this quiet case included a lot of ducting to help air flow and minimize the number of fans needed to cool your components.  It also came with hard drive shock absorber mounts, and a heavy aluminium construction to eliminiate vibration noise. Unfortunately the interior ducting was also the most annoying part of this case, adding new components was a pain, and tucking wires became an issue as the ducting really got in the way.</p>
<p>My third requirement was that my new PC be built with components that I knew would last for at least the next couple of years.  I&#8217;m a firm believer of paying money up front on solid top of the line components that I know will not be obsolete in a few months, and that are well manufactured.</p>
<p>With these three requirements in place I spent some time wrestling with what components I wanted to include, and where I was going to get the best price for these components.</p>
<p>One of my first problems was whether or not to splurge on a quad core cpu. I had really considered the Intel Quad Core Q6600, but after doing some reading (Especially this article over at <a title="Choosing Dual or Quad Core" href="http://www.codinghorror.com/blog/archives/000942.html" target="_blank">Coding Horror</a>) I really came to the conclusion that the Quard Cores would probably go to waste on me. Not to mention that the Quad Core uses a 65nm process, and definitely violates my power efficiency requirement.</p>
<p>After eliminating the quad core from my list of potential CPUs I had to decide what dual core processor I wanted and to be honest this wasn&#8217;t a difficult pick for me.  The new Wolfdale based Core2Duo processors from Intel are power efficient and use a 45nm design which allows them to be overclocked to insane levels.  These CPUs are only marginally more expensive then their 65nm counterparts, and since my local PC shop was having a sale on the Core 2 Duo 8400 I decided to pick it up for $190.</p>
<p><a href="http://picasaweb.google.com/chris.boersma/20080510NewComputerBuild/photo#5199829900334787138"><img src="http://lh4.ggpht.com/chris.boersma/SCmBvpXo6kI/AAAAAAAADGc/OMvFj6G9r-U/s400/DSC03335.JPG" alt="" /> </a></p>
<p>My next problem was choosing a suitable video card.  I knew first that I had to choose something from Nvidia, as driver support for ATI based cards is abysmal in Linux, and OSx86.  This somewhat limited my choices, and with so many high end gamer cards made me wonder if I&#8217;d ever find something to suit my needs.  I really wanted something that was passively cooled, since in most PCs the bulk of noise originates from the Video Cards cheap fan.  After doing some thinking and reading I decided that the highend 8800 series was out as it was difficult to passively cool and definitely violated my power efficiency requirement.</p>
<p>My next card was the 9600GT which I really did consider thoroughly.  Gigabyte has a new passively cooled version of the 9600GT that I thought would make a perfect fit, however I couldn&#8217;t justify the $200 it was going to cost me.  I am not an avid gamer, in fact that last game I ever played on my PC was <a title="Comand and Conquer" href="http://en.wikipedia.org/wiki/Command_%26_Conquer_3:_Tiberium_Wars" target="_blank">Command and Conquer Tiberium Wars</a>, not the most graphic intensive video game.</p>
<p>With these cards eliminated I stumbled across an <a title="Asus" href="http://www.asus.com.tw/products.aspx?l1=2&amp;l2=6&amp;l3=514&amp;l4=0&amp;model=1700&amp;modelmenu=2" target="_blank">ASUSTek Silent 8600GT</a>, which seemed to fit my needs quite well.  This card is passively cooled and does not require and extra power connection.  This card was also on sale at my local PC shop, so I managed to score it for $75.</p>
<p>I now had to find a suitable motherboard to connect all this stuff too.  I&#8217;ve always been fond of Asus motherboards and have been using them exclusively in my personal computers since 1998.  I&#8217;ve yet to really ever have an issue with them, so it was obvious to me that I would be putting one in my new computer as well.  My first job though was to verify what Asus boards worked best with OSx86.  After doing some hunting around the web I found that the P5k-E series of motherboards had good compatability with OSx86, and were solid performing motherboards based on Intel&#8217;s P35 architecture.   I found a P5K-E on sale at my local pc shop for $160.00.</p>
<p><a href="http://picasaweb.google.com/chris.boersma/20080510NewComputerBuild/photo#5199830127968053986"><img style="vertical-align: middle;" src="http://lh5.ggpht.com/chris.boersma/SCmB85Xo6uI/AAAAAAAADHw/n57-hygQB2Y/s400/DSC03351.JPG" alt="Asus P5K-E" width="400" height="300" /></a></p>
<p>Having my main components in hand, I decided that I&#8217;d have to get a new case to house my new components. I decided on the <a title="Antec P182" href="http://www.antec.com/us/productDetails.php?ProdID=81820" target="_blank">Antec P182</a>.  This case was designed with the help of <a title="Silent PC Review" href="http://www.silentpcreview.com" target="_blank">SilentPCReview</a> there are tons of reviews of this case on the net, so I won&#8217;t go into full details as to why I chose the case, but it definitely fit my needs, and fit my budget as well.  I fitted the P182 with an Enermax Modu+82 525w powersupply.  Unforutnately I couldn&#8217;t find a lower wattage powersupply.  I would of prefered the 425W Modu+ 82, but things don&#8217;t always work out for the best.  I&#8217;ll be keeping my eye out for something a little lighter in the future and will probably make the switch.  I do have to say though, this power supply is incredibly quiet.  Usually power supplies are always humming along, but with this one I barely even notice when the fan kicks in.</p>
<p>I filled the rest of my PC build up with the usual components, 4gb of ram (A definite requirement for anyone who does any type of software development), a DVDRW drive, and a Seagate NCQ 500GB hard drive.</p>
<p>Overall the new PC is everything I dreamed it to be.  Finally my PC isn&#8217;t struggling to run Tomcat, MySQL, and Eclipse at the same time, finally Itunes loads in a reasonable amount of time, and most of all finally it doesn&#8217;t take me hours on end to Rip a DVD.</p>
<p>Here&#8217;s a final spec list for the build including prices for all the items</p>
<ul>
<li><a href="http://infonec.ca/site/main.php?module=detail&amp;id=351729">Intel Core 2 Duo 8400</a> $198.00</li>
<li><a href="http://infonec.ca/site/main.php?module=detail&amp;id=351566">Asus P5K-E</a> $145.00</li>
<li><a href="http://infonec.ca/site/main.php?module=detail&amp;id=353681">G-Skill 4GB DDR2 PC8000 $94.99</a></li>
<li><a href="http://infonec.ca/site/main.php?module=detail&amp;id=352278">Asus 8600gt Silent 512mb</a> $105.00</li>
<li><a href="http://infonec.ca/site/main.php?module=detail&amp;id=351220">Seagate 500gb 32mb cache HDD</a> $78.99</li>
<li><a href="http://infonec.ca/site/main.php?module=detail&amp;id=349443">Samsung SH-S203B DVDRW Drive</a> $26.99</li>
<li><a href="http://infonec.ca/site/main.php?module=detail&amp;id=341136">Antec P182</a> $109.00</li>
<li><a href="http://infonec.ca/site/main.php?module=detail&amp;id=353123">Enermax Modu+82 525w</a> $115.00</li>
</ul>
<p>Bringing the grand total to $873.96!!!!</p>
<p><a href="http://picasaweb.google.com/chris.boersma/20080510NewComputerBuild/photo#5199830059248577202"><img src="http://lh5.ggpht.com/chris.boersma/SCmB45Xo6rI/AAAAAAAADHU/4HJW_zeZP9I/s400/DSC03348.JPG" alt="" width="300" height="400" /> </a></p>
<p>When you consider that the same PC from Dell or HP would cost you a lot more then that, it&#8217;s pretty satisfying to know that not only did you save yourself money, but you enjoyed yourself while doing it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kungfuice.com/index.php/2008/05/29/finally-a-new-pc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java String Comparisons</title>
		<link>http://www.kungfuice.com/index.php/2007/11/14/java-string-comparisons-2/</link>
		<comments>http://www.kungfuice.com/index.php/2007/11/14/java-string-comparisons-2/#comments</comments>
		<pubDate>Wed, 14 Nov 2007 13:49:31 +0000</pubDate>
		<dc:creator>kungfuice</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.kungfuice.com/index.php/2007/11/14/java-string-comparisons-2/</guid>
		<description><![CDATA[Today I thought I would take some time to outline basic String comparison in Java. To many newcomers using Java doing comparisons using String can be confusing. Take for example the following piece of code which compares two String literals and two String objects. To newcomers of the Java language the following is confusing.  [...]]]></description>
			<content:encoded><![CDATA[<p>Today I thought I would take some time to outline basic <code>String</code> comparison in Java. To many newcomers using Java doing comparisons using <code>String</code> can be confusing. Take for example the following piece of code which compares two <code>String</code> literals and two <code>String</code> objects. To newcomers of the Java language the following is confusing.  Let&#8217;s take some time to outline how this actually works, and what actually makes it confusing.</p>
<p><code></code><code>
<pre class="brush: plain;">
&lt;font color=&quot;#808080&quot;&gt;01&lt;/font&gt; &lt;font color=&quot;#7f0055&quot;&gt;&lt;strong&gt;public class &lt;/strong&gt;&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;Test &lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;{&lt;/font&gt;
&lt;font color=&quot;#808080&quot;&gt;02&lt;/font&gt;     &lt;font color=&quot;#7f0055&quot;&gt;&lt;strong&gt;public static &lt;/strong&gt;&lt;/font&gt;&lt;font color=&quot;#7f0055&quot;&gt;&lt;strong&gt;void &lt;/strong&gt;&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;main&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;(&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;String&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;[] &lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;args&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;) {&lt;/font&gt;
&lt;font color=&quot;#808080&quot;&gt;03&lt;/font&gt;         &lt;font color=&quot;#999999&quot;&gt;String a = &lt;/font&gt;&lt;font color=&quot;#2a00ff&quot;&gt;&quot;abc&quot;&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;;&lt;/font&gt;
&lt;font color=&quot;#808080&quot;&gt;04&lt;/font&gt;         &lt;font color=&quot;#999999&quot;&gt;String b = &lt;/font&gt;&lt;font color=&quot;#2a00ff&quot;&gt;&quot;abc&quot;&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;;&lt;/font&gt;
&lt;font color=&quot;#808080&quot;&gt;05&lt;/font&gt;         &lt;font color=&quot;#999999&quot;&gt;String c = &lt;/font&gt;&lt;font color=&quot;#7f0055&quot;&gt;&lt;strong&gt;new &lt;/strong&gt;&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;String&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;(&lt;/font&gt;&lt;font color=&quot;#2a00ff&quot;&gt;&quot;abc&quot;&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;)&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;;&lt;/font&gt;
&lt;font color=&quot;#808080&quot;&gt;06&lt;/font&gt;         &lt;font color=&quot;#999999&quot;&gt;String d = &lt;/font&gt;&lt;font color=&quot;#7f0055&quot;&gt;&lt;strong&gt;new &lt;/strong&gt;&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;String&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;(&lt;/font&gt;&lt;font color=&quot;#2a00ff&quot;&gt;&quot;abc&quot;&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;)&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;;&lt;/font&gt;
&lt;font color=&quot;#808080&quot;&gt;07&lt;/font&gt;         &lt;font color=&quot;#999999&quot;&gt;System.out.println&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;((&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;a==b&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;)&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;;&lt;/font&gt;&lt;font color=&quot;#3f7f5f&quot;&gt;//true&lt;/font&gt;
&lt;font color=&quot;#808080&quot;&gt;08&lt;/font&gt;         &lt;font color=&quot;#999999&quot;&gt;System.out.println&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;((&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;c==d&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;))&lt;/font&gt;&lt;font color=&quot;#999999&quot;&gt;;&lt;/font&gt;&lt;font color=&quot;#3f7f5f&quot;&gt;//false&lt;/font&gt;
&lt;font color=&quot;#808080&quot;&gt;09&lt;/font&gt;     &lt;font color=&quot;#999999&quot;&gt;}&lt;/font&gt;
&lt;font color=&quot;#808080&quot;&gt;10&lt;/font&gt; &lt;font color=&quot;#999999&quot;&gt;}&lt;/font&gt;&lt;/code&gt;

&lt;code&gt;&lt;font color=&quot;#999999&quot;&gt;</pre>
<p></font></code><br />
First let&#8217;s look at the instructions used to generate a <code>String</code> literal in Java. It&#8217;s fairly straight forward for anyone who&#8217;s seen assembly before. We simply store the literal value using the instruction sets store command.</p>
<p>Instruction used to generate String literal<br />
<code>0:      ldc        #2; //String abc<br />
2:      astore_1</code></p>
<p>On the other hand there are many more instructions used to generate a <code>String</code> using the new operator. Since we are using the new operator we create a new reference to memory location, duplicate it, load the <code>String</code> literal and invoke a special init function on that new memory. In Java terms we are merely creating a new object and invoking that objects constructor with the parameter &#8220;abc&#8221;.</p>
<p>Instruction used to generate new String()<br />
<code>6:      new               #3; //class java/lang/String<br />
9:      dup<br />
10:     ldc               #2; //String abc<br />
12:     invokespecial     #4; //Method java/lang/String."&lt;init&gt;":(Ljava/lang/String;)V<br />
15:     astore_3<br />
</code></p>
<p>So the question still remains, why does <code>a==b</code> return true, and <code>c==d</code> return false? First let&#8217;s look at the <code>==</code> operator itself. The <code>==</code> operator works on <code>String</code> object references. If two <code>String</code> references point to the same object in memory, the comparison returns a true result. Otherwise, the comparison returns false, regardless of whether the text has the same character values.</p>
<p>The <code>==</code> operator does not compare actual char data. So we know now that the <code>==</code> operator is looking at comparing two object references, but how can <code>a==b</code> be true?</p>
<p>Well this comes down to the different way Java handles literals. The Java platform creates an internal pool for string literals and constants. <code>String</code> literals and constants that have the exact same char values and length will exist exactly once in the pool.</p>
<p>Subsequent comparisons of <code>String</code> literals and constants with the same <code>char</code> values will always be equal. So you see we could create a million <code>String</code> literals with the value &#8220;abc&#8221; but Java would only have reference in it&#8217;s internal pool to a <code>String</code> literal with value &#8220;abc&#8221; and length 3.</p>
<p>On the other hand c and d are not <code>String</code> literals they are <code>String</code> objects, and therefore are not created in the Java <code>String</code> literal and constant pool. These objects will each have it&#8217;s own reference in memory and therefore will have different values for their references.</p>
<p>Using the <code>==</code> operator to check whether their reference points to the same value will never be true since each occupies it&#8217;s own slot in memory.</p>
<p>If we wanted to compare the actual values stored within the <code>String</code> instead of their references, we would simply use the <code>equals</code> method or the <code>compareTo</code> method.</p>
<p>I hope this helps clarify some of the mystery behind how Java handles <code>String</code> and I hope I have helped increase your understanding of <code>String</code> comparisons in Java. Next time we&#8217;ll take a closer look at Natural Langauge text comparison in the Java language.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kungfuice.com/index.php/2007/11/14/java-string-comparisons-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vista Plunge</title>
		<link>http://www.kungfuice.com/index.php/2007/03/17/vista-plunge/</link>
		<comments>http://www.kungfuice.com/index.php/2007/03/17/vista-plunge/#comments</comments>
		<pubDate>Sat, 17 Mar 2007 20:10:23 +0000</pubDate>
		<dc:creator>kungfuice</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.kungfuice.com/index.php/2007/03/17/vista-plunge/</guid>
		<description><![CDATA[Well over my reading week I decided to make the transition to Windows Vista.  I had recently been running Ubuntu Edgy exclusively on my desktop, but decided that I wanted to see what Vista was all about.  I picked up a copy of Home Premium (Legally!), and installed it on my box.  [...]]]></description>
			<content:encoded><![CDATA[<p>Well over my reading week I decided to make the transition to Windows Vista.  I had recently been running Ubuntu Edgy exclusively on my desktop, but decided that I wanted to see what Vista was all about.  I picked up a copy of Home Premium (Legally!), and installed it on my box.  I must say that I was very impressed with the changes to the Windows Installer.  The image based install went smoothly and I was up and running in just over 30 minutes.  </p>
<p>Once Vista booted everything just worked, I didnt&#8217; need to download any drivers everything was done for me, which was a pleasant change from what I remember installing when I last installed Windows XP.  Although Vista doesn&#8217;t have any services packs yet I think this will eventually change but we will see.</p>
<p>I was concerned about how my box would handle Vista, my computer is by no means old, but at the same time it&#8217;s definitely not bleeding edge.  Currently I am running 1.86gz Centrino Processor with 1gb of PC3200 Ram, and an 80gb Sata Drive with a 120gb IDE storage drive, and I have an AGP 6600GT Nvidia Video card.  Vista actually runs quite nicely on this setup.  The overal experience seems very &#8220;snappy&#8221; everything opens quickly, and my memory usage is usually between 500-750mbs of my overall 1gb.  I did however make the upgrade to 2gb recently just to give myself that extra &#8220;room&#8221; just incase.</p>
<p>Overall I really do enjoy the UI changes that have been made, and with the system in general.  The search improvements are a blessing, and it&#8217;s nice to just type what I&#8217;m looking for in any window and have it just come up.  Overall the Vista Eye Candy is nice, but is by no means as good as Beryl in Linux, however I do find that it is a lot more stable.</p>
<p>I really enjoy the integration of windows media player and the improvements they have made to it.  I was always a fan of windows media player when I used windows.  I liked it&#8217;s small memory footprint, library folder watching, the only thing I didn&#8217;t ever really like was the UI and they have definitely improved in that department.</p>
<p>All things considered if would definitely recommend anyone who is still running windows xp to go out and make the switch.  I find that Vista has given me a reason to enjoy windows again, for now, but that definitely does not mean I spend a lot of time in it.  I still use Linux as my main OS and would say I&#8217;m in that at least 85% of the time.</p>
<p>So yeah I guess that&#8217;s my pseudo review of Vista.  I hope it helps some people make the decision to make the switch.</p>
<p>I almost forgot here&#8217;s a screenshot <img src='http://www.kungfuice.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
<a href="http://www.flickr.com/photos/81867855@N00/424392887/" title="Vista ScreenShot"><img src="http://farm1.static.flickr.com/156/424392887_92f26f4404.jpg?v=0" alt="Vista Dual Screenshot" width="450" height="180"/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kungfuice.com/index.php/2007/03/17/vista-plunge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What vi would look like if Microsoft had made it</title>
		<link>http://www.kungfuice.com/index.php/2007/03/09/what-vi-would-look-like-if-microsoft-had-made-it/</link>
		<comments>http://www.kungfuice.com/index.php/2007/03/09/what-vi-would-look-like-if-microsoft-had-made-it/#comments</comments>
		<pubDate>Fri, 09 Mar 2007 04:22:36 +0000</pubDate>
		<dc:creator>kungfuice</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.kungfuice.com/index.php/2007/03/09/what-vi-would-look-like-if-microsoft-had-made-it/</guid>
		<description><![CDATA[What vi would look like if Microsoft had developed it
There&#8217;s no where to run and hide from the vi assistant!
]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.sun.com/marigan/entry/how_the_vi_editor_would">What vi would look like if Microsoft had developed it</a></p>
<p>There&#8217;s no where to run and hide from the vi assistant!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kungfuice.com/index.php/2007/03/09/what-vi-would-look-like-if-microsoft-had-made-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kill -9 White Geek Rap</title>
		<link>http://www.kungfuice.com/index.php/2007/03/08/kill-9-white-geek-rap/</link>
		<comments>http://www.kungfuice.com/index.php/2007/03/08/kill-9-white-geek-rap/#comments</comments>
		<pubDate>Thu, 08 Mar 2007 15:45:56 +0000</pubDate>
		<dc:creator>kungfuice</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[School]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.kungfuice.com/index.php/2007/03/08/kill-9-white-geek-rap/</guid>
		<description><![CDATA[Well I came across this absolutely hilarious video on youtube that really spoke to me.  Maybe it&#8217;s the fact that I&#8217;m seriously going out of my mind from lack of sleep and stress, or maybe it&#8217;s because I&#8217;m taking an operating system course this semester so some of the things this guy spits really [...]]]></description>
			<content:encoded><![CDATA[<p>Well I came across this absolutely hilarious video on youtube that really spoke to me.  Maybe it&#8217;s the fact that I&#8217;m seriously going out of my mind from lack of sleep and stress, or maybe it&#8217;s because I&#8217;m taking an operating system course this semester so some of the things this guy spits really speak to me.  Whatever it is this has to be one of the funniest, geek, gansta raps of all time.  This guy&#8217;s name is Monzy and if you checkout youtube you&#8217;ll find a wealth of other just as funny raps.  &#8220;I do a bounds check before I write to an array&#8221;! Foo!</p>
<p><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/Fow7iUaKrq4"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/Fow7iUaKrq4" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kungfuice.com/index.php/2007/03/08/kill-9-white-geek-rap/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing Flash Player 9 Beta On Ubuntu Edgy</title>
		<link>http://www.kungfuice.com/index.php/2006/10/18/installing-flash-player-9-beta-on-ubuntu-edgy/</link>
		<comments>http://www.kungfuice.com/index.php/2006/10/18/installing-flash-player-9-beta-on-ubuntu-edgy/#comments</comments>
		<pubDate>Thu, 19 Oct 2006 03:06:33 +0000</pubDate>
		<dc:creator>kungfuice</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.kungfuice.com/index.php/2006/10/18/installing-flash-player-9-beta-on-ubuntu-edgy/</guid>
		<description><![CDATA[OK finally Adobe has decided to release Flash Player 9 in Beta Form for Linux.  I&#8217;ve decided to throw together a quick how to on how to install it on Ubuntu Edgy.  This should hold true however for most flavours of Ubuntu as well.

Open Synaptic Package manager
Click on the search button and type [...]]]></description>
			<content:encoded><![CDATA[<p>OK finally <a href="http://www.adobe.com">Adobe</a> has decided to release Flash Player 9 in Beta Form for Linux.  I&#8217;ve decided to throw together a quick how to on how to install it on Ubuntu Edgy.  This should hold true however for most flavours of Ubuntu as well.</p>
<ol>
<li>Open Synaptic Package manager</li>
<li>Click on the search button and type &#8220;Flash&#8221;</li>
<li>Click the box beside any of the currently installed flash-plugins, this should be flashplugin-nonfree, and select for a complete removal</li>
<li>Now click apply and let Synaptic remove the package</li>
<li>We are now ready to download and install the flashplayer 9 plugin</li>
<li>Point your browser to <a href="http://labs.adobe.com/downloads/flashplayer9.html">&#8220;http://labs.adobe.com/downloads/flashplayer9.html&#8221;</a>, and select the &#8220;Download Installer for Linux&#8221; link. Remember where you save this file because we&#8217;ll need it next.  Close down your browser when you are done since we don&#8217;t want it open while we install the plugin</li>
<li>Open your favourite terminal and navigate to the directory which you saved the plugin, and execute the following command:</li>
<p>
<p class="command">tar -vxzf FP9_plugin_beta_101806.tar.gz</p>
<li>You will now have a directory called flash-player-plugin-9.0.1.21.55 or something similar, navigate to this directory</li>
<li>You will now need to copy the library &#8220;libflashplayerplugin.so&#8221; to &#8220;/usr/lib/firefox/plugins/&#8221;, execute the following command:</li>
<p></p>
<p class="command">sudo cp libflashplayer.so /usr/lib/firefox/plugins/</p>
<li>Navigate to your favourite flash enabled website and enjoy having the latest and greatest flash player.</li>
</ol>
<p>I hope this helps, please post if you have any problems or further questions.  I hope this helps everyone out.</p>
<p><b>Update &#8230;</b><br />
TreviÃ±o from <a href="http://www.ubuntuforums.org" title="Ubuntu Forums">Ubuntu Forums</a> was kind enough to pack the player into a package.  You can now get the files from his repository at <a href="http://3v1n0.tuxfamily.org/dists/dapper/3v1n0/"  title="Trevino's Repo">http://3v1n0.tuxfamily.org/dists/dapper/3v1n0/</a></p>
<p>Download the deb and install it <img src='http://www.kungfuice.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.kungfuice.com/index.php/2006/10/18/installing-flash-player-9-beta-on-ubuntu-edgy/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Get Rid Of Annoying &#8220;setkeycodes&#8221; Messages in Ubuntu</title>
		<link>http://www.kungfuice.com/index.php/2006/10/11/get-rid-of-annoying-setkeycodes-messages-in-ubuntu/</link>
		<comments>http://www.kungfuice.com/index.php/2006/10/11/get-rid-of-annoying-setkeycodes-messages-in-ubuntu/#comments</comments>
		<pubDate>Thu, 12 Oct 2006 01:04:18 +0000</pubDate>
		<dc:creator>kungfuice</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.kungfuice.com/index.php/2006/10/11/get-rid-of-annoying-setkeycodes-messages-in-ubuntu/</guid>
		<description><![CDATA[Assigning Values To Keycodes for Hotkey in Ubuntu Dapper/Edgy.  This works even for non multimedia keys.]]></description>
			<content:encoded><![CDATA[<p>If you have been noticing messages in your logs about unknown key presses I&#8217;ve found a solution that gets rid of them.</p>
<p>I had been getting messages like this in my messages log and wanted to get rid of them</p>
<p class="command">kernel: [17204628.240000] atkbd.c: Unknown key pressed (translated set 2, ode 0xd9 on isa0060/serio0). <br />
[17204628.240000] atkbd.c: Use &#8217;setkeycodes e059 keycode&#8217; to make it known.</p>
<p>[17204603.280000] atkbd.c: Unknown key released (translated set 2, code 0&#215;81 on isa0060/serio0).<br />
[17204603.280000] atkbd.c: Use &#8217;setkeycodes e001 keycode keycode&#8217; to make it know.</p>
<p>These errors were randomly generated when I used any keys on my keyboard.  There are documented cases of having similar problems with media keys on laptops but nothing to do with regular keys.</p>
<p>I decided that since I was not having any problems using my keyboard that I would simply assign these keys to some empty key code to appease the system.</p>
<p>This is how you do it:<br />
Edit The File:&#8221;/usr/share/hotkey-setup/generic.hk&#8221;</p>
<p class="command">sudo gedit /usr/share/hotkey-setup/generic.hk</p>
<p>
Place these lines in the file, remember to use the values of the keys that appear in your logs, don&#8217;t just copy and paste</p>
<p class="command">
setkeycodes e059 254<br />
setkeycodes e001 255
</p>
<p>Now simply restart the hotkey init script by doing:</p>
<p class="command">
sudo /etc/init.d/hotkey-setup restart
</p>
<p>Voila those messages should stop appearing in your logs</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kungfuice.com/index.php/2006/10/11/get-rid-of-annoying-setkeycodes-messages-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
