<?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>kerneljack&#039;s diary &#187; software</title>
	<atom:link href="http://www.kerneljack.com/category/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kerneljack.com</link>
	<description></description>
	<lastBuildDate>Thu, 01 Jul 2010 11:25:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Turn off the linux console display</title>
		<link>http://www.kerneljack.com/2010/07/01/turn-off-the-linux-console-display/</link>
		<comments>http://www.kerneljack.com/2010/07/01/turn-off-the-linux-console-display/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 11:25:58 +0000</pubDate>
		<dc:creator>kerneljack</dc:creator>
				<category><![CDATA[centos]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[operating systems]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[centos display linux howto]]></category>

		<guid isPermaLink="false">http://www.kerneljack.com/?p=183</guid>
		<description><![CDATA[I needed a way to turn off the display on an old netbook that I am using as a low-powered server. I installed CentOS 5.5 on the netbook and set the &#8216;inittab&#8217; to boot into console mode by default however I did not know how to turn the display off completely when in console mode. [...]]]></description>
			<content:encoded><![CDATA[<p>I needed a way to turn off the display on an old netbook that I am using as a low-powered server. I installed CentOS 5.5 on the netbook and set the &#8216;inittab&#8217; to boot into console mode by default however I did not know how to turn the display off completely when in console mode. I wanted to do this for various reasons; saving power and reducing the heat generated were my primary concerns.</p>
<p>I was thinking of using &#8216;setterm&#8217; for this, but I decided to google this first and found the perfect solution <a href="http://bbs.archlinux.org/viewtopic.php?id=66169">in the Arch forums</a>. Just in case that link stops working I&#8217;m going to include the script below, hopefully it will be helpful to other people.</p>
<blockquote>
<pre>#!/bin/bash

###################################################
# Check if X is running or not, turn off monitor, #
# wait for a key press and turn it on again.      #
###################################################

grep_result_file=$PWD'/x_running'

# Check if X is running.
ps -e | grep -e "\bX\b" &gt; $grep_result_file
ps -e | grep -e "\bxorg\b" &gt;&gt; $grep_result_file
ps -e | grep -e "\bxserver\b" &gt;&gt; $grep_result_file

## If you want to check result file, uncomment following lines.
#echo "===== $grep_result_file - begin ====="
#cat $grep_result_file
#echo "===== $grep_result_file -  end  ====="

if [ ! -s $grep_result_file ] || [[ $(tty) =~ tty ]] || [[ $(tty) =~ vc ]]; then
    echo 'Detected X not runnig or you are at console...'
    if [ $UID -ne 0 ]; then
        echo 'You need super user privileges to run this script at console.'
        echo 'Rerun as super user or start X and run from a terminal.'
        exit 0
    fi
    turn_off='vbetool dpms off'
    turn_on='vbetool dpms on'
else
    echo 'Detected X running...'
    turn_off='xset dpms force off'
fi

echo 'Turning off monitor...'
$turn_off

echo 'Waiting for a key press...'
read -n1 -s

echo 'Turning on monitor...'
$turn_on

rm $grep_result_file

echo 'Finished: monitor_off'
kill -9 $PPID
</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.kerneljack.com/2010/07/01/turn-off-the-linux-console-display/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenBSD and PF</title>
		<link>http://www.kerneljack.com/2008/04/24/openbsd-and-pf/</link>
		<comments>http://www.kerneljack.com/2008/04/24/openbsd-and-pf/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 17:32:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[operating systems]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[openbsd operating_systems ukuug unix]]></category>

		<guid isPermaLink="false">http://www.kerneljack.com/?p=144</guid>
		<description><![CDATA[On the first day of the UKUUG Spring Conference I attended the OpenBSD and PF tutorial. I was asked to write a short review of that tutorial for the UKUUG newsletter. I’m posting what I wrote below: The superiority of OpenBSD when it comes to security is legendary. The OpenBSD community continuously do security audits [...]]]></description>
			<content:encoded><![CDATA[<p>On the first day of the UKUUG Spring Conference I attended the OpenBSD and PF tutorial. I was asked to write a short review of that tutorial for the UKUUG newsletter. I’m posting what I wrote below:</p>
<blockquote><p><span style="font-family: Arial;">The superiority of <strong>OpenBSD </strong> when it comes to security is legendary. The OpenBSD community continuously  do security audits of their codebase and their website proudly boasts  of having only <strong>two </strong>remote holes in the default install, in more  than 10 years!” <strong>PF </strong>is the default packet filter used in  OpenBSD from version 3.0 onwards.</span></p>
<p><span style="font-family: Arial;"><br />
</span></p>
<p><span style="font-family: Arial;">Having setup OpenBSD firewalls using <strong> PF</strong> in the past, I was interested in expanding my knowledge and this  tutorial provided the perfect opportunity for me to do so. The tutorial  was given by <strong>Peter M. Hansteen</strong>, who is a consultant, writer and  sysadmin based in Bergen, Norway, and also the author of the excellent  “<strong>The Book of PF</strong>“, published by <strong>No Starch Press</strong>.</span></p>
<p><span style="font-family: Arial;"><br />
</span></p>
<p><span style="font-family: Arial;">Peter started off by answering some common  questions that people might have about PF such as: Can I run it on Linux  (Answer: No, but some are trying). He recommended <strong>not</strong> trusting  any GUI tools, and simply using a text editor to edit <strong><em>pf.conf </em></strong> as that is simpler and faster. In addition, some tools claim to automatically  convert “other” firewall rules to PF, but he recommended implementing  a fresh PF config yourself.</span></p>
<p><span style="font-family: Arial;"><br />
</span></p>
<p><span style="font-family: Arial;">The first firewall I ever tried to configure  for my home network used <strong>iptables</strong>; when I had to implement one  in PF, I found it to be a breath of fresh air. I have always found the  concept of “<strong>chains</strong>” that iptables uses confusing. PF  doesn’t have any concept of a chain; you simply start your rules by  first “blocking everything”, then enabling the things you  need, one line after the other. Although in principle this sounds exactly  like what you are supposed to do with iptables, in practice the rules  you generate are much simpler, and easier to understand. </span></p>
<p><span style="font-family: Arial;"><br />
</span></p>
<p><span style="font-family: Arial;">Leading on from this, he showed examples  of how PF should be set up in an environment where you need a “<strong>gateway</strong>”  between 2 networks, and how to deal with problems faced by people who  try to use FTP from behind a NAT firewall (<strong>ftp-proxy</strong>). <strong>Tables </strong> and filtering by services (http, ftp, etc) were introduced next. A table  in PF is basically a list of IP addresses; listing them in a table makes  it easier to apply a single rule to a collection of hosts.</span></p>
<p><span style="font-family: Arial;"><br />
</span></p>
<p><span style="font-family: Arial;">Peter then moved on to the subject of  dealing with the huge volume of spam that besieges us all. The two main  concepts that he focused this section of the tutorial on were “<strong>tarpitting</strong>”  and “<strong>greylisting</strong>“. In tarpitting, when a blacklisted  host connects to you, you send replies to them very very slowly, let’s  say around 1 byte at a time. When doing greylisting, you <strong>lie</strong> to <strong>unknown</strong> connecting clients using SMTP <strong>45<em>n</em></strong> errors  (temporary local error). This usually thwarts spammers, who simply want  to quickly connect, deliver their payload and leave. Many spammers don’t  attempt to reconnect after seeing this error, while legitimate clients  will automatically retry after a short period of time. These legitimate  hosts are then added to a whitelist, which means that the next time  they try to connect, they will no longer be given a 45n temporary error,  their mail will be accepted immediately.</span></p>
<p><span style="font-family: Arial;"><br />
</span></p>
<p><span style="font-family: Arial;">We then got a look at how to thwart <strong> SSH</strong> <strong>bruteforce </strong>attacks by using <strong>rate-limiting</strong>, and  a short introduction to <strong>wireless networking</strong> in OpenBSD. The next  thing that Peter talked about, <strong>authpf</strong>, was quite interesting.  Basically users need to authenticate to authpf first; once authenticated,  only then is traffic generated by these users allowed to pass through  the firewall. Special rules can be setup specifically for authpf users.</span></p>
<p><span style="font-family: Arial;"><br />
</span></p>
<p><span style="font-family: Arial;">The next topic was load balancing and  Peter showed how to configure a “<strong>web server pool</strong>” using  PF. Requests to this pool were alternated using a form of round-robin.  To solve a common round-robin problem where machines in the pool go  down, you can use “<strong>hoststated</strong>“, which monitors the  state (up/down) of the certain specified hosts and compensates accordingly.  hoststated has been renamed to <strong>relayd</strong> in OpenBSD 4.3.</span></p>
<p><span style="font-family: Arial;"><br />
</span></p>
<p><span style="font-family: Arial;">You can <strong>tag</strong> incoming packets,  so you can quickly pass/block packets marked with a certain tag. Setting  up a OpenBSD <strong>bridge</strong> was discussed next. A bridge in this context  simply refers to a <strong>transparent</strong> firewall that sits between 2 or  more networks and filters packets at the link level.</span></p>
<p><span style="font-family: Arial;"><br />
</span></p>
<p><span style="font-family: Arial;">Using <strong>ALTQ</strong>, you can do bandwidth  allocation and traffic shaping. You can used <strong>class based queues </strong> (percent, kilo, or mega bytes), <strong>priority based</strong> or <strong>hierarchical  queues</strong>. In a class based queue, you can say for example that FTP  is only allowed 20% of your bandwidth.</span></p>
<p><span style="font-family: Arial;"><br />
</span></p>
<p><span style="font-family: Arial;">The last major aspect of PF that Peter  discussed was <strong>CARP (Common Address Redundancy Protocol)</strong> and <strong> pfsync</strong>. Put simply, CARP and pfsync allow you to setup 2 redundant  firewalls instead of 1, and in case one firewall fails, everything switches  over to the other firewall automatically. pfsync is used to keep the  rules between the 2 firewalls in sync.</span></p>
<p><span style="font-family: Arial;"><br />
</span></p>
<p><span style="font-family: Arial;">Overall, I am very pleased that I attended  this tutorial. Obviously I was familiar with some of the concepts, but  things like <strong>authpf</strong>, <strong>hoststated</strong> and <strong>CARP</strong> were completely  new to me. I will definitely use the things I learned here when considering  any OpenBSD based firewalling solutions in the future.</span></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.kerneljack.com/2008/04/24/openbsd-and-pf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix for strange white borders with Compiz Fusion on Ubuntu</title>
		<link>http://www.kerneljack.com/2007/08/30/fix-for-strange-white-borders-with-compiz-fusion-on-ubuntu-2/</link>
		<comments>http://www.kerneljack.com/2007/08/30/fix-for-strange-white-borders-with-compiz-fusion-on-ubuntu-2/#comments</comments>
		<pubDate>Thu, 30 Aug 2007 22:34:29 +0000</pubDate>
		<dc:creator>kerneljack</dc:creator>
				<category><![CDATA[beryl]]></category>
		<category><![CDATA[compiz]]></category>
		<category><![CDATA[fusion]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://kerneljack.wordpress.com/2007/08/30/fix-for-strange-white-borders-with-compiz-fusion-on-ubuntu-2/</guid>
		<description><![CDATA[I&#8217;ve just installed Compiz Fusion on my 3-year old ASUS laptop which is running Ubuntu Feisty. I&#8217;m quite pleased at how stable it is. I tried Beryl a few months ago and it was not usable at all on the same hardware. I did run into one problem, though and I couldn&#8217;t find any solution [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just installed Compiz Fusion on my 3-year old ASUS laptop which is running Ubuntu Feisty. I&#8217;m quite pleased at how stable it is. I tried Beryl a few months ago and it was not usable at all on the same hardware.
<p>I did run into one problem, though and I couldn&#8217;t find any solution to it on either the Ubuntu Forums or anywhere else on the net. My top Gnome panel had a strange white bar under it and all my context menus had white borders. Maybe my google-fu wasn&#8217;t very good yesterday, but the only solution that I managed to find after about an hour was <a href="http://forums.gentoo-xeffects.org/viewtopic.php?f=15&amp;t=596">this on a Gentoo forum</a>:</p>
<blockquote><p>This is a known issue.  Go to <b>ccsm-&gt;Window Decorations</b> and add the string <b>!dock</b> to the value <b>Shadow Windows</b>.  I had to enter <b>2 !dock.</b>  First disabled shadows of the context menus and the tool tips, the second stops shadows for the gnome-panel.</p></blockquote>
<p>I&#8217;m just putting this here in case it helps someone with a similar problem. </p>
<p>Technorati Tags: <a class="performancingtags" href="http://technorati.com/tag/compiz%20fusion%20ubuntu%20beryl" rel="tag">compiz fusion ubuntu beryl</a></p>
<p class="poweredbyperformancing">Powered by <a href="http://scribefire.com/">ScribeFire</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerneljack.com/2007/08/30/fix-for-strange-white-borders-with-compiz-fusion-on-ubuntu-2/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Such an insightful essay &#8230;</title>
		<link>http://www.kerneljack.com/2007/08/28/such-an-insightful-essay/</link>
		<comments>http://www.kerneljack.com/2007/08/28/such-an-insightful-essay/#comments</comments>
		<pubDate>Tue, 28 Aug 2007 18:59:21 +0000</pubDate>
		<dc:creator>kerneljack</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://kerneljack.wordpress.com/2007/08/28/such-an-insightful-essay/</guid>
		<description><![CDATA[Paul Graham has impressed me time and again with his stunning insight. Whenever I read his writings, it&#8217;s as if he plucked his ideas out from my own head and then put pen to paper. His latest, Holding a Program in One&#8217;s Head, contains several gems that I personally have experienced several times at work. [...]]]></description>
			<content:encoded><![CDATA[<p>Paul Graham has impressed me time and again with his stunning insight. Whenever I read his writings, it&#8217;s as if he plucked his ideas out from my own head and then put pen to paper. His latest, <a href="http://www.paulgraham.com/head.html">Holding a Program in One&#8217;s Head</a>, contains several gems that I personally have experienced several times at work.</p>
<blockquote><p><font face="verdana" size="2">The danger of a distraction depends not on how long it is, but   on how much it scrambles your brain.  A programmer can leave the   office and go and get a sandwich without losing the code in his   head.  But the wrong kind of interruption can wipe your brain   in 30 seconds.</font></p></blockquote>
<p>This is spot-on, and I notice this a lot during my lunch break. Sometimes I can&#8217;t get a program or problem out of my head and occasionally I even come up with a solution not 10 minutes into my lunch break and then I can&#8217;t wait to get back and finish it. Other times however, especially if I have lunch with my colleagues the whole &#8216;problem space&#8217; I&#8217;ve built up in my head simply vanishes. Due to the amount of work it usually takes (maybe a half-hour to an hour) to re-load my brain with the problem I was working on, a lot of post-lunch time is wasted and sometimes I can never recreate the problem fully again because I tend to be sharper in the mornings than in the lazy afternoons.</p>
<blockquote><p><font face="verdana" size="2">Since there&#8217;s a fixed cost each time   you start working on a program, it&#8217;s more efficient to work in a few long sessions than many short ones.</font></p></blockquote>
<p>I have often wanted to do this, but it&#8217;s almost impossible to do. There is always lunch, some other interruption, going home, eating dinner or something similar. On the weekends, however, I sometimes manage to stay up late and can work uninterrupted for quite a while.</p>
<blockquote><p><font face="verdana" size="2">Rewriting a program often yields a cleaner design.</font></p></blockquote>
<p>True sometimes, but I agree with him that even the process of rewriting a program can lead to significant insights; even if the rewritten program is not a huge improvement.</p>
<p>Instead of summarizing the whole essay here, I highly recommend that all programmers and their managers go read it. Even non-IT staff, such mathematicians, whose work involves long-stretches of thinking, and constructing problem spaces in their heads will benefit from the advice in this essay.</p>
<p>I haven&#8217;t been paying attention to my RSS feeds recently and I forgot just how good some people are at writing and expressing their insights <img src='http://www.kerneljack.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  <a href="http://www.paulgraham.com/">Paul Graham</a> and <a href="http://www.joelonsoftware.com/">Joel On Software</a> are two blogs (journals?) that I really enjoy reading.</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/coding%20programming%20software%20" class="performancingtags" rel="tag">coding programming software </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerneljack.com/2007/08/28/such-an-insightful-essay/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Links for June 3, 2007</title>
		<link>http://www.kerneljack.com/2007/06/03/links-for-june-3-2007/</link>
		<comments>http://www.kerneljack.com/2007/06/03/links-for-june-3-2007/#comments</comments>
		<pubDate>Sun, 03 Jun 2007 19:04:16 +0000</pubDate>
		<dc:creator>kerneljack</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[operating systems]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://kerneljack.wordpress.com/2007/06/03/links-for-june-3-2007/</guid>
		<description><![CDATA[Fedora 7 is released!: I really liked the last Fedora release, but I believe it was slightly plagued by problems with some of it&#8217;s package management utilities. I have already installed this release and am quite impressed. Wireless now works with WPA out of the box and their new re-spinning feature is something I will [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://docs.fedoraproject.org/release-notes/f7/en_US/sn-OverView.html" target="_blank">Fedora 7 is released!:</a> I really liked the last Fedora release, but I believe it was slightly plagued by problems with some of it&#8217;s package management utilities. I have already installed this release and am quite impressed. Wireless now works with WPA out of the box and their new re-spinning feature is something I will try out someday.</p>
<p><a href="http://www.xml.com/pub/a/2007/05/09/xml-parser-benchmarks-part-1.html" target="_blank">XML Parser benchmarks:</a>  I have always had my own suspicions of which XML parser model would be faster (Sax or StaX), but I&#8217;m glad to see this benchmark done by the O&#8217;Reilly folks.</p>
<p><a href="http://www.tuxdeluxe.org/node/175" target="_blank">Fear and loathing at Cupertino:</a>  Jeremy Allison&#8217;s terrible experience while trying to prepare a talk for his Apple WWDC presentation. Jeremy works on Samba, along with Tridge, who they all call &#8220;the smartest man in Australia&#8221; <img src='http://www.kerneljack.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Jeremy works at Google now. Smart man.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerneljack.com/2007/06/03/links-for-june-3-2007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some web links for today</title>
		<link>http://www.kerneljack.com/2007/05/17/some-web-links-for-today/</link>
		<comments>http://www.kerneljack.com/2007/05/17/some-web-links-for-today/#comments</comments>
		<pubDate>Thu, 17 May 2007 21:14:39 +0000</pubDate>
		<dc:creator>kerneljack</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[operating systems]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://kerneljack.wordpress.com/2007/05/17/some-web-links-for-today/</guid>
		<description><![CDATA[I&#8217;m going to occasionally post links here that I find particularly insightful, interesting or geeky. Three things that caught my interest today: PowerTOP: Released by Intel, this utility builds on work done by kernel developers to make the Linux kernel power-efficient. PowerTOP gives you a snapshot of what apps are consuming the most power. Turn [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m going to occasionally post links here that I find particularly insightful, interesting or geeky.</p>
<p>Three things that caught my interest today:</p>
<p><a href="http://www.linux.com/article.pl?sid=07/05/16/1742204" target="_blank">PowerTOP:</a> Released by Intel, this utility builds on work done by kernel developers to make the Linux kernel power-efficient. PowerTOP gives you a snapshot of what apps are consuming the most power. Turn off these apps or modify their behavior, and you&#8217;ll notice an instant increase in the battery life.</p>
<p><a href="http://www-128.ibm.com/developerworks/linux/library/l-linux-slab-allocator/?ca=dgr-lnxw07LinuxSlabAllo">The Linux SLAB Allocator:</a> Traditional heap memory managers suffer from fragmentation, among other issues. The SLAB Allocator in Linux, inspired by a similar implementation for Solaris and various embedded systems, allocates memory as fixed sized objects and uses caches to reduce fragmentation. It also has options to enable hardware cache alignment which allows objects in different caches to share the same cache lines, thus improving performance.</p>
<p><a href="http://www.advancedlinuxprogramming.com/">Advanced Linux Programming:</a> After many years of coding mostly Java, I&#8217;ve been meaning to brush up on my C, Assembly and general Unix programming skills. I found this excellent book freely available online and it seems to be getting a lot of praise from reviewers on Amazon so I downloaded it. It has a lot of topics that I&#8217;m very interested in, like IPC and threads, and it even has a few assembly oriented chapters. I will definitely be reading this one <img src='http://www.kerneljack.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerneljack.com/2007/05/17/some-web-links-for-today/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wierd Java error on my Mac</title>
		<link>http://www.kerneljack.com/2006/10/16/wierd-java-error-on-my-mac/</link>
		<comments>http://www.kerneljack.com/2006/10/16/wierd-java-error-on-my-mac/#comments</comments>
		<pubDate>Mon, 16 Oct 2006 19:03:59 +0000</pubDate>
		<dc:creator>kerneljack</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[operating systems]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://kerneljack.wordpress.com/2006/10/16/wierd-java-error-on-my-mac/</guid>
		<description><![CDATA[I turned my computer on today to get some work done, started Eclipse and started coding. When I tried to use the command-line though, I got this strange error: Error: no known VMs. (check for corrupt jvm.cfg file) I couldn&#8217;t run 'java' or 'javac' from the command-line at all! I immediately went to /System/Library/Frameworks/JavaVM.framework and [...]]]></description>
			<content:encoded><![CDATA[<p>I turned my computer on today to get some work done, started Eclipse and started coding. When I tried to use the command-line though, I got this strange error:</p>
<p><code><br />
Error: no known VMs. (check for corrupt jvm.cfg file)<br />
</code></p>
<p>I couldn&#8217;t run <code>'java'</code> or <code>'javac'</code> from the command-line at all! I immediately went to <code>/System/Library/Frameworks/JavaVM.framework</code> and looked for <code>'jvm.cfg'</code>. I have 3 VMs installed on this machine, <code>1.3.1</code>, <code>1.4.2</code>, and <code>1.5.0</code>. <code>1.3.1</code> and <code>1.4.2</code> had a proper <code>jvm.cfg</code> file installed but for some reason 1.5.0&#8242;s <code>jvm.cfg</code> was a zero-length file. Googling didn&#8217;t turn up anything useful except <a href="http://vv.cs.byu.edu/~egm/blog/archives/2005/09/jarerror_no_kno.html">this tip</a>, which wouldn&#8217;t work because in my case all my permissions were correct. Fixing permissions using Disk Utility didn&#8217;t show any permissions problems at all.</p>
<p>In the end, all I did was copy the 1.4.2 version over to the 1.5.0 directory and all was well. The tip above mentions that Eclipse might have had something to do with this, and there might be some truth to that, as I did update my Eclipse to 3.2 recently, but I have been using it for a week without any problems &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerneljack.com/2006/10/16/wierd-java-error-on-my-mac/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress finally supports WXR imports!</title>
		<link>http://www.kerneljack.com/2006/10/13/wordpress-finally-supports-wxr-imports/</link>
		<comments>http://www.kerneljack.com/2006/10/13/wordpress-finally-supports-wxr-imports/#comments</comments>
		<pubDate>Fri, 13 Oct 2006 23:31:31 +0000</pubDate>
		<dc:creator>kerneljack</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://kerneljack.wordpress.com/2006/10/13/wordpress-finally-supports-wxr-imports/</guid>
		<description><![CDATA[I&#8217;ve been waiting for so long now to import my old WP blog from my old web server to this site. The problem has been that until now, wordpress.com blogs did not have an &#8216;Import Self-Hosted WordPress Blog&#8217; option so I couldn&#8217;t move my older blog across. The only option I had was to spend [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been waiting for so long now to import my old WP blog from my old web server to this site. The problem has been that until now, wordpress.com blogs did not have an &#8216;Import Self-Hosted WordPress Blog&#8217; option so I couldn&#8217;t move my older blog across. The only option I had was to spend many days manually adding all of my posts to kerneljack.wordpress.com and correcting all the dates, which would have been a nightmare.</p>
<p>Thankfully I just discovered the <a href="http://www.technosailor.com/wordpress-to-wordpress-import/" title="wordpress-to-wordpress plugin" target="_blank">wordpress-to-wordpress</a> plugin which allows me to export my old blog as a WXR file which wordpress.com can then import. Now that I am back I will try to keep updating this blog more often.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerneljack.com/2006/10/13/wordpress-finally-supports-wxr-imports/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails</title>
		<link>http://www.kerneljack.com/2006/03/07/ruby-on-rails/</link>
		<comments>http://www.kerneljack.com/2006/03/07/ruby-on-rails/#comments</comments>
		<pubDate>Tue, 07 Mar 2006 00:42:41 +0000</pubDate>
		<dc:creator>kerneljack</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://kerneljack.wordpress.com/2006/03/11/ruby-on-rails/</guid>
		<description><![CDATA[“Rails is the most well thought-out web development framework I’ve ever used. And that’s in a decade of doing web applications for a living. I’ve built my own frameworks, helped develop the Servlet API, and have created more than a few web servers from scratch. Nobody has done it like this before.” -James Duncan Davidson, [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>“Rails is the most well thought-out web development framework I’ve ever used. And that’s in a decade of doing web applications for a living. I’ve built my own frameworks, helped develop the Servlet API, and have created more than a few web servers from scratch. Nobody has done it like this before.” <b><cite>-James Duncan Davidson, Creator of Tomcat and Ant</cite></b></p>
</blockquote>
<p>I tried out the Ruby on <a title="http://rubyonrails.com/" href="http://rubyonrails.com/">Rails (RoR) framework</a> this weekend and I&#8217;m quite impressed. I used <a title="http://developer.apple.com/tools/rubyonrails.html" href="http://developer.apple.com/tools/rubyonrails.html">Apple&#8217;s new tutorial for developers</a> which explains how to install and quickly get up and running with a simple Accounts/Expenses webapp. I did encounter one minor glitch while following the install instructions because I was installing on my Debian Linux webserver, instead of an Apple machine. It seems the default ruby install no longer comes with the ruby-zlib library, but that was quickly fixed by following <a title="http://mentalized.net/journal/2004/12/01/putting_debian_on_ruby_rails/" href="http://mentalized.net/journal/2004/12/01/putting_debian_on_ruby_rails/">these instructions</a>.</p>
<p>Rails applications all have a consistent directory structure, so you always start by running a command to generate the directory structure for you. This creates directories like app, config, doc, test, etc. The names are very familiar and easy to remember and they reinforce the purpose of the directory, i.e. the test directory is used to hold unit tests and functional tests for our application.</p>
<p>Automatic test creation makes testing an obvious and integral part of the development process, not an afterthought. It encourages you to think of a testing strategy upfront. This is perhaps the single most appreciated aspect of Rails development for me. You are supposed to test your code in other environments, but programmers often write code and if time permits, write tests. Rails tries to make it easy and painless (as much as possible) to test your code.</p>
<p>The next thing I learned about was the fact that Rails, like the Struts framework, tries to explicitly embed the notion of Models, Controllers, and Views within the development workflow. The concept of Actions, which are sent to Controllers in Rails is familiar to Struts. It is very easy to take a Rails URL (as shown in the example) and figure out <i>how</i> the server is going to parse and execute it.</p>
<p>Validation came next and I was suitably impressed. You simply need to add a few lines to the model, describing what each field should validate as, sort of like describing a type for a variable. Simply restart your server and voila, type rubbish in a field and Rails will highlight the field in red and ask you to re-enter it.</p>
<p>After all that, the tutorial shows you how to create a relationship between two models, much like in a relational database. The relation is that &#8216;one account can have many expenses&#8217;. This is accomplished in Rails by adding a &#8216;belongs to&#8217; field in the Expense model (an expense belongs to an Account) and a &#8216;has many&#8217; field to the Account model (an Account has many expenses). Simple as that.</p>
<p>Other things covered in the tutorial were:</p>
<ul>
<li>adding business logic to total up the expenses for the account</li>
<li>using helpers to change the view slightly and show the total in red if we are over budget</li>
<li>writing simple unit tests and running them</li>
</ul>
<p>Overall an excellent introductory tutorial which has left me wanting more. I will definitely go through the <a title="http://rubyonrails.com/" href="http://rubyonrails.com/">Rails website</a> and find out more about RoR and what it can do.</p>
<p>I know this is a small toy example and I want to know how RoR handles in a real mission critical business app as those are the only kinds of apps developers write these days <img src='http://www.kerneljack.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  RoR is easy to code for, but is it easy to maintain? After we get past the simplicity of the example app, how hard is it to write huge apps in it, and how long does it take a new developer to become familiar with and productive with a new codebase? These are all questions that I need answers to and I have the feeling that RoR won&#8217;t disappoint.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kerneljack.com/2006/03/07/ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
