<?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>KODA &#187; Kode</title>
	<atom:link href="http://www.chromakode.com/blog/category/kode/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chromakode.com/blog</link>
	<description>Art, Linux, Fun</description>
	<lastBuildDate>Sun, 20 Jul 2008 18:49:43 +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>Using a Logitech LX7 mouse in Ubuntu Edgy: &#8220;IHATEKLUDGERS&#8221;</title>
		<link>http://www.chromakode.com/blog/2007/09/19/logitech-lx7-in-ubuntu-edgy-ihatekludgers/</link>
		<comments>http://www.chromakode.com/blog/2007/09/19/logitech-lx7-in-ubuntu-edgy-ihatekludgers/#comments</comments>
		<pubDate>Wed, 19 Sep 2007 09:13:27 +0000</pubDate>
		<dc:creator>chromakode</dc:creator>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://www.chromakode.com/blog/2007/09/19/logitech-lx7-in-ubuntu-edgy-ihatekludgers/</guid>
		<description><![CDATA[Bought a shiny new mouse today: the wireless optical Logitech LX7. Everything worked great out of box, until at around 11:30pm I decided to google around to see how to configure the tilt-wheel and back and forward buttons to work in Linux.
Big mistake.
It&#8217;s now 1:35am, and I finally have my solution. The trick is to [...]]]></description>
			<content:encoded><![CDATA[<p>Bought a shiny new mouse today: the wireless optical <a href="http://www.logitech.com/index.cfm/mice_pointers/mice/devices/152&amp;cl=us,en">Logitech LX7</a>. Everything worked great out of box, until at around 11:30pm I decided to google around to see how to configure the tilt-wheel and back and forward buttons to work in Linux.</p>
<p>Big mistake.</p>
<p>It&#8217;s now 1:35am, and I finally have my solution. The trick is to use the <strong>evdev</strong> X.org input driver, as for some reason the <strong>mouse</strong> driver can&#8217;t handle all of my buttons. I followed sections 1 and 2 of <a href="http://ubuntuforums.org/showthread.php?t=219894">this howto</a> for the general idea of setting up evdev.</p>
<p>The problem is, none of the howtos I dug up really worked. Things sort of worked, but there seemed to be confusion about the number of buttons (xmodmap reported 9, while xev dumped events from up to #12). Also, the tilt wheel mapping seemed to be reversed. At this point, I began to suspect something was going awry, so I started looking over <code>/var/log/Xorg.0.log</code>. Here&#8217;s what I found:</p>
<p>For some reason, X seemed to be adding a new &lt;default mouse&gt; InputDevice with the message &#8220;No default mouse found, adding one.&#8221; This mouse used the standard <strong>mouse</strong> input 	driver, and somehow was jumping in front of my configured mouse settings as the default mouse. Oddly, running <code>xinput list</code> showed that my properly configured <strong>evdev</strong> device was loaded perfectly (with 20 buttons!), but apparently wasn&#8217;t being used as the primary mouse.</p>
<p>I persisted twiddling with X config settings and checking the logs, but for some reason, this default mouse would always be created. At this point I started googling this strange &#8220;no default mouse found&#8221; message. The only apropos result, and my solution, was in <a href="http://zaitcev.livejournal.com/108617.html">this blog post</a>. It seems that someone decided to write a failsafe hack in 7.2 where if no InputDevice using the <strong>mouse</strong> driver exists in xorg.conf, <em>the server adds one</em>.</p>
<p>As <a href="http://zaitcev.livejournal.com/">Zaitcev</a> writes, as apparent from the code, this hack has one exception, in which if some InputDevice invokes the driver <strong>void</strong>, it assumes that the user (as the code states) &#8220;probably wants to run footless&#8221;, and no default mouse is instantiated. Thus, the solution:</p>
<blockquote>
<pre>Section "InputDevice"
Identifier    "Configured Mouse"
	Driver        "evdev"
	Option        "CorePointer"
	Option        "Device"        "/dev/input/event2"
EndSection

Section "InputDevice"
	Identifier  "IHATEKLUDGERS"
	Driver      "void"
EndSection

[...]

Section "ServerLayout"
	[...]
	InputDevice    "Configured Mouse"
	InputDevice    "IHATEKLUDGERS"
EndSection</pre>
</blockquote>
<p>Unbelievable.</p>
<p>Apparently, this will be fixed in 7.3.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chromakode.com/blog/2007/09/19/logitech-lx7-in-ubuntu-edgy-ihatekludgers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Front Page Realign</title>
		<link>http://www.chromakode.com/blog/2006/07/23/frontpage-realign/</link>
		<comments>http://www.chromakode.com/blog/2006/07/23/frontpage-realign/#comments</comments>
		<pubDate>Sun, 23 Jul 2006 07:00:05 +0000</pubDate>
		<dc:creator>chromakode</dc:creator>
				<category><![CDATA[Chroma]]></category>
		<category><![CDATA[Diary]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.chromakode.com/blog/2006/07/23/frontpage-realign/</guid>
		<description><![CDATA[I did a considerable realign of the chromakode.com front page today while chilling online with Whatah. We both decided out of the blue to redesign our websites, and after hours of tinkering, we both managed to overhaul them in an afternoon. Thereâ€™s all sorts of new delicious markup-y goodness for you and your web browser [...]]]></description>
			<content:encoded><![CDATA[<p>I did a considerable realign of the <a href="http://www.chromakode.com">chromakode.com front page</a> today while chilling online with <a href="http://whatah.nyunderground.net/">Whatah</a>. We both decided out of the blue to redesign our websites, and after hours of tinkering, we both managed to overhaul them in an afternoon. Thereâ€™s all sorts of new delicious markup-y goodness for you and your web browser to enjoy, as well as huge bandwidth wasting backgrounds a-plenty. <img src="http://www.chromakode.com/blog/wp-includes/images/yahoo/yahoo1.gif" class="wp-smiley" /></p>
<p>I decided to be a little bit risky this time and do some subtle transparency over large swaths of the layoutâ€¦ it shall be interesting to see the <a href="http://browsershots.org/website/1214213/">browser compatibility</a> fallout from this one (I laugh at how badly this breaks now in IE) <img src="http://www.chromakode.com/blog/wp-includes/images/yahoo/yahoo4.gif" class="wp-smiley" />. Here&#8217;s a <a href="http://www.chromakode.com/screenshots/realign.png">screenshot of it on my desktop</a> for your comparison/reference. Also, here&#8217;s the <a href="http://www.chromakode.com/art/albums/scraps/realign.png">original mockup</a> I made when first envisioning the design. All in all, Iâ€™m really happy about the update. The typography is something I fussed with the most on this, and I finally feel like I can be satisfied with the lettering looking good on-screen. Yay! Well, Iâ€™m excited and exhausted.</p>
<p>Sorry there hasnâ€™t been much going on here as of late â€” though I have been busy working on a new art project here that I will disclose more details about as soon as it is ready. <img src="http://www.chromakode.com/blog/wp-includes/images/yahoo/yahoo1.gif" class="wp-smiley" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chromakode.com/blog/2006/07/23/frontpage-realign/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tremendously Tremulous</title>
		<link>http://www.chromakode.com/blog/2006/07/16/tremendously-tremulous/</link>
		<comments>http://www.chromakode.com/blog/2006/07/16/tremendously-tremulous/#comments</comments>
		<pubDate>Sun, 16 Jul 2006 07:40:09 +0000</pubDate>
		<dc:creator>chromakode</dc:creator>
				<category><![CDATA[Linkage]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.chromakode.com/blog/2006/07/16/tremendously-tremulous/</guid>
		<description><![CDATA[Over the past few days I&#8217;ve become hopelessly addicted to the game Tremulous, ever since reading about it on NewsForge. While I originally thought of the NewsForge author&#8217;s opinion of Tremulous as &#8220;The best free software game ever&#8221; seemed a bit excessive, after trying it out and getting into the game, I have to agree. [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past few days I&#8217;ve become hopelessly addicted to the game <a href="http://tremulous.net/">Tremulous</a>, ever since <a href="http://entertainment.newsforge.com/entertainment/06/07/06/0414224.shtml?tid=22">reading about it on NewsForge</a>. While I originally thought of the NewsForge author&#8217;s opinion of Tremulous as &#8220;The best free software game ever&#8221; seemed a bit excessive, after trying it out and getting into the game, I have to agree. This is a seriously great game.</p>
<p>What piqued my interest was the fact that it was based on the Quake 3 engine, GPL&#8217;d, and would run on Linux. After downloading it and<br />
giving it a spin, I must say I was shocked I had never heard of it before. It is possible that this is because the standalone 1.1.0 version was released less than 4 months ago, though with the quality and polish of this game, I would have expected to be seeing and hearing about it all over. The game looks and feels fantastic, and all of the graphics and user interfaces are very professionally designed. I really love the concepts of the buildings and units as well as the creativity shown in the popular maps, with tons of interesting and well-themed nooks and crannies. Tremulous also has a unique fast-paced mixture of Real Time Strategy and First-Person Shooter gameplay, which makes it fun but also strategically interesting.</p>
<p>What more can I say? I am really enjoying this game. Be careful though&#8230; try it out, and you too will soon be addicted! <img src="http://www.chromakode.com/blog/wp-includes/images/yahoo/yahoo1.gif" class="wp-smiley" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chromakode.com/blog/2006/07/16/tremendously-tremulous/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The most evil python script you will likely ever encounter.</title>
		<link>http://www.chromakode.com/blog/2006/07/08/the-most-evil-python-script-you-will-ever-encounter/</link>
		<comments>http://www.chromakode.com/blog/2006/07/08/the-most-evil-python-script-you-will-ever-encounter/#comments</comments>
		<pubDate>Sun, 09 Jul 2006 05:29:09 +0000</pubDate>
		<dc:creator>chromakode</dc:creator>
				<category><![CDATA[Curiousity]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.chromakode.com/blog/2006/07/08/the-most-evil-python-script-you-will-ever-encounter/</guid>
		<description><![CDATA[A little while ago I told Whatah about a little obfuscated Python toy I had hatched together about a year before. Unfortunately, this hack was extremely version-dependent, so when I brought up the code (from the era of 2.3) to send to him, of course it did not work with Python 2.4. Well, I wanted [...]]]></description>
			<content:encoded><![CDATA[<p>A little while ago I told <a href="http://whatah.nyunderground.net/">Whatah</a> about a little obfuscated <a href="http://www.python.org/">Python</a> toy I had hatched together about a year before. Unfortunately, this hack was extremely version-dependent, so when I brought up the code (from the era of 2.3) to send to him, of course it did not work with Python 2.4. Well, I wanted it to work. So I got to tinkering again and this evening, with Whatah&#8217;s help, we have made this little critter much much more evil. Consider it a programming puzzle, a riddle written in Python. There shall be no hints, though if you are willing to run code before knowing fully what it does, you are a braver fiddler than I&#8230;</p>
<blockquote><p><code style="margin: 0pt; text-indent: 0pt;"># Abandon all hope,  ye who enter here<br />
_=lambda _, __:getattr(_.__dict__, "values")()[__];__=__builtins__;___ =['\'&lt;BZh91AY&amp;SY', 'e3', '93', 'd9', 'e6', '00', '00', '12', '9f', '80pe', '00', '08', '08@@\\n.g', 'dc', 'a0 ', '00P', 'a0', '00h', '00', '00j', "9bS&amp;\\'", 'a9', 'a7', 'a9', '906SH-f', 'c1', 'f6', '8cS', '12', 'a9', 'ad', 'c1', '08', 'ee_', '0b', 'd9d', 'c1', '17', 'd7', '93', 'bc', '9e', 'ceI', 'c0', '1a', '87guj', '0cc', 'aadF', '18', 'ec', '89', '12', 'fc]', 'c9', '14', 'e1BC', '8eOg', '983\''];_one = _(_(__, 92), 46);_1=lambda ___:_(__, 96)(___);_2=lambda ___: _one('', ___);_3=lambda ___:_(__, 112)(_(__, 0111+2), ___);_4=(98, 122, 50);_24=_1(_2(_3(_4)));_6=lambda __:_(_24, 4)(__);exec _6(eval(_one(r'\x', ___))[1:-1:1])</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.chromakode.com/blog/2006/07/08/the-most-evil-python-script-you-will-ever-encounter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tinkering</title>
		<link>http://www.chromakode.com/blog/2006/06/12/tinkering/</link>
		<comments>http://www.chromakode.com/blog/2006/06/12/tinkering/#comments</comments>
		<pubDate>Mon, 12 Jun 2006 07:00:30 +0000</pubDate>
		<dc:creator>chromakode</dc:creator>
				<category><![CDATA[Kode]]></category>

		<guid isPermaLink="false">http://www.chromakode.com/blog/2006/06/11/tinkering/</guid>
		<description><![CDATA[Just taking a break from schoolwork to test out the Wordpress &#8220;Updated Today&#8221; Plugin&#8230; 
]]></description>
			<content:encoded><![CDATA[<p>Just taking a break from schoolwork to test out the <a href="http://insomniacsyndicate.net/speak/?p=16">Wordpress &#8220;Updated Today&#8221; Plugin</a>&#8230; <img src="http://www.chromakode.com/blog/wp-includes/images/yahoo/yahoo1.gif" class="wp-smiley" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chromakode.com/blog/2006/06/12/tinkering/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Lots of improvements to the &#8220;Story Game&#8221;</title>
		<link>http://www.chromakode.com/blog/2006/05/31/more-work-on-the-story-game/</link>
		<comments>http://www.chromakode.com/blog/2006/05/31/more-work-on-the-story-game/#comments</comments>
		<pubDate>Thu, 01 Jun 2006 06:51:23 +0000</pubDate>
		<dc:creator>chromakode</dc:creator>
				<category><![CDATA[Kode]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.chromakode.com/blog/2006/05/31/more-work-on-the-story-game/</guid>
		<description><![CDATA[Enter the story game.
The latter part of this weekend and memorial day were spent debugging the PHP/Ajax story game I wrote about earlier. Why all this debugging you may ask? Well, as insta had put it, I dove in way too fast. I decided that I should move everything over to MySQL and custom database [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.chromakode.com/projects/story/">Enter the story game.</a></p>
<p>The latter part of this weekend and memorial day were spent debugging the PHP/Ajax story game I <a href="http://www.chromakode.com/blog/2006/05/22/learning-a-little-ajax-2/">wrote about earlier</a>. Why all this debugging you may ask? Well, as insta had put it, I dove in way too fast. I decided that I should move everything over to MySQL and custom database <a href="http://www.php.net/manual/en/function.session-set-save-handler.php">session management</a>. This promptly led me to the brink of insanity and nearly giving up the project entirely. Well, while I have gone insane, I didn&#8217;t give up, and sure enough &#8211; last night I actually got it working.</p>
<p>Yay! This switch to a database backend has given me the control I needed to implement some new ideas from the past week. After some more MySQL tinkering, and throwing in some <a href="http://www.json.org/">JSON magic</a> to pack several variables into one refresh request, things are actually starting to look pretty cool. <img src="http://www.chromakode.com/blog/wp-includes/images/yahoo/yahoo4.gif" class="wp-smiley" /></p>
<p>For one, you&#8217;ll notice a new realtime user counter on the right hand side of the page. This is updated periodically along with the story. You&#8217;ll instantly know when people come in, and the counter will decrease once sessions time out. Also, with the added session monitoring capabilities added by MySQL, I&#8217;ve switched the refresh data from containing the full, complete story data to incremental additions. This should seriously speed up the transfer times, and make it scale much better as the story gets longer. </p>
<p>Since I was on a roll with this JSON stuff, I also added a variable to monitor whether or not the user has posted the most recent word. This allows me to gray out the input boxes when not available, making the user interface a lot more reactive and intuitive. To top it off, I am now utilizing the very awesome <a href="http://www.axentric.com/posts/default/7">Fade Anything Technique</a> to do those neat Ajax-y fades in the story and the user counter when information is changed. </p>
<p>Try it out and you&#8217;ll see what I mean. With these new changes I think this app is really starting to show promise. <u>I&#8217;d love to have some feedback on the general feel of the thing and any feature requests.</u> Right now, the next two items on my list are colored underlines to differentiate senders, and an adaptive &#8220;smart&#8221; refresh timeout to maximise responsiveness and minimize my bills over at <a href="http://www.nearlyfreespeech.net">NearlyFreeSpeech</a>&#8230; <img src="http://www.chromakode.com/blog/wp-includes/images/yahoo/wink.gif" class="wp-smiley" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chromakode.com/blog/2006/05/31/more-work-on-the-story-game/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Learning a little AJAX</title>
		<link>http://www.chromakode.com/blog/2006/05/22/learning-a-little-ajax-2/</link>
		<comments>http://www.chromakode.com/blog/2006/05/22/learning-a-little-ajax-2/#comments</comments>
		<pubDate>Mon, 22 May 2006 07:01:01 +0000</pubDate>
		<dc:creator>chromakode</dc:creator>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.chromakode.com/blog/2006/05/22/learning-a-little-ajax-2/</guid>
		<description><![CDATA[Today was spent experimenting with something I&#8217;ve intended to for a long time: PHP and AJAX. I finally bit the bullet and started learning it in earnest. 
This morning was spent searching for a suitable PHP toolkit to tinker with. The one I finally arrived at is the SAJAX toolkit, a moderately minimal framework for [...]]]></description>
			<content:encoded><![CDATA[<p>Today was spent experimenting with something I&#8217;ve intended to for a long time: PHP and AJAX. I finally bit the bullet and started learning it in earnest. <img src="http://www.chromakode.com/blog/wp-includes/images/yahoo/yahoo4.gif" class="wp-smiley" /></p>
<p>This morning was spent searching for a suitable PHP toolkit to tinker with. The one I finally arrived at is the <a href="http://www.modernmethod.com/sajax/">SAJAX</a> toolkit, a moderately minimal framework for creating simple callbacks and recievers without having to go through the nitty-gritty of the lower-level XMLHttpRequest APIs. After playing around with it for a while, I really like it. There are some things that are quite confusing to me as a first time user, such as the asynchronous nature of things and the effects on variable scope &#8211; but all in all it&#8217;s quite a nice system to play with.</p>
<p>I also discovered a quite wonderful little Firefox extension called <a href="https://addons.mozilla.org/firefox/1843/">FireBug</a>. It has to be the most clean and cleverly put together all-purpose debugger I&#8217;ve ever seen. It&#8217;s very beautifully designed, too. It looks to be extremely useful in debugging javascript, css, and xhtml source in the future. It sure helped me out debugging XMLHttpRequests today!</p>
<p> This afternoon was spent scratching my head at things I mostly don&#8217;t understand. I figured as a first test project, I would make a little <a href="http://www.chromakode.com/projects/ajax/story.php">turn-based story creator</a>&#8230; just a simple form where users could input a word to add to a continuing story, where the story would be updated in real-time. Hacking pre-existing examples was fine and dandy, though of course it turned out that this was not as simple as I had thought. <img src="http://www.chromakode.com/blog/wp-includes/images/yahoo/wink.gif" class="wp-smiley" /></p>
<p>The hardest part to implement was my decision to only allow one word to be added per-person in a row. Storing a persistent session identifier &#8211; across the asynchronous submissions &#8211; turned out to be a nightmare in persistent variable storage. Try as I might, I could not get global variables to work the way I wanted them to. In the end, I resorted to a file hack out of frustration. Perhaps this is truly the way you are supposed to do it? I suppose I&#8217;ll only know by learning and doing more.</p>
<p>My <a href="http://www.chromakode.com/projects/story/story_file.php">little experiment</a> finally worked, and is quite usable: it runs, though it&#8217;s quite boring with nobody else to play with. It&#8217;s also quite boring looking. However, it really is a shared workspace, and could probably be bit of fun with a few friends. I&#8217;m sure similar games have been done before, but it just occurred to me to be a fun project to do. Hopefully it won&#8217;t become a spam hole too quickly.</p>
<div class="aside">You can find a new and revamped version of the story game <a href="http://www.chromakode.com/projects/story/">here</a>.</div>
<p>Next in the queue, I&#8217;d like to create some way of displaying how many people are viewing the space currently &#8211; to bring the aspect of presence much further into the foreground. After all, as one teacher once said to me: you&#8217;re not just writing for yourself: you&#8217;re writing for your readers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chromakode.com/blog/2006/05/22/learning-a-little-ajax-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An exercise in spontaneous javascript coding.</title>
		<link>http://www.chromakode.com/blog/2006/05/17/spontaneous-javascript/</link>
		<comments>http://www.chromakode.com/blog/2006/05/17/spontaneous-javascript/#comments</comments>
		<pubDate>Thu, 18 May 2006 06:48:38 +0000</pubDate>
		<dc:creator>chromakode</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.chromakode.com/blog/2006/05/17/spontaneous-javascript/</guid>
		<description><![CDATA[Whee! Somehow, tonight became an exercise in spontaneous javascript coding.
I was just hanging out early this evening when my good friend Insta popped up and said hello. I showed him a little error page I had been working on, and our conversation rapidly spiraled into a rather random little javascript idea of his that would [...]]]></description>
			<content:encoded><![CDATA[<p>Whee! Somehow, tonight became an exercise in spontaneous javascript coding.</p>
<p>I was just hanging out early this evening when my good friend Insta popped up and said hello. I showed him a little error page I had been working on, and our conversation rapidly spiraled into a rather random little javascript idea of his that would make a &#8220;hella cool&#8221; error page. Well, I thought it was pretty hella cool too, so I proposed that we write it. He gave me a few starting pointers, and after a little while I was blindly blazing away at this language I had never seriously used before. Well, one thing led to another, and it turned out I would be spending the next several hours going from nearly nothing to DOM access in javascript to pull off this little effect. <img src="http://www.chromakode.com/blog/wp-includes/images/yahoo/dead.gif" class="wp-smiley" /></p>
<p>I ended up writing 61 lines of code, ranting at Insta about little bits I didn&#8217;t understand all the way, but in the end I think what I threw together looks quite nice. It&#8217;s inefficient, a waste of cpu cycles, but it works. And <a href="http://www.chromakode.com/scripts/swappy.js">the code</a> looks pretty nice, too. I&#8217;m sure I made a bunch of little mistakes out of unfamiliarity with the language, but hey, it works &#8211; so what more can I ask for? The script resides in a little <a href="http://www.chromakode.com/error.php">easter egg</a> I had stuck in the http error handling code several weeks ago, and subsequently forgot about. See if you can find anything funny (beyond the text) about viewing that page! <img src="http://www.chromakode.com/blog/wp-includes/images/yahoo/wink.gif" class="wp-smiley" /></p>
<p>Thanks to the power of javascript, my productivity in being mostly unproductive has skyrocketed. <img src="http://www.chromakode.com/blog/wp-includes/images/yahoo/laughing.gif" class="wp-smiley" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chromakode.com/blog/2006/05/17/spontaneous-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Where&#8217;d my samba printing go?</title>
		<link>http://www.chromakode.com/blog/2006/05/14/whered-my-samba-printing-go/</link>
		<comments>http://www.chromakode.com/blog/2006/05/14/whered-my-samba-printing-go/#comments</comments>
		<pubDate>Mon, 15 May 2006 06:32:05 +0000</pubDate>
		<dc:creator>chromakode</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.chromakode.com/blog/2006/05/14/whered-my-samba-printing-go/</guid>
		<description><![CDATA[Hmm, looks like something borked samba printing (and it&#8217;s respective smbspool) in Ubuntu Dapper over the past month or so. I just noticed my print attempts were failing last week, only to discover this ongoing discussion over in the Ubuntu bug tracker. There are some packages purported to contain the fix, too.  [update: this [...]]]></description>
			<content:encoded><![CDATA[<p>Hmm, looks like something borked samba printing (and it&#8217;s respective <code>smbspool</code>) in Ubuntu Dapper over the past month or so. I just noticed my print attempts were failing last week, only to discover this <a href="https://launchpad.net/distros/ubuntu/+source/samba/+bug/39484">ongoing discussion</a> over in the Ubuntu bug tracker. There are <a href="http://www.linux2go.dk//ubuntu/pool/main/s/samba/">some packages</a> purported to contain the fix, too. <img src="http://www.chromakode.com/blog/wp-includes/images/yahoo/yahoo1.gif" class="wp-smiley" /> [<i>update: this fix does indeed work here</i>]</p>
<p>Looks like they&#8217;re well aware of the problem&#8230; but really, a very similar has issue occurred before, only a few months ago. <img src="http://www.chromakode.com/blog/wp-includes/images/yahoo/sulk.gif" class="wp-smiley" /></p>
<p>I suppose that&#8217;s what you get for running beta distributions&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chromakode.com/blog/2006/05/14/whered-my-samba-printing-go/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why I consider CSS to be a horrible design language.</title>
		<link>http://www.chromakode.com/blog/2006/05/10/why-css-is-a-horrible-design-language/</link>
		<comments>http://www.chromakode.com/blog/2006/05/10/why-css-is-a-horrible-design-language/#comments</comments>
		<pubDate>Thu, 11 May 2006 05:53:53 +0000</pubDate>
		<dc:creator>chromakode</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://www.chromakode.com/blog/2006/05/10/why-css-is-a-horrible-design-language/</guid>
		<description><![CDATA[Writing CSS (CSS2) never ceases to amaze me. Whether it&#8217;s tweaking this blog, trying to re-theme a php app, or simply experimenting in the Web Developer Extension, I am always struck by how difficult and confusing it is to try to implement very simple design patterns. 
Be it centering objects, making layouts use the maximum [...]]]></description>
			<content:encoded><![CDATA[<p>Writing CSS (CSS2) never ceases to amaze me. Whether it&#8217;s tweaking this blog, trying to re-theme a php app, or simply experimenting in the <a href="http://chrispederick.com/work/webdeveloper/">Web Developer Extension</a>, I am always struck by how difficult and confusing it is to try to implement very simple design patterns. </p>
<p>Be it centering objects, making layouts use the maximum amount of space, or simply trying to use floats properly, I am always amazed by how seemingly obvious code does not work the way I should think it does. It seems rather silly to me that such a language would be designed such that web designers must resort to <a href="http://www.alistapart.com/articles/holygrail">specialized recipes</a> to deal with seemingly simple and common page layout designs. While powerful, CSS seems to become more and more a search for hacks and snippets to make many designs possible. Browser support is also an elusive and secretive gem; unless explicitly stated, what works in one browser will probably at some point fail mysteriously in another.<img src="http://www.chromakode.com/blog/wp-includes/images/yahoo/yahoo2.gif" class="wp-smiley" /></p>
<p>Tonight, my appreciation for the language fell to a new low. In the mid-day, thinking about my page layout, I decided that I wanted thumbnails posted from my <a href="http://www.chromakode.com/art/">gallery</a> to be aligned to the right of the post, so that post text can wrap around them on the left. I figured this would be a relatively simple fix; I just needed to float the image class to the right and see what happened.</p>
<p>Well, not so fast. I had failed to remember that images when floated will (without a <code><a href="http://www.w3schools.com/css/pr_class_clear.asp">clear property</a></code> set on a following element) essentially make the following layout flow through and under the image, leaving the image on top of the footer and the title of the following post. After a little searching and reading, I realized this mistake and added the appropriate <code>clear: right;</code> to the <code>.post-footer</code> class. The footer should now make appropriate space for the image in the post. Simple, right?</p>
<p>Again, not so fast. After putting in this little tweak, I found the first post on my page (without any image) being followed by a long swath of whitespace, assumedly caused somehow by my <code>float: right</code>&#8216;d sidebar. Why was the browser making a whole bunch of space for something that wasn&#8217;t there? I may never know. Well, debugging this would prove to be a nightmare, so I soon got tired and decided I needed to do some research. I googled CSS float clearing techniques, searching for some trick to make space for the image without involving other floats. Well, I ended up finding this <a href="http://www.quirksmode.org/css/clearing.html">quirksmode.org article</a> describing a trick for making float space work <i>without</i> needing the <code>clear </code>property.</p>
<p>Well, how about that? Reading it worked on most browsers, I quickly tried this new <code>overflow: hidden</code> trick on my <code>.post-content</code> div, and looked to see if it would work. Well, at first attempt, it didn&#8217;t. But it was close. This time, space was being made between posts for the image to fit in. However, the footer was still flowing through, underneath the image. This was relatively easy to fix, after I added back the <code>clear: right;</code> line to the footer div, this worked too. The blank space following the top post (which is why I seached for this trick in the first place) disappeared. At this point I really didn&#8217;t care why, and was glad that it did.</p>
<p>Then I noticed some mysterious padding being added under the titles of posts. This was directly associated with the existence of the <code>overflow: hidden</code> statement. About a line of space was being added under the titles for reasons unknown to me. I tried hard setting any margins and padding I could think of to 0 (most were already), yet still, this mysterious and unexpected space was being made. After fiddling with it for a while, disappointed that the trick might not work, I tried moving <code>overflow: hidden</code> to the parent div, <code>.post</code>. This worked like a charm. Everything was working as it should have been: space was being made for right-aligned images, text was flowing around them, and there was no longer any weird quirkiness being wreaked upon my page layout. Finally! <img src="http://www.chromakode.com/blog/wp-includes/images/yahoo/yahoo4.gif" class="wp-smiley" /></p>
<p>This experience I had tonight illustrates my primary frustration with CSS: it makes no sense for achieving simple design tasks. Certain assumptions about the purpose and performance of properties never seem to work out entirely as planned. My attempts at putting an image on the right required an understanding of the <code>float</code> layout system, the subtleties of <code>clear</code> usage, and even an arcane trick barely documented and not well-known &#8211; at least not very accessible to me. </p>
<p>Further, this impacts the sanity of CSS as a programming language: as a designer and a programmer, I expect that properties and directives will just work, in a way not so far off from the way they are documented to. In my experience with CSS, and in this example, the subtlety and lack of documentation in getting things to work as intended required so much more fiddling, guesswork, and raw googling than I ever expected to do. Also, pages become so big and complex that when dealing with many layout bugs, there is usually not an obivous quick fix.And I am simply using CSS like a programming language. I don&#8217;t even want to imagine the ways one would try to create a GUI for representing these difficulties in a WYSIWYG environment.</p>
<p>When attempting to represent a graphical layout using programming directives, I understand that it is very hard to craft a language that is both simple to use and powerful in it&#8217;s creative offerings. CSS really achieved a lot in terms of power in crafting web designs, and especially in controlling the typography used. However, the current state of utilizing CSS in web design is both an exercise in frustration and confusion, as the subtlety of the effects of CSS directives make it (at best) difficult to debug, and the arcaneness of the techniques used takes the considerable learning curve of CSS and shoots it through the roof. <img src="http://www.chromakode.com/blog/wp-includes/images/yahoo/yahoo2.gif" class="wp-smiley" /></p>
<p>After dealing with CSS a reasonable amount, I can only wonder at the hoops professional web designers must leap through in negotiating between the limitations of their environment and the needs/desires of their customers. As an open source and Linux enthusiast, I make minimum effort to accomodate <a href="http://www.microsoft.com/windows/ie/ie6/default.mspx">poorly compliant browsers</a>. I&#8217;d rather not think about the far more trouble one has to go to to ensure such compatibility. Heck, it would take so much time to really get fluid with the medium that suddenly, the role of the professional web designer makes so much more sense to me! <img src="http://www.chromakode.com/blog/wp-includes/images/yahoo/wink.gif" class="wp-smiley" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chromakode.com/blog/2006/05/10/why-css-is-a-horrible-design-language/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
