Programmatically Build a Spring Application Context

January 14, 2007 – 14:56

The new BeanDefinitionBuilder class added in Spring 2.0 allows an XML-less way to build application contexts programmatically. Can be very useful for, say, creating quick testing setups in one of those script languages. more…

Upgraded to Wordpress 2.0.6

January 14, 2007 – 14:41

Build Subversion 1.4.2 in Ubuntu Edgy

January 6, 2007 – 23:54

The standard Ubuntu repository has only 1.3.2. Higepon’s tips worked very well. In addition to the packages listed, I had to also install ‘expat-dev’.

Mutt Notes

January 1, 2007 – 12:57

I’m just starting to use mutt, so this is where I plan to keep the tips and other notes. more…

My Ubuntu Experience: Email

January 1, 2007 – 12:36

Oddly, in this age of GUI, I’m seriously thinking about using mutt to handle emails. I tried both Evolution and Thunderbird. Neither turned out satisfactory at handling the multiple IMAP accounts I have. The Linux version of Thunderbird is particularly slow – compared to the Windows version. more…

Train spamassassin for a virtual user under qmail

December 25, 2006 – 14:38

cd /var/qmail/mailnames/foo.com/johndoe
sa-learn –spam –dbpath ./.spamassassin/bayes –showdots Maildir/.Junk/cur
or
sa-learn –ham –dbpath ./.spamassassin/bayes –showdots Maildir/.NotJunk/cur

Arrow Operator in Java 7? Hmm…

December 12, 2006 – 21:44

(Traceback to Weiqi Gao’s post)
Considering “.” is used as the accessor universally for all properties and methods in C#, as well as most script languages Java 6 has just made easier supporting, I for one would be very interested in learning the rationale behind using -> for property access – it’s got to be a conscious decision.

Another thing that had some coffee-spilling effect on me was the “Closures, Lambdas and friends” part. On the first look, I thought they were adding “friend” support in Java 7 (as in C++), which would have been a good thing. :)

My Ubuntu Experience: I Broke It!

November 18, 2006 – 18:04

So after getting myself comfortable enough in the new Ubuntu home, I thought it was time to expand it – quite literally – I wanted to carve a new partition out of what was now one big 66GB NTFS partition, and to move /home to there so that it would be kept separately from the rest of the system. more…

My Ubuntu Experience: Networking

November 16, 2006 – 00:26

The Marvell Yukon Gigabit onboard NIC coming with my ASUS motherboard had some problem hooking up with the DLink router. You would think, when both devices are 100baseT by default, the auto link speed negotiation ought to have been a mere formality. But, everytime after the system just boot up, it would take anywhere between 5 seconds to 30 minues for the two to shake hands and achieve a viable link. The visible symptom is the DHCP requests kept getting ignored, and in turn no IP can be obtained from the router for the system.

In Windows, I had to go to the driver configuration, disable the "auto sensing", and explicitly set the NIC to 100baseT. In Ubuntu, this is done by adding the following script to /etc/network/if-pre-up.d:

CODE:
  1. #!/bin/sh
  2.  
  3. ETHTOOL=/usr/sbin/ethtool
  4.  
  5. if [ ! -x $ETHTOOL ]; then
  6.   exit 0
  7. fi
  8.  
  9. if [ "$IFACE" = "eth0" ]; then
  10.   echo disabling $IFACE auto negotiation
  11.   $ETHTOOL -s $IFACE autoneg off
  12. fi

Everytime when the network interfaces are initialized, this script (along with everything else in that if-pre-up.d directory) is executed before dhcpclient is involved.

Update:
Use sudo ifdown -a to bring down all interfaces, and sudo ifup -a to bring them back up.

My Ubuntu Experience: Java

November 15, 2006 – 01:58

I'll catch up later the couple of "episodes" which I'm skipping over and jumping to the Java set up part. Ubuntu comes with gcj and other GNU-based java facilities, which mostly are still only equivalent to JDK 1.4.x. So they needed to get chucked right away, and replaced with the Sun JDK 5. It's pretty straightforward to install JDK 5, Eclipse, and the rest of the arsenal I work with on the daily basis. The only part involving manual setting was when enabling the Java Plugin and Web Start in Firefox. Here's The Plugin Portion of it. more...