• an interesting birthday gift

    Posted on: Sun, 03/02/2008 - 22:34 By: Huahai

    Huahai has received his birthday gift from Yunyao, a few days early.

    What's inside?

    Wow, a scenic flight certificate, what a lovely gift! Thank you, babe.

  • Create Multiple Modules Maven Project in Eclipse

    Posted on: Thu, 02/14/2008 - 04:49 By: Huahai

    Modularized software system design is often a good idea. Maven is the new software build system that is purported to be better than ant. For my new project, I want to create a maven build consisting of multiple modules. To do this, and let Eclipse treats these modules as parts of a single Eclipse project, I used the following procedure.

    First create the top level maven project, which will be the container of the modules. Our top level maven project is called "cool".

  • Java time resolution

    Posted on: Sat, 02/09/2008 - 20:21 By: Huahai

    I am writing a Java program to run psychology experiments. Since this is a generic program that may be configured for running some reaction time (RT) experiments, I am worried about the time resolution of Java. It turns out that I don't need to worry too much, except on Windows. On Linux, one millisecond time resolution can be consistently achieved using either System.currentTimeMillis() or System.nanoTime() call.

  • A Simple GTD List Solution: Desktop, Web and Possibly Mobile

    Posted on: Mon, 12/10/2007 - 04:25 By: Huahai

    I have been searching for a lightweight list solution since I started trying out the Getting Things Done (GTD) approach a few days ago. Unlike calendar events, list items (projects and actions) do not associate with a particular time and date, therefore, using a calender for them is not appropriate. According to David Allen, for lists, we should "just go for simplicity, speed, and fun". Here I operationalize that into these properties:

    • Simple, but can still do these:
      • Handle lists for "project", "next-action", "waiting-for" and "maybe"*
      • Be able to tag an item with "context", and organize items by context
      • Support sub-list
  • Editing Web Textarea with Desktop Editor

    Posted on: Fri, 12/07/2007 - 07:17 By: Huahai

    Nowadays we do a lot of text input on the Web, like posting on forums, filling out a support request form, commenting on someone's blog, etc. Although Web forms often offer a variety of so-called rich text editing capabilities, nothing beats the good old desktop editors. For a vim person, a plain Web textarea simply is not the place for text editing. Fortunately, for Firefox users, this pain can be eased. There are a few Firefox addons that allow people to use external editors for editing textarea.

  • Firefox Hangs

    Posted on: Thu, 12/06/2007 - 10:52 By: Huahai

    Although Firefox is considered very safe and stable, it sometimes hangs. In the past, when it hung, my solution was to remove the whole ~/.mozilla/firefox directory. It worked every time (reinstalling Firefox doesn't help). Of course, I would always backup my bookmarks.html and other files under the chrome sub-directory first. Then I had to reinstall the add-ons when I got a working firefox. It turned out I shouldn't have taken such a drastic action.

  • An Mac Look for my KDE Desktop

    Posted on: Wed, 12/05/2007 - 10:04 By: Huahai

    Although I have never laid my hands on an Apple computer, I have seen people going crazy about them. I remember seeing some kids shouting hysterically in front of Apple store on the release day of Tiger a few years ago. The user interface of Apple's OS is said to be one of the selling points. So when I was feeling tired of Mepis Linux's default look last night, I decided to try an OS X look for a change. It turned out to be relatively easy to do.

    KDE widget Basically, getting an OS X Tiger look and feel on KDE involves installing a theme that imitates its look and feel. There is a KDE theme called Baghirathat does just that. It's so popular that Debian sid has it in the pool, so

  • Use Vim as Info Page Browser

    Posted on: Thu, 11/29/2007 - 07:56 By: Huahai

    In this post, I set up vim as a manual page viewer, using ManPageView plugin. It turned out that the same plugin can be used to view info pages as well. All one needs to to is to add ".i" suffix to the command that you are seeking help on. For example, ":Man sed.i" will show the info page for sed. With this information, we can set up vim as info page browser, just add these lines in ~/.bashrc:

Subscribe to Huahai's Blog