<?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>Code and Life</title>
	<atom:link href="http://codeandlife.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://codeandlife.com</link>
	<description>Tech and other visions from the liquid crystal tower</description>
	<lastBuildDate>Tue, 14 Jul 2009 07:47:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>www.Friendscribe.com launched</title>
		<link>http://codeandlife.com/2009/07/14/www-friendscribe-com-launched/</link>
		<comments>http://codeandlife.com/2009/07/14/www-friendscribe-com-launched/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 07:45:13 +0000</pubDate>
		<dc:creator>jokkebk</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Web tips]]></category>
		<category><![CDATA[chat]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[friendscribe]]></category>
		<category><![CDATA[irc]]></category>

		<guid isPermaLink="false">http://codeandlife.com/?p=14</guid>
		<description><![CDATA[I’ve just finished a “public beta” version of Friendscribe.com, which is a web-based chat for keeping in touch with your friends. The idea is that chat messages are stored in a database, so you don’t need to have your browser always open to see what’s going on – just log back in later and see [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve just finished a “public beta” version of Friendscribe.com, which is a web-based chat for keeping in touch with your friends. The idea is that chat messages are stored in a database, so you don’t need to have your browser always open to see what’s going on – just log back in later and see if someone has said anything while you were gone.</p>
<p>Try it yourself at <a href="http://www.friendscribe.com">http://www.friendscribe.com</a>.</p>
<p>By the way, the site is powered by <a href="http://codeigniter.com">CodeIgniter</a> &#8211; a PHP development framework you definitely should try out if you&#8217;re into PHP web development!</p>
]]></content:encoded>
			<wfw:commentRss>http://codeandlife.com/2009/07/14/www-friendscribe-com-launched/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux SATA problem with Abit IP35-E</title>
		<link>http://codeandlife.com/2008/05/22/linux-sata-problem-with-abit-ip35-e/</link>
		<comments>http://codeandlife.com/2008/05/22/linux-sata-problem-with-abit-ip35-e/#comments</comments>
		<pubDate>Thu, 22 May 2008 19:05:41 +0000</pubDate>
		<dc:creator>jokkebk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[abit]]></category>
		<category><![CDATA[conflict]]></category>
		<category><![CDATA[ich9]]></category>
		<category><![CDATA[ip35-e]]></category>
		<category><![CDATA[irq]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[sata]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://codeandlife.com/2008/05/22/linux-sata-problem-with-abit-ip35-e/</guid>
		<description><![CDATA[Just a brief revelation to share with any readers (perhaps they stumble here through Google, or by some horrible accident :). 
I&#8217;ve had an Abit IP35-E motherboard in my HTPC setup for six months now, and while a great overclocking board, stable and packed with nice features (yeah, right, this is the budget version), I [...]]]></description>
			<content:encoded><![CDATA[<p>Just a brief revelation to share with any readers (perhaps they stumble here through Google, or by some horrible accident :). </p>
<p>I&#8217;ve had an Abit IP35-E motherboard in my HTPC setup for six months now, and while a great overclocking board, stable and packed with nice features (yeah, right, this is the budget version), I haven&#8217;t been able to coerce my Debian Lenny installation copied from previous IDE hard drive, or any Linux Live-CD to properly recognize my 500GB Samsung SATA hard drive.</p>
<p>Because booting to Linux rebooted with USB keyboard on, and IRQ options sometimes seemed to work their magic and temporarily get me to login prompt, I figured there was some IRQ conflict at work. I searched for the fix just half a year ago with no luck, but after 5 months of complete Linux abstince (spelled that wrong, I did), I stumbled upon this:</p>
<p><a href="http://www.fatwallet.com/forums/hot-deals/812946/">http://www.fatwallet.com/forums/hot-deals/812946/</a> (search for &#8220;Linux&#8221;)</p>
<p>Turns out all I needed was to swap SATA cable from SATA1 port to SATA5. Voila, now everything works great, no IRQ conflicts there (only SATA1-SATA4 ports conflict with USB controller).</p>
<p>Hope this helps someone!</p>
]]></content:encoded>
			<wfw:commentRss>http://codeandlife.com/2008/05/22/linux-sata-problem-with-abit-ip35-e/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Rails template caching intricasies</title>
		<link>http://codeandlife.com/2008/04/20/rails-template-caching-intricasies/</link>
		<comments>http://codeandlife.com/2008/04/20/rails-template-caching-intricasies/#comments</comments>
		<pubDate>Sun, 20 Apr 2008 12:38:20 +0000</pubDate>
		<dc:creator>jokkebk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[template caching]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://codeandlife.com/2008/04/20/rails-template-caching-intricasies/</guid>
		<description><![CDATA[You just have to love coding. I mean, unless you don&#8217;t, you&#8217;re not likely to put up with two hours of nearly useless debugging, when you realize your WeBRICK or Mongrel development environment do not work as it should. That&#8217;s exactly what I just did, and in order to help others, I&#8217;ll give you the [...]]]></description>
			<content:encoded><![CDATA[<p>You just have to love coding. I mean, unless you don&#8217;t, you&#8217;re not likely to put up with two hours of nearly useless debugging, when you realize your WeBRICK or Mongrel development environment do not work as it should. That&#8217;s exactly what I just did, and in order to help others, I&#8217;ll give you the details so you can get some decent results when Googling.</p>
<p><strong>The problem:</strong> I wanted to do some quick template prototyping. Hitting my WebFaction rails development environment, I started to make changes to a page template, update it, make changes, etc. Only this time no changes were shown after initial load! Only a server restart would make the changes visible. WTF. This isn&#8217;t how the development environment should work at all!</p>
<p><span id="more-12"></span></p>
<p><strong>The googling:</strong> After some carefully selected phrases in Google, a few things soon became apparent:</p>
<ol>
<li>No-one else seems to have encountered the problem and have a solution</li>
<li>Rails documentation on production/development configuration is nonexistent</li>
<li>Multiple how-tos existed how to enable caching, but not for disabling it</li>
</ol>
<p>I tried to add the following configuration directives to config/environment/development.rb:</p>
<ul>
<li><code>config.cache_classes = false</code> (actually, this was there already)</li>
<li><code>config.action_view.cache_template_extensions = false</code> (ditto)</li>
<li><code>config.action_view.cache_template_loading = false</code> (this directive was in the production, but not in development, dunno why)</li>
</ul>
<p>None of this stuff worked. Switching to WeBRICK from Mongrel didn&#8217;t work. However, cache_classes directive seemed to make changes to controllers visible, but view changes were still invisible until a server restart.</p>
<p><strong>The revelation:</strong> Finally, after little more than one hour of trial-and-error, I finally found the vast amount of documentation available on template caching on Rails. For those who haven&#8217;t yet found it from <a href="http://api.rubyonrails.org/">Rails API</a>, it is located under <code>ActionView::Base</code>. I will reproduce it here to highlight the detail in which template caching and its configuration directives are explained:</p>
<blockquote><p>By default, Rails will compile each template to a method in order to render it. When you alter a template, Rails will check the file‘s modification time and recompile it.</p></blockquote>
<p>Now I had sufficient information to reach the solution. For some odd reason, my combination of Notepad++, WinSCP and WebFaction server setup caused the timestamp of saved template file to be one hour off. This caused Rails to conclude, that no changes had been made since last compiling the template (oh, they would be noticed after <em>waiting for one hour</em>, but who wants to wait one hour after every change?).</p>
<p><strong>The solution:</strong> This was a stupid problem, but the solution evaded me for too long because of scarce (and hard to find) documentation on template caching mechanism. A simple <code>touch</code> command after changes now does the trick. A hack, but it works well enough.</p>
]]></content:encoded>
			<wfw:commentRss>http://codeandlife.com/2008/04/20/rails-template-caching-intricasies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django &#8211; next stop after Ruby on Rails?</title>
		<link>http://codeandlife.com/2008/02/05/django-next-stop-after-ruby-on-rails/</link>
		<comments>http://codeandlife.com/2008/02/05/django-next-stop-after-ruby-on-rails/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 19:47:10 +0000</pubDate>
		<dc:creator>jokkebk</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://codeandlife.com/2008/02/05/django-next-stop-after-ruby-on-rails/</guid>
		<description><![CDATA[Having done web development on several platforms (Perl+CGI, ASP.NET and PHP), I was introduced to Ruby on Rails about two years ago, and it was love on first sight. The separation of code and layout was a bliss after PHP require statements (and vaguely similar to ASP.NET, by the way), and database abstraction was on [...]]]></description>
			<content:encoded><![CDATA[<p>Having done web development on several platforms (Perl+CGI, ASP.NET and PHP), I was introduced to <a href="http://www.rubyonrails.com">Ruby on Rails</a> about two years ago, and it was love on first sight. The separation of code and layout was a bliss after PHP require statements (and vaguely similar to ASP.NET, by the way), and database abstraction was on a wholly different level.</p>
<p>And, you don&#8217;t need semicolons after statements in ruby, just how sexy is that? What more can a man need (write a comment, if you disagree :).</p>
<p>Now Rails does have some annoyances, like painful configuration for multiple applications running on a same server. If someone actually likes writing Lighttpd rules and making special provisions for it in routes.rb, again, let me know. It also seems that in some cases, all the abstraction and &#8220;there is a really clever hack to do this with just one line of code&#8221; -mentality has taken over good sense, which for me has meant that my &#8220;Rails 0.9&#8243; skillset has been mostly deprecated, and replaced with layers upon layers of new stuff I should be continuously keeping up with.</p>
<p>Now a recent Slashdot article (the one linking the page-long rant from Mongrel developer) had some positive comments related to <a href="http://www.djangoproject.com">Django</a>, and I decided to check it out. And guess what? It just <strong>rules</strong>.<br />
<span id="more-11"></span><br />
Now if you like your trusted PHP or like to roll on with Rails, wherever they take you, please don&#8217;t read further. But for those adventurous who don&#8217;t think using indentation to format blocks is a bad idea (Python developers obviously didn&#8217;t, and Django is a Python framework), I think there are several lovable features in Django, when compared to Rails. These are, of course, my personal opinions, speaking as a person who has developed a fairly complex Rails project (a personal budgeting app) over two years of time:</p>
<ul>
<li>Creating a new Django project means only four new files, and application inside that project is three more. You read that right: <strong>seven files</strong>. Talk about knowing what does what, when an empty Rails app is <strong>over 3400 files</strong>. You read that right too. Of course Django has libraries and templates elsewhere, but I do like them being outside of my personal project.</li>
<li>Instead of scaffolding, Django has opted for admin generation, which I personally slightly prefer, as it often goes that any pages facing outside customers need heavy customization anyways.</li>
<li>Database structures are created from Django definitions. This is DRY at its best. This also means, that any necessary length constraints are already there when you start making your forms. Of course Django won&#8217;t overwrite your existing tables, which generally gives about the same leverage as Rails does with its database conventions, which you have to follow if you want Rails to play ball. With this feature, you can totally skip the &#8220;now lets write the SQL&#8221;-part of creating new applications.</li>
<li>Powerful templating system. In Rails you mark where you content should go in the page using layouts, but you don&#8217;t get any more levels than that. Django, instead, starts with a root template, which defines a set of blocks, which you can then overwrite (or not) by inheriting the template. And inheritance can go multiple levels, so you get same kind of benefits as you get when abstracting classes in object-oriented paradigms &#8211; you only override the parts you want to change, and recycle the rest.</li>
<li>Very good documentation. Just point your browser to <a href="http://www.djangoproject.com/documentation/overview/">Django overview</a> and you&#8217;ll probably understand. It&#8217;s smartly written, and covers things you need, without the need of Googling too much.</li>
</ul>
<p>And of course with Django, you get to write some kick-ass Python code, without any braces or endif annoyances, just beatiful, indented code. And I&#8217;d expect the Python libraries to be as extensive, or probably even more so than Ruby&#8217;s. I haven&#8217;t done testing to see whether Python&#8217;s habit of compiling stuff into byte-code speeds things up when compared to Ruby, but I don&#8217;t think Django would lose to Rails much when speed is compared.</p>
<p>Now that I got you convinced to check Django out, I do have some quibbles with it, which I think need to be resolved to make me abandon Rails completely:</p>
<ul>
<li>No real API documentation. You have pretty good &#8220;how to use&#8221; documentation for everything, but I&#8217;d like to see the details if necessary, please.</li>
<li>Mod_python may leak memory and need restarting from time to time. This is not a nice things. Also, you need to have a separate server handling all non-Python data, as Django is quite slow at serving those images and other stuff you need for your web page.</li>
<li>Rigid templating language. I understand you shouldn&#8217;t put too much logic in your views, but not being able to use operators in templates is <strong>annoying</strong>. Example: there are only &#8220;if bool&#8221; and &#8220;ifequal var1 var2&#8243; statements, no &#8220;if size < 6", or anything like that. I also don't know how much performance hit occurs because of templating.</li>
</ul>
<p>That&#8217;s it for today, time to do some actual coding. In my next post, I&#8217;m going to forget Rails and Django for a while, and discuss solutions for those cases where you cannot use the shining light of these solutions, and have to rely on plain old LAMP to survive.</p>
]]></content:encoded>
			<wfw:commentRss>http://codeandlife.com/2008/02/05/django-next-stop-after-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nokia acquires Trolltech!</title>
		<link>http://codeandlife.com/2008/01/29/nokia-acquires-trolltech/</link>
		<comments>http://codeandlife.com/2008/01/29/nokia-acquires-trolltech/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 14:18:20 +0000</pubDate>
		<dc:creator>jokkebk</dc:creator>
				<category><![CDATA[Slashtalk]]></category>
		<category><![CDATA[acquisition]]></category>
		<category><![CDATA[kde]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[trolltech]]></category>

		<guid isPermaLink="false">http://codeandlife.com/2008/01/29/nokia-acquires-trolltech/</guid>
		<description><![CDATA[Just a short note on this Slashdot newsbit that almost got me falling off my chair: Nokia is acquiring Trolltech, the makers of QT graphics library behind the popular Linux window manager (/platform) KDE.
I mean, if I had been asked a month ago the top three companies making money with open source software, I would&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>Just a short note on this <a href="http://mobile.slashdot.org/article.pl?sid=08/01/28/136204">Slashdot newsbit</a> that almost got me falling off my chair: <a href="http://www.nokia.com">Nokia</a> is acquiring <a href="http://trolltech.com">Trolltech</a>, the makers of QT graphics library behind the popular Linux window manager (/platform) <a href="http://www.kde.org">KDE</a>.</p>
<p>I mean, if I had been asked a month ago the top three companies making money with open source software, I would&#8217;ve replied RedHat, MySQL and Trolltech. And since <a href="http://developers.slashdot.org/article.pl?sid=08/01/16/135243">MySQL has already been acquired</a>, I really wonder what is next.</p>
<p>Also, it is interesting that Nokia decided to acquire Trolltech, even though their <a href="http://www.forum.nokia.com/main/platforms/maemo/index.html">Maemo</a> platform is based on GTK and Gnome, not QT and KDE. Well, let&#8217;s just hope they don&#8217;t stop providing a GPL version of QT in the future.</p>
<p>Anyone want to bet who is the next open source shop being acquired by some big players? My bet is RedHat being acquired by Google or Microsoft, because, well, that would just be surprising, wouldn&#8217;t it?</p>
]]></content:encoded>
			<wfw:commentRss>http://codeandlife.com/2008/01/29/nokia-acquires-trolltech/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Darkest material yet created using nanotubes</title>
		<link>http://codeandlife.com/2008/01/18/darkest-material-yet-created-using-nanotubes/</link>
		<comments>http://codeandlife.com/2008/01/18/darkest-material-yet-created-using-nanotubes/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 10:50:12 +0000</pubDate>
		<dc:creator>jokkebk</dc:creator>
				<category><![CDATA[Science]]></category>
		<category><![CDATA[Slashtalk]]></category>
		<category><![CDATA[black]]></category>
		<category><![CDATA[macbook air]]></category>
		<category><![CDATA[nanotubes]]></category>

		<guid isPermaLink="false">http://codeandlife.com/2008/01/18/darkest-material-yet-created-using-nanotubes/</guid>
		<description><![CDATA[Just a short interesting headline that got my attention on Slashdot: 
Nanotubes Form The Darkest Material Yet Created
Picture of this 99.9% light-absorbing monster material can be found from news.com.au coverage. Now as many slashdotters pointed out, this opens up obvious possibilities for solar panels, but once these really get cheap, I&#8217;d propose a couple of [...]]]></description>
			<content:encoded><![CDATA[<p>Just a short interesting headline that got my attention on Slashdot: </p>
<p><a href="http://science.slashdot.org/article.pl?sid=08/01/17/0424232">Nanotubes Form The Darkest Material Yet Created</a></p>
<p>Picture of this 99.9% light-absorbing monster material can be found from <a href="http://www.news.com.au/story/0,23599,23060778-13762,00.html">news.com.au coverage</a>. Now as many slashdotters pointed out, this opens up obvious possibilities for solar panels, but once these really get cheap, I&#8217;d propose a couple of additional ones:</p>
<ul>
<li>Limiting the light scatter in open areas where adequate lightning (e.g. for safety) and darkness are simultaneously preferred. Theaters, nighttime transportation (ever tried to sleep in a well-lit train?) spring up to mind</li>
<li>Ninja clothing. Of course the problem is, that once you actually become <em>darker than the night</em>, you may be more easily spotted.</li>
<li>Striking interior decoration. Doors that look like black holes? Check. Really black borders for your home theater projector canvas? Check. Sofa that just doesn&#8217;t seem to be there? Check!</li>
</ul>
<p>And of course there is my absolute favourite: MacBook Night Air, as shown below.</p>
<p><img src="wp-content/uploads/2008/01/macbookair.png" alt="MacBook Night Air" /></p>
<p>Like Nigel Tufnel says in the movie <a href="http://www.imdb.com/title/tt0088258">This Is Spinal Tap</a>: <em>It&#8217;s like, how much more black could this be? And the answer is none. None more black.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://codeandlife.com/2008/01/18/darkest-material-yet-created-using-nanotubes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nice hosting for Django and Rails nuts</title>
		<link>http://codeandlife.com/2008/01/15/nice-hosting-for-django-and-rails-nuts/</link>
		<comments>http://codeandlife.com/2008/01/15/nice-hosting-for-django-and-rails-nuts/#comments</comments>
		<pubDate>Tue, 15 Jan 2008 20:17:14 +0000</pubDate>
		<dc:creator>jokkebk</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Web tips]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[realmenhosttheirownserver]]></category>
		<category><![CDATA[webfaction]]></category>

		<guid isPermaLink="false">http://codeandlife.com/2008/01/15/nice-hosting-for-django-and-rails-nuts/</guid>
		<description><![CDATA[Just thought to post a brief and shamelessly positive note on my current hosting provider, WebFaction. It was actually their one-click WordPress installation procedure that got me playing around with blogging, which then lead to founding this blog. I ran into it when searching for suitable site to host Django-powered software, which lead me to [...]]]></description>
			<content:encoded><![CDATA[<p>Just thought to post a brief and shamelessly positive note on my current hosting provider, <a href="http://www.webfaction.com?affiliate=jokkebk">WebFaction</a>. It was actually their one-click WordPress installation procedure that got me playing around with blogging, which then lead to founding this blog. I ran into it when searching for suitable site to host Django-powered software, which lead me to this comparison of <a href="http://www.statopia.com/corporate/blog/2007/aug/05/PopularDjangoHostingService/">Django-friendly web hosts</a>.</p>
<p>Now this probably wouldn&#8217;t be worth noting otherwise, but WebFaction is the only provider so far (leave a comment if you find others), that fulfilled all my stringent requirements for a hosting provider:</p>
<ol>
<li>Support for PHP, Ruby on Rails and Django (this alone is hard without virtual servers)</li>
<li>Support for MySQL <strong>and</strong> PostgreSQL (to suit the daily mood)</li>
<li>No arbitary limits on subdomains and domains within plans (it&#8217;s not like they cost anything to the provider)</li>
<li>Starting cost must be below $10 a month (I&#8217;d rather scale up when I actually have traffic, not beforehand)</li>
</ol>
<p><span id="more-7"></span><br />
Suffice to say, requirement for recent web platforms (Rails, Django) combined with relative freedom and low cost are almost impossible to find. Having said that, a brief look on <a href="http://www.webfaction.com/services/">what WebFaction was offering</a> did convince me to finally abandon the real-men-host-their-own-servers -approach, which had been causing me a headache lately (DSL line and a Linux box in the living room isn&#8217;t just meant for 24/7 services, if you know what I mean). In addition to my personal requirements, this provider sported additional, and in some points even exceptional benefits:</p>
<ul>
<li><strong>Unlimited</strong> domains and subdomains (I did say it already, did I?), e-mail addresses, mailboxes, and databases (yep, you heard it right)</li>
<li>Full shell access with SSH and SFTP</li>
<li>One-click installers for a dozen of most popular applications (most Python web frameworks, Rails, WordPress and others), which actually make what they are supposed to do</li>
<li>Database sizes count towards disc quota (instead of the outrageous &#8220;10MB per database&#8221; restrictions on many cheap hosting providers)</li>
</ul>
<p>Overall, the configurability and lack of any severe limitations on applications make the shared hosting plans feel much like a virtual server, without the hassle related to installing everything yourself. However, I do have some minor nags (its not a perfect world):</p>
<ul>
<li>The 60MB memory limit on the cheapest plan (this doesn&#8217;t count Apache running PHP and database servers, only Mongrel, the Apache running mod_python and the like) means that several Django/Rails instances cannot coexist (unless they are very, very basic). This can be fixed with Plan B, though. :)</li>
<li>Shell connection could be more responsive (it could also be that Finland is too far away from Texas, who knows)</li>
<li>Putting Rails behind HTTPS (they have one-click configuration option for that, too) caused a problem with redirects (which continue to point to http:// -addresses, making them not to work). Solutions do exist for this, but&#8230;</li>
</ul>
<p>Now that I&#8217;ve introduced the basic hardware powering this Blog, I may devote some posts detailing some of the forays I&#8217;ve made so far after settling with a hosting provider. But that is a story for another day.</p>
<p>As a disclaimer, aside from the hosting plan, I have no connection with WebFaction, I was just delighted enough of their service (and responsiveness of the staff, as I had a minor problem with my account setup in the start) to share this information. I do probably receive credits or something if you put me (jokkebk) as a referrer when you sign up, but that is actually your problem, not mine. :)</p>
]]></content:encoded>
			<wfw:commentRss>http://codeandlife.com/2008/01/15/nice-hosting-for-django-and-rails-nuts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Widget-ready Wordpress sidebars without headlines</title>
		<link>http://codeandlife.com/2008/01/12/widget-ready-wordpress-sidebars-without-headlines/</link>
		<comments>http://codeandlife.com/2008/01/12/widget-ready-wordpress-sidebars-without-headlines/#comments</comments>
		<pubDate>Sat, 12 Jan 2008 12:12:01 +0000</pubDate>
		<dc:creator>jokkebk</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Web tips]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[widgets]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://codeandlife.com/2008/01/12/widget-ready-wordpress-sidebars-without-headlines/</guid>
		<description><![CDATA[A lot of people are asking me (of course I have to make this stuff up because I don&#8217;t have any readers) how I&#8217;ve done the menu bar (the horizontal thing containing static pages and categories, just below the name of this blog). This is a good question, because the menu bar is actually widget-ready, [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of people are asking me (of course I have to make this stuff up because I don&#8217;t have any readers) how I&#8217;ve done the menu bar (the horizontal thing containing static pages and categories, just below the name of this blog). This is a good question, because the menu bar is actually widget-ready, so I don&#8217;t have to change it when I add new categories. &#8220;But how have you avoided the widget headers and still remained strictly XHTML compliant?&#8221;, I hear some of my imaginary readers say. Well, I&#8217;ll tell you how.<br />
<span id="more-6"></span><br />
First step is to understand how WordPress sidebars are done:</p>
<ol>
<li>Theme tells that it has sidebar(s) using either <code>register_sidebars(<em>n</em>)</code> or one to several calls to <code>register_sidebar(...)</code>. This is done in <code>functions.php</code>.</li>
<li>Where the sidebar should appear, you call <code>dynamic_sidebar()</code>, and if it returns <code>false</code>, you render some static stuff instead of widgets.</li>
</ol>
<p>All this is explained in excruciating detail in <a href="http://automattic.com/code/widgets/themes/">WordPress documentation</a>, so look it up in there, if you want to know exactly how it&#8217;s done. Now when all this is done, your call to <code>dynamic_sidebar()</code> (done inside <code>&lt;ul&gt;</code> and <code>&lt;/ul&gt;</code> tags) will output the widgets selected to this sidebar in the following manner:</p>
<pre>
&lt;li id="..." class="..."&gt;&lt;h2 class="widgettitle"&gt;Pages&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="..."&gt;Page 1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="..."&gt;Page 2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;&lt;li id="..." class="..."&gt;&lt;h2 class="widgettitle"&gt;AnotherWidget&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="..."&gt;Link 1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="..."&gt;Link 2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;</pre>
<p>Now any Google-aware reader will already know, that horizontal menus can be made from unordered lists using the following CSS definitions:</p>
<pre>
#menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#menu li {
  float: left;
}</pre>
<p>Now because the <code>ul</code> element doesn&#8217;t have margins or borders, and <code>li</code> elements float after each other, we could even have several unordered lists after each other, and still the result would look like one horizontal menu. Now the problem is how to get rid of the Widget names completely. Well, this can be done quite easily. If you look up the <code>register_sidebar()</code> function call from the <a href="http://automattic.com/code/widgets/api/">Widgets API</a>, you see that you can actually have an array of parameters governing the way widgets and their titles are outputted to the sidebar.</p>
<p>By setting <code>before_widget</code> and <code>after_widget</code> to empty strings, and not having <code>&lt;ul&gt;</code> and <code>&lt;/ul&gt;</code> around<br />
your call to <code>dynamic_sidebar()</code>, and setting <code>before_title</code> and <code>after_title</code> to beginning and end of a comment block, we achieve everything needed. So in your <code>functions.php</code>, you would have the following code (notice how I have named the sidebar &#8220;Topmenu&#8221; to make it easier to recognize that particular sidebar in WordPress widget configuration):</p>
<pre>
register_sidebar(array('name' =&gt; 'Topmenu',
		'before_widget' =&gt; '', 'after_widget' =&gt; '',
		'before_title' =&gt; '&lt;!--', 'after_title' =&gt; '--&gt;'));</pre>
<p>Which would reduce the widget code shown above to something like this:</p>
<pre>
&lt;!-- Pages --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="..."&gt;Page 1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="..."&gt;Page 2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- AnotherWidget --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="..."&gt;Link 1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="..."&gt;Link 2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre>
<p>Now only thing you need to do is to put your menu-generating piece of code where you want it, in my case it was the <code>header.php</code> of my theme:</p>
<pre>
&lt;?php /* Widgetized sidebar, if you have the plugin installed. */
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Topmenu') ) : ?&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.somesite.com"&gt;Static menu item 1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://myblog.com"&gt;Static menu item 2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;?php endif; ?&gt;</pre>
<p>Now all you need is to go into WordPress site admin, and select Presentation &gt; Widgets, and add the relevant widgets to your brand-new Topmenu (I use the Pages and Categories widgets). And you&#8217;re done!</p>
<p>Please leave comments if you have any questions or further suggestions.</p>
]]></content:encoded>
			<wfw:commentRss>http://codeandlife.com/2008/01/12/widget-ready-wordpress-sidebars-without-headlines/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Theme being updated, sorry for inconvenience</title>
		<link>http://codeandlife.com/2008/01/10/theme-being-updated-sorry-for-inconvenience/</link>
		<comments>http://codeandlife.com/2008/01/10/theme-being-updated-sorry-for-inconvenience/#comments</comments>
		<pubDate>Thu, 10 Jan 2008 21:00:30 +0000</pubDate>
		<dc:creator>jokkebk</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://codeandlife.com/2008/01/10/theme-being-updated-sorry-for-inconvenience/</guid>
		<description><![CDATA[I was struck by the brilliant idea of designing and implementing my own design for this page. Because the page has been up for like two days and I have around one point three faithful readers, I decided to scrap the needless testing platform and go straight to production.
So bear with me for some hours [...]]]></description>
			<content:encoded><![CDATA[<p>I was struck by the brilliant idea of designing and implementing my own design for this page. Because the page has been up for like two days and I have around one point three faithful readers, I decided to scrap the needless testing platform and go straight to production.</p>
<p>So bear with me for some hours while I stylize the posts and sidebar on line. For the random viewer, it may even be an interesting interactive event. Or then not. Anyways, sorry if your eyes hurt when reading!</p>
]]></content:encoded>
			<wfw:commentRss>http://codeandlife.com/2008/01/10/theme-being-updated-sorry-for-inconvenience/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Paramount ditching HD-DVD and switching to Blu-ray?</title>
		<link>http://codeandlife.com/2008/01/09/paramount-ditching-hd-dvd-and-switching-to-blu-ray/</link>
		<comments>http://codeandlife.com/2008/01/09/paramount-ditching-hd-dvd-and-switching-to-blu-ray/#comments</comments>
		<pubDate>Wed, 09 Jan 2008 14:44:28 +0000</pubDate>
		<dc:creator>jokkebk</dc:creator>
				<category><![CDATA[Slashtalk]]></category>
		<category><![CDATA[blu-ray]]></category>
		<category><![CDATA[cyberlink]]></category>
		<category><![CDATA[hd-dvd]]></category>
		<category><![CDATA[high definition]]></category>
		<category><![CDATA[media pc]]></category>
		<category><![CDATA[paramount]]></category>
		<category><![CDATA[warner bros]]></category>

		<guid isPermaLink="false">http://codeandlife.com/2008/01/09/paramount-ditching-hd-dvd-and-switching-to-blu-ray/</guid>
		<description><![CDATA[Financial Times seems is suggesting that the recent &#8220;HD-DVD only&#8221; agreement made by Paramount (for which they got paid a huge amount of cash) may containt a clause that allows Paramount to rethink in case Warner Bros switches to Blu-ray (which just recently happened). If Paramount actually follows Warner, it would likely mark the end [...]]]></description>
			<content:encoded><![CDATA[<p>Financial Times <a href="http://www.ft.com/cms/s/0/dc409afa-bd75-11dc-b7e6-0000779fd2ac.html?nclick_check=1">seems</a> is suggesting that the recent &#8220;HD-DVD only&#8221; agreement made by Paramount (for which they got paid a huge amount of cash) may containt a clause that allows Paramount to rethink in case Warner Bros switches to Blu-ray (which just recently <a href="http://www.timewarner.com/corp/newsroom/pr/0,20812,1700383,00.html">happened</a>). If Paramount actually follows Warner, it would likely mark the end of the high definition format war.</p>
<p>In other news, I won&#8217;t be switching yet, as stand-alone Blu-ray players cost about $900 (600€) here where I live. And while PC drives for my media PC in both HD-DVD and Blu-ray have decreased sharply and can be had for around $200, I think <a href="http://www.cyberlink.com/multi/products/main_112_ENU.html">charging $100</a> for playback software (with forums full of compatibility and playback problems) is absolute robbery.</p>
<p>Having said that, expect to hear first-hand account on these issues the second I can have both the drive and software for less than $200. :)</p>
]]></content:encoded>
			<wfw:commentRss>http://codeandlife.com/2008/01/09/paramount-ditching-hd-dvd-and-switching-to-blu-ray/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
