Data-Oriented Programming (DOP)

JSON is arguably the world's most popular human readable data format today.  It has largely replaced XML as the data exchange format on the Internet. One of the key reasons for the proliferation of JSON is its simplicity.  The data structure are very limited: only arrays, enclosed with []; and objects …

more ...





Start learning category theory

Perhaps due to my rather small brain (literally), I dislike remembering tedious details. When in elementary school, I hated reciting classic Chinese poems, but liked composing my own :-).  In high school, I hated chemistry but loved physics, because one could do everything based on a few principles in physics, whereas …

more ...

"It's official: Tom is a Nebelung!"

When Tom (唐唐)was adopted from the animal shelter, his papers listed him as an "American Domestic Long Hair". As new cat parents, we were eager to find out his true breed. We searched and searched online, and identified him as a Chartreux, based on his fur color and …

more ...


Are you Han? My paternal ancestry - Hypothesis

I was brought up as a Han Chinese and I myself have never doubted that identity.  However, I do know that I look slightly different from people around me when I grew up. Darker skin, slightly curly hairs, deeper set eyes and other distinctive facial features. Put it simply, my …

more ...

Display LaTeX Math on Drupal with MathJax

MathJax seems to be the emerging standard for displaying math on the Web at this moment. It is supported by American Mathematical Society and American Physical Society, and has already been adopted by major math related discussion venues such as Physics Forums and Stack Exchange. MathJax displays math using CSS …

more ...

Upgrade Drupal with Almost Zero Down Time

This site was setup in 2007 with Drupal 5, and it has not been upgraded until today. I did not feel the need to upgrade since this is just a personal blog. A few days ago I wanted to install a module, but Drupal version 6 is required, so I …

more ...

Fix Drupal Search

Today I tried to search "clojure" using the search box at the top right corner, but could not find anything. I know I wrote a few posts on Clojure recently, so there must be something wrong with the search functionality here. This is a Drupal site, and this should be …

more ...

My solutions for problems No. 76-100 on 4clojure.com

Finally done with all the 100 problems listed on 4clojure.com so far :-). When new problems appears there, I will probably do them when I have some time to kill, but I will not post my solutions here any more. If I found interesting programming exercises, I may submit to …

more ...



Develop clojure Web applications with vim

I recently started to learn clojure programming. It is an interesting experience. Ever since I learned computer programming almost 20 years ago, in Pascal, on a VAX minicomputer terminal, I have not experienced this newbie sensation with a computer language. The sense of excitement and novelty is high, and the …

more ...


Thinkpad Hotkeys in KDE4

I have kept my Thinkpad X61 laptop up to date with Debian sid for a few years. The KDE4 in Debian sid is at version 4.4.5 at this moment, and I think it is mature enough for me to switch the laptop power management from my own hacked …

more ...

Config Spring and DWR on Jetty with zero XML

I hate xml configuation files. They look awful. As a result, they can be very time-consuming to write, and are very error-prone. There's no type-safty checking whatsoever. I would rather keep configurations within my Java source code. After all, we programmers are the only people looking at these configurations, why …

more ...

Suspending to RAM on Debian laptop

I am tracking Debian sid on my Thinkpad laptop, a few months ago it started to use pm-utils and broke suspending to RAM (sleep) functionality. Basically, the machine would go to sleep then immediately resume.
It turned out that this problem can be easily fixed by creating a file /etc …

more ...