<?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"
	>

<channel>
	<title>Sunstorm Labs Blog</title>
	<atom:link href="http://www.sunstormlabs.net/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sunstormlabs.net/blog</link>
	<description>We make the storm in your head</description>
	<pubDate>Wed, 10 Dec 2008 10:51:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>Windows and me</title>
		<link>http://www.sunstormlabs.net/blog/2008/11/20/windows_and_me/</link>
		<comments>http://www.sunstormlabs.net/blog/2008/11/20/windows_and_me/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 12:07:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.sunstormlabs.net/blog/?p=103</guid>
		<description><![CDATA[As it turns out, I share a birthday with the Windows OS. Windows is exactly one year older than me. I&#8217;ll drink to that.
I am not the only one.
Nifty.
]]></description>
			<content:encoded><![CDATA[<p>As it turns out, I share a birthday with the Windows OS. Windows is exactly one year older than me. I&#8217;ll drink to that.</p>
<p><a href="http://www.withinwindows.com/2008/11/20/say-happy-birthday-to-microsoft-windows-and-i/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.withinwindows.com/2008/11/20/say-happy-birthday-to-microsoft-windows-and-i/');" target="_blank">I am not the only one.</a></p>
<p>Nifty.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunstormlabs.net/blog/2008/11/20/windows_and_me/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Goodbye, b2evo</title>
		<link>http://www.sunstormlabs.net/blog/2008/11/03/goodbye-b2evo/</link>
		<comments>http://www.sunstormlabs.net/blog/2008/11/03/goodbye-b2evo/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 12:59:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Rants]]></category>

		<category><![CDATA[b2evolution]]></category>

		<category><![CDATA[faggotry]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.sunstormlabs.net/blog/?p=3</guid>
		<description><![CDATA[b2evolution didn&#8217;t go quite as well as I had hoped. A couple of days ago it started giving me HTTP 406 errors for some posts for no apparent reason, and filling my error log with fascinating things like&#8230;
[15-Oct-2008 04:52:15] b2evolution error: MySQL error! / Duplicate entry &#8216;c-events-are-accessors&#8217; for key 2(Errno=1062) / Your query: DataObject::dbinsert()INSERT INTO [...]]]></description>
			<content:encoded><![CDATA[<p>b2evolution didn&#8217;t go quite as well as I had hoped. A couple of days ago it started giving me HTTP 406 errors for some posts for no apparent reason, and filling my error log with fascinating things like&#8230;</p>
<blockquote><p><code>[15-Oct-2008 04:52:15] b2evolution error: MySQL error! / Duplicate entry &#8216;c-events-are-accessors&#8217; for key 2(Errno=1062) / Your query: DataObject::dbinsert()INSERT INTO evo_items__item (post_datestart, post_creator_user_ID, post_notifications_status, post_renderers, post_status, post_locale, post_priority, post_main_cat_ID, post_ptyp_ID, post_url, post_excerpt, post_urltitle, post_comment_status, post_title, post_content, post_wordcount, post_datecreated, post_datemodified, post_lastedit_user_ID) / VALUES (&#8217;2008-10-15 12:52:14&#8242;, &#8216;1&#8242;, &#8216;noreq&#8217;, &#8216;b2evSmil.b2evALnk.evo_videoplug.b2WPAutP.evo_code&#8217;, &#8216;draft&#8217;, &#8216;en-US&#8217;, &#8216;3&#8242;, 16, 1, &#8221;, &#8221;, &#8216;c-events-are-accessors&#8217;, &#8216;open&#8217;, &#8216;C# events are accessors&#8217;, &#8216;An interesting feature of C# I discovered recently is that events are actually accessors, [...] is&#8217;, 60, &#8216;2008-10-15 12:52:14&#8242;, &#8216;2008-10-15 12:52:14&#8242;, 1) in /home/sonic12/public_html/sunstormlabs/inc/_core/model/db/_db.class.php at line 568 / REQUEST_URI: /admin.php / HTTP_REFERER: <a href="http://www.sunstormlabs.net/admin.php?ctrl=items&amp;action=new&amp;blog=1" >http://www.sunstormlabs.net/admin.php?ctrl=items&amp;action=new&amp;blog=1</a><br />
[30-Oct-2008 04:51:01] XML error: Invalid document end at line 2, column 1</code></p></blockquote>
<p>Being patient with software faggotry like the programmer I am, I promptly fixed the error by installing WordPress.</p>
<p>I was fed up with b2evolution anyway. It was doing a lot of stuff that I didn&#8217;t care for, and wasn&#8217;t doing a lot of stuff that I did want. It had support for multiple blogs for people with MPD, and statistics rendered useless by Analytics, but it also had some 3 good (ie: not fixed width) skins available, couldn&#8217;t do comments and their formatting right, had at least 3 URLs for everything, wasn&#8217;t very friendly about posting images, no decent syntax highlighting plugin, and I was feeling left out of all the WordPress feature wanking I keep seeing on other blogs.</p>
<p>The irony is that I picked b2evo in the first place <em>because it wasn&#8217;t WordPress</em> and I wanted to be different. No matter how much I try to convince myself that &#8220;alternative&#8221; doesn&#8217;t mean &#8220;worse&#8221; in every possible context, 10 out of 10.1 times I get a cockslap to the face. Why do I bother?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunstormlabs.net/blog/2008/11/03/goodbye-b2evo/feed/</wfw:commentRss>
		</item>
		<item>
		<title>C# events are actually accessors</title>
		<link>http://www.sunstormlabs.net/blog/2008/10/15/c-events-are-actually-accessors/</link>
		<comments>http://www.sunstormlabs.net/blog/2008/10/15/c-events-are-actually-accessors/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 21:00:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[C#]]></category>

		<category><![CDATA[delegates]]></category>

		<category><![CDATA[events]]></category>

		<guid isPermaLink="false">http://www.sunstormlabs.net/blog/?p=32</guid>
		<description><![CDATA[An interesting feature of C# I discovered recently is that events are actually accessors into Multicast Delegates, much like properties are accessors into other fields.

private string myData;
public string MyData // A property
&#123;
  get &#123; return myData; &#125; // called when the property is read
  set &#123; myData = value; &#125; // called when [...]]]></description>
			<content:encoded><![CDATA[<p>An interesting feature of C# I discovered recently is that events are actually accessors into Multicast Delegates, much like properties are accessors into other fields.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp csharp" style="font-family:monospace;"><span style="color: #0600FF;">private</span> <span style="color: #FF0000;">string</span> myData;
<span style="color: #0600FF;">public</span> <span style="color: #FF0000;">string</span> MyData <span style="color: #008080; font-style: italic;">// A property</span>
<span style="color: #000000;">&#123;</span>
  get <span style="color: #000000;">&#123;</span> <span style="color: #0600FF;">return</span> myData; <span style="color: #000000;">&#125;</span> <span style="color: #008080; font-style: italic;">// called when the property is read</span>
  set <span style="color: #000000;">&#123;</span> myData <span style="color: #008000;">=</span> value; <span style="color: #000000;">&#125;</span> <span style="color: #008080; font-style: italic;">// called when the property is written to</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0600FF;">private</span> EventHandler myDataChanged;
<span style="color: #0600FF;">public</span> <span style="color: #0600FF;">event</span> EventHandler MyDataChanged <span style="color: #008080; font-style: italic;">// An event</span>
<span style="color: #000000;">&#123;</span>
  add <span style="color: #000000;">&#123;</span> myDataChanged <span style="color: #008000;">=</span> <span style="color: #000000;">&#40;</span>EventHandler<span style="color: #000000;">&#41;</span><span style="color: #FF0000;">Delegate</span>.<span style="color: #0000FF;">Combine</span><span style="color: #000000;">&#40;</span> myDataChanged, value <span style="color: #000000;">&#41;</span>; <span style="color: #000000;">&#125;</span> <span style="color: #008080; font-style: italic;">// called when a handler is attached</span>
  remove <span style="color: #000000;">&#123;</span> myDataChanged <span style="color: #008000;">=</span> <span style="color: #000000;">&#40;</span>EventHandler<span style="color: #000000;">&#41;</span><span style="color: #FF0000;">Delegate</span>.<span style="color: #0000FF;">Remove</span><span style="color: #000000;">&#40;</span> myDataChanged, value <span style="color: #000000;">&#41;</span>; <span style="color: #000000;">&#125;</span> <span style="color: #008080; font-style: italic;">// called when a handler is detached</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p><span id="more-32"></span></p>
<p>A vanilla event declaration, without the accessors, does this internally. It also acquires a lock every time it accesses the EventHandler to be thread safe, which we&#8217;re not doing here, and you should, if you need the safety.</p>
<p>A great application of this is to simulate &#8220;bubble&#8221; events in WinForms like in ASP.NET. Take for example a form with a user control with a button in it. If I wanted to receive the button&#8217;s click event on the form, I would have to either expose the button, or handle its event in the control, and raise a different one on the control:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp csharp" style="font-family:monospace;"><span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> MyControl <span style="color: #008000;">:</span> UserControl
<span style="color: #000000;">&#123;</span>
  <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">event</span> EventHandler MyButtonClick;
  Button btn;
&nbsp;
  <span style="color: #0600FF;">public</span> MyControl<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
  <span style="color: #000000;">&#123;</span>
    btn <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Button<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
    btn.<span style="color: #0000FF;">Click</span> <span style="color: #008000;">+=</span> <span style="color: #008000;">new</span> EventHandler<span style="color: #000000;">&#40;</span> btn_Click <span style="color: #000000;">&#41;</span>;
  <span style="color: #000000;">&#125;</span>
&nbsp;
  <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">void</span> myBtn_Click<span style="color: #000000;">&#40;</span> <span style="color: #FF0000;">object</span> sender, EventArgs e <span style="color: #000000;">&#41;</span>
  <span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span> MyButtonClick <span style="color: #008000;">!=</span> <span style="color: #0600FF;">null</span> <span style="color: #000000;">&#41;</span>
      MyButtonClick<span style="color: #000000;">&#40;</span> sender, e <span style="color: #000000;">&#41;</span>;
  <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> MyForm <span style="color: #008000;">:</span> Form
<span style="color: #000000;">&#123;</span>
  MyControl ctl;
&nbsp;
  <span style="color: #0600FF;">public</span> Form<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
  <span style="color: #000000;">&#123;</span>
    ctl <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> MyControl<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
    ctl.<span style="color: #0000FF;">MyButtonClick</span> <span style="color: #008000;">+=</span> <span style="color: #008000;">new</span> EventHandler<span style="color: #000000;">&#40;</span> ctl_MyButtonClick <span style="color: #000000;">&#41;</span>;
  <span style="color: #000000;">&#125;</span>
&nbsp;
  <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">void</span> ctl_MyButtonClick<span style="color: #000000;">&#40;</span> <span style="color: #FF0000;">object</span> sender, EventArgs e <span style="color: #000000;">&#41;</span>
  <span style="color: #000000;">&#123;</span>
    <span style="color: #008080; font-style: italic;">// Button clicked on the control!</span>
  <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>This can get rather bothersome and ugly if you have many buttons. Using an event accessor you can take the handler and attach it to anything you like, so you can just pass-through the handler directly to the button(s).</p>

<div class="wp_syntax"><div class="code"><pre class="csharp csharp" style="font-family:monospace;"><span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> MyControl <span style="color: #008000;">:</span> UserControl
<span style="color: #000000;">&#123;</span>
  Button btn;
&nbsp;
  <span style="color: #0600FF;">public</span> MyControl<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
  <span style="color: #000000;">&#123;</span>
    btn <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Button<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
  <span style="color: #000000;">&#125;</span>
&nbsp;
  <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">event</span> EventHandler MyButtonClick
  <span style="color: #000000;">&#123;</span>
    add <span style="color: #000000;">&#123;</span> btn.<span style="color: #0000FF;">Click</span> <span style="color: #008000;">+=</span> value; <span style="color: #000000;">&#125;</span>
    remove <span style="color: #000000;">&#123;</span> btn.<span style="color: #0000FF;">Click</span> <span style="color: #008000;">-=</span> value; <span style="color: #000000;">&#125;</span>
  <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>There&#8217;s one caveat to this technique, and that&#8217;s when you handle the event somewhere upstream, the &#8220;sender&#8221; would be the button, not the MyControl. This might break encapsulation, and if that&#8217;s important to you, the handle/re-raise method is the way to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunstormlabs.net/blog/2008/10/15/c-events-are-actually-accessors/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to dismantle a Logitech G15 keyboard</title>
		<link>http://www.sunstormlabs.net/blog/2008/05/23/how-to-dismantle-a-logitech-g15-keyboard/</link>
		<comments>http://www.sunstormlabs.net/blog/2008/05/23/how-to-dismantle-a-logitech-g15-keyboard/#comments</comments>
		<pubDate>Fri, 23 May 2008 21:00:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Hardware]]></category>

		<category><![CDATA[dismantle]]></category>

		<category><![CDATA[g15]]></category>

		<category><![CDATA[keyboard]]></category>

		<category><![CDATA[logitech]]></category>

		<guid isPermaLink="false">http://www.sunstormlabs.net/blog/?p=35</guid>
		<description><![CDATA[My Logitech G15 got wet again and none of the keys were working. The logical thing to do, then, is to take it apart and try to figure out what&#8217;s wrong with it.
Note: Don&#8217;t try this at home. It WILL irrevocably void your warranty, and you can easily cause permanent damage to the keyboard.

First, we [...]]]></description>
			<content:encoded><![CDATA[<p>My <a href="http://en.wikipedia.org/wiki/Logitech_G15" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://en.wikipedia.org/wiki/Logitech_G15');">Logitech G15</a> got wet again and none of the keys were working. The logical thing to do, then, is to take it apart and try to figure out what&#8217;s wrong with it.</p>
<p><strong>Note: Don&#8217;t try this at home. It <em>WILL</em> irrevocably void your warranty, and you can easily cause permanent damage to the keyboard.</strong></p>
<p><span id="more-35"></span></p>
<p>First, we need to unscrew all the screws on the bottom plate. The top plate is also locked down by a bunch of plastic hooks, which can be pulled back with the help of a thin screwdriver. Be careful with the silver plastic, since it scratches very easily.</p>
<p><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-1.jpg" ><img class="alignnone size-medium wp-image-36" title="dismantle-g15-1" src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-1-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-2.jpg" ><img class="alignnone size-medium wp-image-37" title="dismantle-g15-2" src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-2-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>The LCD is attached to the top cover with a small FPCB to the main circuit. It can be removed by pulling up the little clamp that holds it in the socket.</p>
<p><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-3.jpg" ><img class="alignnone size-medium wp-image-38" title="dismantle-g15-3" src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-3-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-4.jpg" ><img class="alignnone size-medium wp-image-39" title="dismantle-g15-4" src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-4-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>All of the important electronics are at the top of the keyboard. It&#8217;s rare for the electronics to break during a spill since most of the water gets on the keys themselves. Our next task is to remove the silver plastic panel, the one on which all the keys are.</p>
<p><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-5.jpg" ><img class="alignnone size-medium wp-image-40" title="dismantle-g15-5" src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-5-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-6.jpg" ><img class="alignnone size-medium wp-image-41" title="dismantle-g15-6" src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-6-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>First, it has to be unscrewed. The clear plastic bits that go under it also unscrew at the top, and the FPCB connections can be carefully detached by easing them out of their sockets.</p>
<p>Again, there are plastic hooks holding it in place. These are easier to go around. The bottom ones can be released by bending and twisting the keyboard a bit, and if not there are a handy set of holes one can use to get to them with a thin screwdriver.</p>
<p><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-8.jpg" ><img class="alignnone size-medium wp-image-42" title="dismantle-g15-8" src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-8-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-9.jpg" ><img class="alignnone size-medium wp-image-43" title="dismantle-g15-9" src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-9-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-10.jpg" ><img class="alignnone size-medium wp-image-44" title="dismantle-g15-10" src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-10-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>This should get the keyplate separated from the keyboard.</p>
<p><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-11.jpg" ><img class="alignnone size-medium wp-image-45" title="dismantle-g15-11" src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-11-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-12.jpg" ><img class="alignnone size-medium wp-image-46" title="dismantle-g15-12" src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-12-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-13.jpg" ><img class="alignnone size-medium wp-image-47" title="dismantle-g15-13" src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-13-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>Underneath it, we can see a clear plastic plate and the LEDs used for backlighting the keys. Some of it&#8217;s wet; I&#8217;m on the right track. The real problem lies under it though, so lets get that off too.</p>
<p><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-14.jpg" ><img class="alignnone size-medium wp-image-48" title="dismantle-g15-14" src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-14-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-15.jpg" ><img class="alignnone size-medium wp-image-49" title="dismantle-g15-15" src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-15-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>The backlighting LEDs and their circuits sit in the gaps in the plastic. All those litle white dots diffuse the LED light all over the keyboard.</p>
<p>Beneath it, we have a flexible PCB printed on a transparent substrate. This is what detects keystrokes. It&#8217;s made up of three layers. All those little lines are a very thin layer of conductive material. The middle layer is just a separator that keeps them separated until a key pushes them together. Every top-bottom combination is unique, and when they&#8217;re connected, the keyboard can figure out which key&#8217;s being pressed.</p>
<p><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-16.jpg" ><img class="alignnone size-medium wp-image-50" title="dismantle-g15-16" src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-16-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-17.jpg" ><img class="alignnone size-medium wp-image-51" title="dismantle-g15-17" src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-17-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>What pushes them together is this rubber membrane, which also makes the keys pop back up after being pressed.</p>
<p><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-18.jpg" ><img class="alignnone size-medium wp-image-52" title="dismantle-g15-18" src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-18-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-19.jpg" ><img class="alignnone size-medium wp-image-53" title="dismantle-g15-19" src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-19-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>The problem with this, is that these FPCBs are extremely easy to erode with liquids. Having killed a Saitek Eclipse keyboard before by spilling stuff on it, I already know what to look for&#8230;</p>
<p><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-20.jpg" ><img class="alignnone size-medium wp-image-54" title="dismantle-g15-20" src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-20-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>Dirty, dissolved or corroded connections. This spells doom for all any any keys that they connect to. I&#8217;m still trying to find a good way to clean these that&#8217;ll keep them intact, and I&#8217;m not sure if it&#8217;s even possible. A wet cotton Q-tip seems to do the job, but it&#8217;s important not to use any cleaning products, because they melt the connections right off.</p>
<p>They can be easily tested with a multimeter. Most have a setting that will beep if there&#8217;s a connection.</p>
<p><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-21.jpg" ><img class="alignnone size-medium wp-image-56" title="dismantle-g15-21" src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/dismantle-g15-21-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>Those top connections are definately dead. Just my luck, these control the space bar, the letters A, Z, and parts of the keypad. Not exactly ignorable.</p>
<p>I&#8217;ve called Logitech, and they don&#8217;t sell separate parts. So I either fix it, or get a new keyboard.</p>
<p>Last time, I tried to repair the Saitek using liquid silver. However, the way it is, it&#8217;s hard to apply and takes ages to dry, and, well, didn&#8217;t work. This time I want to try a silver ink pen, which is claimed to be the same, but easier to use.</p>
<p>I&#8217;ve ordered one off eBay. While it doesn&#8217;t come in, I&#8217;ll be using a generic crapo-cheapo keyboard.</p>
<p>Exciting conclusion coming soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunstormlabs.net/blog/2008/05/23/how-to-dismantle-a-logitech-g15-keyboard/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The joys of FLAC</title>
		<link>http://www.sunstormlabs.net/blog/2008/05/02/the-joys-of-flac/</link>
		<comments>http://www.sunstormlabs.net/blog/2008/05/02/the-joys-of-flac/#comments</comments>
		<pubDate>Sat, 03 May 2008 06:15:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Music]]></category>

		<category><![CDATA[flac]]></category>

		<category><![CDATA[mp3]]></category>

		<guid isPermaLink="false">http://www.sunstormlabs.net/blog/?p=25</guid>
		<description><![CDATA[Lets imagine that you have some music in MP3 format, and you&#8217;ve never heard the original source. This could be because you downloaded it from the internet, or bought it at an online music store like iTunes. You imagine that you&#8217;re getting the full musical experience with your 192kbps MP3, because you can listen to [...]]]></description>
			<content:encoded><![CDATA[<p>Lets imagine that you have some music in MP3 format, and you&#8217;ve never heard the original source. This could be because you downloaded it from the internet, or bought it at an online music store like iTunes. You imagine that you&#8217;re getting the full musical experience with your 192kbps MP3, because you can listen to it perfectly well with no distortion or anything, and if the music really needs it, just bump it up to 320kbps to make it absolutely indistinguishable from CD quality.</p>
<p>For the most part, that&#8217;s true, to the point that standard MP3s cover most peoples&#8217; listening needs. I&#8217;ve happily built up a 40+GB MP3 library for several years because of this. But only to a point. My opinion changed when I discovered <a href="http://flac.sourceforge.net/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://flac.sourceforge.net/');">FLAC</a>.</p>
<p><span id="more-25"></span></p>
<blockquote><p>FLAC stands for Free Lossless Audio Codec, an audio format similar to MP3, but lossless, meaning that audio is compressed in FLAC without any loss in quality. This is similar to how Zip works, except with FLAC you will get much better compression because it is designed specifically for audio[...]</p></blockquote>
<p>MP3 is a <em>lossy</em> format. That means that in order to reduce the size of the music file, an MP3 encoder will actually chop off parts of the sound. Like a JPEG, it gets away with this, because the parts that it cuts off are the ones that you are least expected to miss, such as frequencies that aren&#8217;t audible by the human ear. Depending on the bitrate of the file, it can be more or less zealous in cropping down the sounds.</p>
<p>FLAC is lossless, which means that it keeps <em>everything</em>, exactly as in the original. When ripped from your standard <a href="http://en.wikipedia.org/wiki/Red_Book_%28audio_CD_standard%29" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://en.wikipedia.org/wiki/Red_Book_%28audio_CD_standard%29');">Red Book</a> CD, that&#8217;s a mighty <strong>1411.2 kbps</strong> of pure, unadulterated sound.</p>
<div id="attachment_26" class="wp-caption alignnone" style="width: 245px"><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/mp3-flac-comparison.jpg" ><img src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/mp3-flac-comparison-235x300.jpg" alt="MP3-FLAC comparison" title="MP3-FLAC comparison" width="235" height="300" class="size-medium wp-image-26" /></a><p class="wp-caption-text">MP3-FLAC comparison</p></div>
<p>An easy demonstration of just how much of a difference that is, is simply to listen to it. <a href="http://www.muzicman82.net/2007/09/07/to-flac-or-not-a-lossless-vs-mp3-comparison/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.muzicman82.net/2007/09/07/to-flac-or-not-a-lossless-vs-mp3-comparison/');">I took the above image from a MP3/FLAC comparison, made by someone that knows more about this than me, that shows what you get if you subtract the sound of an MP3 recording from the original source</a>. I was quite astonished when I heard it, because there&#8217;s just <em>so much sound</em> getting cut! Even taking in account <a href="http://en.wikipedia.org/wiki/Psychoacoustics" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://en.wikipedia.org/wiki/Psychoacoustics');">psychoacoustics</a>, there&#8217;s just <em>too much</em> to convince me that the difference is indistinguishable.</p>
<p>It seems that this is a pointless argument, unless you can actually prove that you can hear the difference with an <a href="http://en.wikipedia.org/wiki/ABX_test" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://en.wikipedia.org/wiki/ABX_test');">ABX double blind test</a> (<a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=57379" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.hydrogenaudio.org/forums/index.php?showtopic=57379');">bringing it up on an enthusiast forum is sure to bring forth a barrage of furiously masturbating people which will quickly point this out</a>). And while I didn&#8217;t go as far as setting up a scientific experiment, I fell in love with FLAC because I can&#8217;t help but notice that when compared to <strong>commercial grade</strong> MP3s, for a lot of music, it <em>does</em> make a significant difference.</p>
<p>You can really appreciate the increase in resolution. All the subtle and intricate background effects like drum riffs and beats, become sharp and well defined, with the sound&#8217;s &#8220;contour&#8221; much easier to distinguish. Voices sound clearer and with more depth. You even start noticing things like the sound of the singer&#8217;s breathing. Everything gets more &#8220;oomph&#8221; to it. You can almost <em>feel</em>, even if not hear, all of the supposedly &#8220;inaudible&#8221; frequencies, and the sound becomes a lot more friendly to high volume listening. And what astounds me the most is that FLACs actually let me hear parts and effects of the music, which I simply previously didn&#8217;t know of at all. Things like stereo effects, subtle modulations, little sounds and decorations, and so many more tiny things. It&#8217;s almost like rediscovering my favorite music all over again.</p>
<p>Of course, it depends on the music. There are some things that are worth it, and others that aren&#8217;t. A lot of music doesn&#8217;t need all that quality because it doesn&#8217;t actually make use of all of the resolution. But if you take something like <a href="http://www.youtube.com/watch?v=q-c94VVU7zc" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.youtube.com/watch?v=q-c94VVU7zc');">the rich and deep sounds and vocals of Muse</a>, or the <a href="http://ie.youtube.com/watch?v=oGECJP3phyY" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://ie.youtube.com/watch?v=oGECJP3phyY');">addictive electronic pulse of Daft Punk</a>, or just about any live recordings, and FLAC completely blows MP3 out of the water.</p>
<div id="attachment_27" class="wp-caption alignnone" style="width: 310px"><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/daftpunk-pyramid.jpg" ><img src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/daftpunk-pyramid-300x200.jpg" alt="Daft Punk in concert" title="Daft Punk pyramid" width="300" height="200" class="size-medium wp-image-27" /></a><p class="wp-caption-text">Daft Punk in concert</p></div>
<p>And of course, you actually need a decent sound rig to be able to produce the difference in the first place. If you have an integrated sound card, and basic computer speakers, you&#8217;re not going to get much more than MP3 has to offer anyway. Despite all the wild claims of being &#8220;Ultra Clear 3D Hi-Fi Xtreme!&#8221; that chipset manufacturers make, all integrated sound cards sound like utter crap, even for basic things. I&#8217;ve checked this with every motherboard I&#8217;ve owned, and always ended up disappointed. I personally have a Creative X-Fi rigged up to an old <a href="http://www.superfi.co.uk/index.cfm/page/moreinfo.cfm/Product_ID/831" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.superfi.co.uk/index.cfm/page/moreinfo.cfm/Product_ID/831');">Technics SADX850</a> living room amplifier that I confiscated from my parents for never using. That&#8217;s connected to a pair of large, 80 watt front speakers, and three smaller satellites for surround. </p>
<p><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/technics-amplifier.png" ><img src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/technics-amplifier.png" alt="" title="Technics SADX850 Amplifier" width="350" height="138" class="alignnone size-full wp-image-28" /></a></p>
<p>I still lack a dedicated subwoofer, so I also linked it with an old Creative 2.1 speaker set for the bass. It&#8217;s not the best approach, and any real audiophile will wince at the sight of it, but it works quite well. I have a large room to fill with sound, and most computer speakers are designed for covering a small range. At full volume, my rig can be heard two floors down. This is where FLAC really shines.</p>
<p>All of this isn&#8217;t really a compression problem as much as a publishing problem. Keep in mind I&#8217;m comparing FLACs with the kind of MP3s one would normally own - commercial grade MP3s, not handcrafted laboratory MP3s. You can certainly get a lot more from MP3s if you know what you&#8217;re doing and rip them yourself from the original, with the right codecs and the right settings. However, Most MP3s are either downloaded straight from the internet (and judging by the growth of the digital music industry, that tendency will keep growing), or ripped using Media Player, or some other consumer software.</p>
<p>I&#8217;ve worked for two years at <a href="http://www.musicaonline.pt/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.musicaonline.pt/');">MusicaOnline</a>, a digital music shop in Portugal. The usual &#8220;process&#8221; for publishing digital music isn&#8217;t exactly refined. The way things are done, you can easily end up with a &#8220;320 kbps&#8221; file, that got artificially padded up from a 128 kbps WMP/iTunes rip, and was re-encoded half a dozen times by an automated encoding server. I&#8217;ve seen this happen in front of me, and it made me cringe. This wouldn&#8217;t happen if the music got encoded in FLAC, since there&#8217;s no way to rip it in a way that affects the quality of the resulting audio. No matter how you do it, you still get all the same data.</p>
<p>The main reason that lossless methods aren&#8217;t widespread yet is that FLAC files are on average <strong>4 or 5 times bigger</strong> than their 320 kbps MP3 counterparts. An entire CD can easily cost you ~400MB of disk space, plus the increased download time, if you&#8217;re not ripping it yourself. Its size isn&#8217;t friendly to portables either, and because of that, FLAC doesn&#8217;t have the widespread hardware support that MP3 enjoys either. There&#8217;s only <a href="http://flac.sourceforge.net/links.html#hardware" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://flac.sourceforge.net/links.html#hardware');">a handful of portable players that can handle it</a>, but the list is growing.</p>
<p>It&#8217;s also very hard to find digital music stores that sell lossless music, and as usual, it&#8217;s file sharing networks that are leading the way. If you feel that some music could make use of FLAC&#8217;s increased quality, then you can usually <a href="http://btjunkie.org/search?q=FLAC" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://btjunkie.org/search?q=FLAC');">find it on a torrent search</a>. Provided you actually bought the music, <em>obviously</em>.</p>
<p>The size of FLACs doesn&#8217;t intimidate me. Disk space doesn&#8217;t cost much, and drive capacities are counted in <em>terabytes</em> these days. Broadband internet has become widespread as well. We already waste tons of bandwidth on HDTV just so we can inspect the pores on actors&#8217; faces, so why not increase the quality of my audio content as well?</p>
<p>In any case, now that FLAC&#8217;s popularity is increasing and FLAC rips are becoming easier to come by, I&#8217;ve started to migrate parts of my library to it. It&#8217;s still a painful process because of the size and availability, but so far it&#8217;s been paying off. I&#8217;ve been enjoying a lot of music all over again, on a whole different level, and it&#8217;s just awesome. So if you love music as much as I do, give FLAC a try. You might find yourself surprised at all the things you&#8217;ve been missing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunstormlabs.net/blog/2008/05/02/the-joys-of-flac/feed/</wfw:commentRss>
		</item>
		<item>
		<title>I hate Javascript, but I love JQuery</title>
		<link>http://www.sunstormlabs.net/blog/2008/04/29/i-hate-javascript-but-i-love-jquery/</link>
		<comments>http://www.sunstormlabs.net/blog/2008/04/29/i-hate-javascript-but-i-love-jquery/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 22:34:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Web]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.sunstormlabs.net/blog/?p=59</guid>
		<description><![CDATA[When it comes to the web, I prefer to stay on the server, where it&#8217;s safe. I love the stability of the environment I get in server side code, and I detest the client side chaos that goes on in the faggotry of browser wars and their incompatibilities and differences.
If I can, I try to [...]]]></description>
			<content:encoded><![CDATA[<p>When it comes to the web, I prefer to stay on the server, where it&#8217;s safe. I love the stability of the environment I get in server side code, and I detest the client side chaos that goes on in the faggotry of browser wars and their incompatibilities and differences.</p>
<p>If I can, I try to avoid scripting completely. In the current state of browser affairs, I don&#8217;t feel like I can rely on Javascript for anything more than decoration and minor UI enhancements. When I do have to work with Javascript (and by that I mean any client side scripting language), I do it in a very conservative, &#8220;1.0&#8243; way.</p>
<p><span id="more-59"></span></p>
<p><a href="http://valorin.net/thoughts/forget_ajax_use_jue/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://valorin.net/thoughts/forget_ajax_use_jue/');">This post explains my feelings well</a>, and even goes as far as to propose the term &#8220;JUE&#8221;, for &#8220;Javascript Usability Enhancement&#8221;:</p>
<blockquote><p>AJAX [Javascript on the whole], should only be implemented after the page has complete functionality, and should only be used to enhance the usability of the webpage. Every function which is possible through the AJAX, should also be possible in the same or similar way without the AJAX (but usually with an extra page-load or two).</p></blockquote>
<p>This isn&#8217;t just about usabilty, unobtrusiveness, or separation of code though. There are plenty of advantages on starting from the server side and working your way up. Some of my favorites are&#8230;</p>
<ul>
<li><strong>Security:</strong> You can&#8217;t rely on client side validation because it&#8217;s so easy to by pass that even my computer illiterate mother accidentally does it on occasion. HTTP is an open protocol; it&#8217;s stupid to think that well behaved, Javascript-running browsers are the only thing that can get my pages. </li>
<li><strong>Compatibility:</strong> Static HTML makes very few assumptions about the environment it&#8217;s in. It just tells the client of the information it wants to pass along, and lets the client figure out how it wants to render that. This makes it the lowest common denominator for the Web. Javascript, on the other hand, makes a lot of assumptions. Any scripting will only work well in the environment it was written for, while static HTML has a much greater reach.</li>
<li><strong>Transparency:</strong> Static HTML is the closest thing to the true model of the web, while scripting is a higher level layer over it. Focusing primarily on scripting makes it that much easier to miss the right way to do things under the web model, especially for someone for the people that don&#8217;t know what they&#8217;re doing.</li>
<li><strong>Purpose:</strong> Javascript is designed to <em>manipulate bits of document</em>. The fact that it grew into into a full blown UI framework is a mind boggling technological abomination. If you realy want to make a rich, web-based application, why not use something <em>designed</em> for rich UIs, like Flash or Silverlight?</li>
<li><strong>Performance:</strong> Despite all its recent advances, browser scripting performance still doesn&#8217;t hold a candle to desktop applications in terms of speed and responsiveness. Static HTML is still <em>what browsers were designed for</em>, and the features that it supports will always have the best performance. While a static HTML interface might not be as feature rich as a scripted one, its endurance shows that it&#8217;s good enough to be efficient. Being used to the efficiency of static interfaces, the added weight of all of the &#8220;rich&#8221; interfaces makes for an uncomfortably noticeable break in flow.</li>
</ul>
<p>But despite all that, scripting does help address the very real, and always increasing need for rich interfaces on the web. If used right, scripting can have great results for a lot of people.</p>
<p>The <em>real</em> reason why I don&#8217;t like client side scripting is because Javascript, and the way it&#8217;s designed, <strong>doesn&#8217;t make it easy to do anything worthwhile</strong>. Take the fact that it&#8217;s modeled as a low level interface for document manipulation, add the problems that come from browser inconsistencies, top it off with poor debugging and IDE support, and you got yourself a clusterfuck that can be only beaten by the current state of CSS. Every time I pick up Javascript, it&#8217;s a productivity struggle of monumental proportions.</p>
<p>Javascript is like the C++ of web programming: very flexible, but too low level to be adequately productive. So the solution is not to use it at its lowest level, just like I don&#8217;t use Win32 in my apps when I want to get things done. It turns out that there are tons of great libraries that already implement all of those things that you would have to do over and over again in Javascript.</p>
<p>I suppose I should have thought of it before, that maybe a million people have already done this a million times before, and maybe some of those people put it together in a way that takes away the need for me to do for the millionth-first time. I guess I just never saw Javascript as a serious enough language to make &#8220;libraries&#8221; for. Back when I started, Javascript &#8220;libraries&#8221; were the things you copypaste from Javascripts.com to make gay rainbows on your text.</p>
<p>The problem is, every time I tried to research Javascript or AJAX, I always find tons of resources, merrily spewing forth explanations on how to use <code>document.getElementById()</code>, make <code>XMLHttpRequests</code>, or animate things using <code>setTimeout</code> and <code>setInterval</code>, and enumerating the myriads of caveats and their workarounds between browsers. Not once I&#8217;ve seen a site stop, and tell me &#8220;Hey, you! You&#8217;re doing stuff that&#8217;s already been done a million times! Why not just use a library that handles all of this for you?&#8221;</p>
<p>Point in case, I was recently asked to do a small widget that cycles images, <em>&#8220;like the thing on <a href="http://movies.yahoo.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://movies.yahoo.com/');">Yahoo Movies</a>&#8220;</em>. After several hours of browsing sites that explained in great detail all the pages of code I would have to do, and tons of custom implementations of said code that did almost kinda what I wanted, I came across <a href="http://jquery.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://jquery.com/');">JQuery</a>. And it felt like God almighty came down in an angelic choir, and slapped the Truth into my face with a tire iron. I was enlightened.</p>
<p>JQuery delivered an <em>excelent</em> first impression. Having had no previous experience with it whatsoever, it took me 10 minutes, and a grand total of two lines of code to make my animated scroller. It already had everything done for me, starting from a CSS-like element finder syntax, to automatic tweening of any value. I don&#8217;t usually enjoy adding non-standard, external libraries to my code, but this one of those things that really<em> should</em> be standard, and only isn&#8217;t because all the other JS toolkits would cry their eyes out.</p>
<p>It seems Javascript coders suffer a lot from the &#8220;<a href="http://en.wikipedia.org/wiki/Not_Invented_Here" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://en.wikipedia.org/wiki/Not_Invented_Here');">Not Invented Here</a>&#8221; syndrome. Maybe it&#8217;s because you don&#8217;t need anything but a browser to write Javascript. Maybe watching your page come to life after all of that hard work is very satisfying. Maybe they&#8217;re afraid that if someone looks at their code and sees them use a <em>library</em>, they won&#8217;t seem as hardcore. Or maybe someone just needs to clean up the internet of all of the feces that the last generation of Javascripters left behind.</p>
<p>I, however, don&#8217;t have the patience for it. From now on, I&#8217;ll just be dropping JQuery into all of my projects.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunstormlabs.net/blog/2008/04/29/i-hate-javascript-but-i-love-jquery/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Don&#8217;t pull out the Logitech G15&#8217;s keys</title>
		<link>http://www.sunstormlabs.net/blog/2008/04/28/dont-pull-out-the-logitech-g15s-keys/</link>
		<comments>http://www.sunstormlabs.net/blog/2008/04/28/dont-pull-out-the-logitech-g15s-keys/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 16:46:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Hardware]]></category>

		<category><![CDATA[g15]]></category>

		<guid isPermaLink="false">http://www.sunstormlabs.net/blog/?p=80</guid>
		<description><![CDATA[You&#8217;d think that the Logitech G15, the greatest achievement in keyboard technology known to man, would react better to the common task of removing the keys to clean the coke I just snorted all over it (I&#8217;m talking about the drink; the G15 handles powder spills just fine). And yet, now the keys are sticking if they&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;d think that the <a href="http://en.wikipedia.org/wiki/Logitech_G15" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://en.wikipedia.org/wiki/Logitech_G15');">Logitech G15</a>, the greatest achievement in keyboard technology known to man, would react better to the common task of removing the keys to clean the coke I just snorted all over it (I&#8217;m talking about the drink; the G15 handles powder spills just fine). And yet, now the keys are sticking if they&#8217;re not pressed exactly in the middle.</p>
<p>It seems that the plastic hooks that keep the keys upright don&#8217;t take too well to bending, and now that I pried them out, the bent hooks let the keys play from side to side. So pressing the key slightly from the side will make it tilt and get stuck in its shaft, making it hard to press, and sometimes making it stick.</p>
<p>One of the greatest offenders is the left Ctrl key, which now makes it hell to copy and paste, and the F key, which now makes it hell to tell Logitech to go Fuck themselves for making me consider dropping a hundred bucks every time I want to clean my keyboard.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunstormlabs.net/blog/2008/04/28/dont-pull-out-the-logitech-g15s-keys/feed/</wfw:commentRss>
		</item>
		<item>
		<title>I hate ads, but I can&#8217;t be bothered to block them</title>
		<link>http://www.sunstormlabs.net/blog/2008/04/22/i-hate-ads-but-i-cant-be-bothered-to-block-the/</link>
		<comments>http://www.sunstormlabs.net/blog/2008/04/22/i-hate-ads-but-i-cant-be-bothered-to-block-the/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 02:15:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.sunstormlabs.net/blog/?p=99</guid>
		<description><![CDATA[My problem with internet advertising is that during my entire decade or so of browsing, I haven&#8217;t once seen an ad for anything that I&#8217;ve ever been even remotely interested in. I don&#8217;t see it happening any time in the future either, unless ad targeting systems somehow learn to scan my mind for my deepest [...]]]></description>
			<content:encoded><![CDATA[<p>My problem with internet advertising is that during my entire decade or so of browsing, I haven&#8217;t once seen an ad for anything that I&#8217;ve ever been even remotely interested in. I don&#8217;t see it happening any time in the future either, unless ad targeting systems somehow learn to scan my mind for my deepest desires. A lot of this is because I live in a small, obscure, European country (the local websites of which I do not browse), which makes my relevant ad domain a lot smaller.</p>
<p>But the main issue is that <strong>ads are the internet equivalent of cold calls</strong>. And cold calls are deplorable because they assume that I&#8217;m somehow incapable of finding what I want on my own. If I want a product to perform some specific task, then <em>I will search for it</em>. I don&#8217;t want to be constantly reminded that there&#8217;s an application that can insert gay ass smilies into my emails. I&#8217;m not interested, I don&#8217;t need your products, and I don&#8217;t want to hear about them, because I am not going to buy them, period. When and if I, for some reason, start needing a gay smilie application, then I&#8217;ll Google it. I will then commit seppuku to retain my honor.</p>
<p><span id="more-99"></span></p>
<p>Then there are ads that insult my intelligence. Things like &#8220;You won the internet lottery!&#8221;, or &#8220;You&#8217;re the 1000000th visitor! (for the 10th time today!)&#8221;, or &#8220;You have 10 new messages from hot babes that want to bang you!&#8221;, or &#8220;You have 159834 viruses!&#8221; piss me off to no end, especially when they try to (badly) disguise themselves as OS windows or alerts. I hate you specifically, CPX Interactive and your &#8220;minigame&#8221; flash banners that tell you to eat more bananas than the other monkey or do more pushups than the jock to win a ringtone. You think I don&#8217;t see that you&#8217;re just baiting for clicks? Don&#8217;t you think that if I wanted a ringtone, I&#8217;d just go to a god damn ringtone website? And yet there it is, moving and jumping around and going &#8220;Waaah, you lost, try again!&#8221; in my periferic vision. It&#8217;s enraging.</p>
<p>I can&#8217;t wrap my mind around how can all of these cold-call-like techniques actually work well enough to be a viable marketing approach. Because of all of this, I see ads as a waste of my screen space, and a waste of brain processing cycles.</p>
<p>I do, however, understand the need for banner ads as a way to support free content websites. And this is why I don&#8217;t block ads, unless they go out of their way to annoy me. The way I see things, <strong>advertisers are paying <em>me</em> for my attention</strong> and time that I spend to make note of their product. I am, in turn, automatically donating this money to the website that provided me with the useful content. This is acceptable.</p>
<p>I don&#8217;t care about the advertiser. I didn&#8217;t ask them about their products, so it&#8217;s their fault if they&#8217;re spending money on trying to force them on me. I only care about my comfort, and about the comfort of people that offer me useful content or services. An adblock application that loads the banners (and still registers the hits), but doesn&#8217;t show them, for me, is the best of both worlds.</p>
<p>This might seem a bit selfish. Some might be quick to argue that if noone actually looks at the banners, then advertisers will see them as ineffective and stop using them, which will then harm the sites which host the ads. Luckily, the way the internet is, being selfish in my position is acceptable, because the internet has an endless supply of people that <em>don&#8217;t</em>think like me. These are the people that don&#8217;t have an opinion on advertising, and people that actually click on these things, and people that are absolutely thrilled in being faster at eating bananas than the other monkey. These are also the people that install spyware on their computer, and then pay money to have it removed.</p>
<p>These people vastly outnumber people like me. They are the plankton that everyone else on the internet can feed on. And while we have them, I won&#8217;t feel bad about hiding ads.</p>
<p>Some ads I actually like though. These ads are the ones that clearly describe the product, and tell me why I should be interested in it. They are subtle, corteous and don&#8217;t boss me around (&#8221;Buy this! Drink that! Watch this!&#8221;) in an attempt to trigger impulse buys.</p>
<p>The best example of these is the ads on <a href="http://www.codinghorror.com/blog/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.codinghorror.com/blog/');">Coding Horror</a>, which are just small, clearly marked, bits of subtly highlighted text at the end of each post. It feels like the advertiser is genuinely trying to get the word out about their product, instead of trying to attract the most number of clicks and attention.</p>
<p>This is what ads should be like, and they&#8217;re the ones that work the best in environments where there isn&#8217;t as much plankton, such as tech sites.</p>
<p>It&#8217;s too bad that an ad like this actually asks for some merit on the advertiser&#8217;s part. If one was to ask this from all of the advertisers, there would only be a few that could make up a convincing argument for their product. Most of advertising nowadays is convincing people that something is better than it really is.</p>
<p>In reality, I don&#8217;t even hide ads, because I really can&#8217;t be bothered. Most of them aren&#8217;t <em>that</em> annoying that I actually feel that the effort is justified just for the purpose of <em>not having to look at something</em>. Maybe I just don&#8217;t want to give the advertisers the satistfaction of having me waste my energy on blocking their ads.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunstormlabs.net/blog/2008/04/22/i-hate-ads-but-i-cant-be-bothered-to-block-the/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Vista SP1 &#8220;Unauthorized Changes&#8221;</title>
		<link>http://www.sunstormlabs.net/blog/2008/03/20/vista-sp1-unauthorized-changes/</link>
		<comments>http://www.sunstormlabs.net/blog/2008/03/20/vista-sp1-unauthorized-changes/#comments</comments>
		<pubDate>Thu, 20 Mar 2008 16:59:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Windows]]></category>

		<category><![CDATA[fix]]></category>

		<guid isPermaLink="false">http://www.sunstormlabs.net/blog/?p=84</guid>
		<description><![CDATA[I left Windows Update installing Vista SP1 today, however, instead of a nice and upgraded system, I got locked out of my computer with this lovely message:
Clicking on Learn More Online took me Microsoft&#8217;s Genuine Advantage validation site, which happily reported that my copy of Vista isn&#8217;t genuine, with error code 0xc004d401. It was convinced [...]]]></description>
			<content:encoded><![CDATA[<p>I left Windows Update installing Vista SP1 today, however, instead of a nice and upgraded system, I got locked out of my computer with this lovely message:</p>
<div id="attachment_85" class="wp-caption alignnone" style="width: 310px"><a href="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/vista-unauthorized-changes.png"><img src="http://www.sunstormlabs.net/blog/wp-content/uploads/2008/11/vista-unauthorized-changes-300x209.png" alt="[Window Title]<br />
Windows software protection</p>
<p>[Main Instruction]<br />
An unauthorized change was made to Windows.</p>
<p>[Content]<br />
Windows has discovered a change that will result in limited Windows functionality. Use the link below to find out how to fix Windows.</p>
<p>[Learn more online] [Close]" title="Vista Unauthorized Changes" width="300" height="209" class="size-medium wp-image-85" /></a><p class="wp-caption-text">Vista screwed itself over </p></div>
<p>Clicking on Learn More Online took me Microsoft&#8217;s Genuine Advantage validation site, which happily reported that my copy of Vista isn&#8217;t genuine, with error code 0xc004d401. It was convinced that I had some kind of incompatible software that was interfering with validation, and gave me a list of anti-virus and malware checker programs that have been known to cause this problem. Obviously, I had none of them, or at all, ever.</p>
<p>It turns out that this was caused by Vista hosing itself while trying to update to SP1. I&#8217;m not sure if it&#8217;s caused specifically by SP1, or any of the updates that I installed before SP1, but actually getting SP1 to install fixes the problem. Microsoft&#8217;s suggestion to reboot into safe mode won&#8217;t help, because you can run neither WGA, or Windows Update from there. Luckily, It doesn&#8217;t take much to circumvent the lockout.</p>
<ol>
<li>Click on Learn More Online</li>
<li>Type in &#8220;file:///c:&#8221;, without the quotes. This will get you into Explorer.</li>
<li>Use the Folders pane to navigate to the Control Panel, at the bottom.</li>
<li>Use the little arrow to expand it, and open Windows Update.</li>
<li>Check for updates. If you have SP1 waiting for you, download and install.</li>
</ol>
<p>If that doesn&#8217;t work for you, or SP1 doesn&#8217;t show up as an update, then you likely have a different problem. You can still make life easier for yourself by navigating to the Windows directory and from there launching Explorer.exe, <strong>which will give you your desktop back</strong>. Some things will be disabled, and you&#8217;ll have a memory quota that&#8217;ll only allow you to launch two or three programs at a time, but it&#8217;ll make troubleshooting a bit less painful.</p>
<p>I installed SP1 and the problem went away, and Windows validates fine now. I was tipped off to a failed SP1 install being the culprit, because there was a task in the Task Scheduler that called for a &#8220;HitmanSp1.exe&#8221; (which didn&#8217;t exist) to be launched. Microsoft, your killers fail again!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunstormlabs.net/blog/2008/03/20/vista-sp1-unauthorized-changes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>register_shutdown_function after all the other register_shutdown_functions</title>
		<link>http://www.sunstormlabs.net/blog/2008/03/14/shutdown_function-after-all-the-other-functions/</link>
		<comments>http://www.sunstormlabs.net/blog/2008/03/14/shutdown_function-after-all-the-other-functions/#comments</comments>
		<pubDate>Fri, 14 Mar 2008 16:35:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.sunstormlabs.net/blog/?p=73</guid>
		<description><![CDATA[PHP&#8217;s register_shutdown_function lets me run code after it finishes running the script, be that naturally or forcibly. This makes it a perfect fit for a whole bunch of things, like running maintenance database queries or showing debugging information.

function do_maintenance&#40;&#41;
&#123;
  $db-&#38;gt;doSomeQueries&#40;&#41;;
&#125;
&#160;
function debug_write&#40;&#41;
&#123;
  echo 'some debugging information';
&#125;
&#160;
// Last things to execute
register_shutdown_function&#40; 'do_maintenance' &#41;;
register_shutdown_function&#40; 'debug_write' &#41;;

There&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>PHP&#8217;s <code>register_shutdown_function</code> lets me run code after it finishes running the script, be that naturally or forcibly. This makes it a perfect fit for a whole bunch of things, like running maintenance database queries or showing debugging information.</p>

<div class="wp_syntax"><div class="code"><pre class="php php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> do_maintenance<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$db</span><span style="color: #339933;">-&amp;</span>gt;doSomeQueries<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> debug_write<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #990000;">echo</span> <span style="">'some debugging information'</span>;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Last things to execute</span>
<span style="color: #990000;">register_shutdown_function</span><span style="color: #009900;">&#40;</span> <span style="">'do_maintenance'</span> <span style="color: #009900;">&#41;</span>;
<span style="color: #990000;">register_shutdown_function</span><span style="color: #009900;">&#40;</span> <span style="">'debug_write'</span> <span style="color: #009900;">&#41;</span>;</pre></div></div>

<p>There&#8217;s one caveat, and it&#8217;s explained in the PHP documentation:</p>
<blockquote><p>Multiple calls to register_shutdown_function() can be made, and each will be called in the same order as they were registered.</p></blockquote>
<p><span id="more-73"></span></p>
<p>This means that if I also want to see debug output from the queries in the <code>do_maintenance</code> function, I have to make sure that debug_write is always the <em>last registered function</em>.</p>
<p>This can be inconvenient. Luckily, PHP has a function that allows a script to run code after it&#8217;s finished all of it&#8217;s processing&#8230; And it lets me register another shutdown function inside that function.</p>

<div class="wp_syntax"><div class="code"><pre class="php php" style="font-family:monospace;"><span style="color: #990000;">register_shutdown_function</span><span style="color: #009900;">&#40;</span>
  <span style="color: #990000;">create_function</span><span style="color: #009900;">&#40;</span> <span style="">''</span><span style="color: #339933;">,</span> <span style="">'register_shutdown_function(<span style="">\'</span>debug_write<span style="">\'</span>);'</span> <span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">// Really last thing to execute</span>
<span style="color: #009900;">&#41;</span>; 
&nbsp;
<span style="color: #990000;">register_shutdown_function</span><span style="color: #009900;">&#40;</span> <span style="">'do_maintenance'</span> <span style="color: #009900;">&#41;</span>; <span style="color: #666666; font-style: italic;">// Last thing to execute</span></pre></div></div>

<p>This assures that the function that it registered will always be the last one, and this way, despite having the debug function registered before the maintenance function, the debug function will still execute last.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sunstormlabs.net/blog/2008/03/14/shutdown_function-after-all-the-other-functions/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
