Huahai's blog

Are you Han? My paternal ancestry - 12 Marker Results

As mentioned previously, I swabbed my cheeks and mailed my Y-DNA test specimen to FamilyTreeDNA a few months ago. Now the first part of the results, consists of twelve markers, are known. These are standard Y-STR results. Before showing the actual numbers, let me briefly explain.

Why category thoery is fundamental yet hard to understand

Category theory is mathematical theory about mapping. Some call it the foundation of mathematics.

According to my understanding of math as reproducible mental object, this is not supprising. As all the brain does is doing mapping. Or in Plovian's words: conduction. Signals going from one set of neuros to another.  Understanding mapping is fundamental obviously.

Now category is billed the hardest to understand branch of mathematics, also known as "abstract nonsense". 

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 face does not look like an average Han male face. However, nobody really said anything about my appearance except that my old brother occasionally joked about it (he looks like a normal Han Chinese by the way). After all, I look just like my father.

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 and Web fonts instead of images, so the quality is very high and is resize-friendly. Below are some examples:

Inline math: the geometric product $\boldsymbol{uv}$ of vectors $\boldsymbol{u}$ and $\boldsymbol{v}$ is $\boldsymbol{u}\cdot\boldsymbol{v} + \boldsymbol{u}\wedge\boldsymbol{v}$, where $\boldsymbol{u}\cdot\boldsymbol{v}$ is the inner product and $\boldsymbol{u}\wedge\boldsymbol{v}$ is the outer product.

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 thought it's finally the time to upgrade Drupal. This Drupal upgrade tutorial suggests to first take down the site to upgrade, but I do not like that. It turns out that more than a few days of work are required to bring back a fully functional upgraded site, so taking the site down to upgrade is not a good idea. Below is what I did to upgrade this site from version 5.3 to 6.22 with almost zero down time (well, maybe a few seconds, I didn't time it). Continue reading »

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 an easy fix. Indeed, I quickly figured out the problem and solved it.Here is what Idid. Continue reading »

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 4clojure as well. Continue reading »

My solutions for the first 50 problems on 4clojure.com

For someone without previous Lisp experience, the hardest part of learning Clojure programming seems to be the functional way of doing things. It is like math, one really needs to do some exercises in order to master it. At this point, 4clojure.com seems to be the best place for getting such exercises. It has a lot of problems for new clojurians to solve. These problems ask one to fill in the blank __ so the given expressions are true. To give a little challenge, some clojure built-in functions are forbidden to use for some problems. New problems are added from time to time on the site, so it surely can keep me entertained for a while. Continue reading »

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 eagerness to put the language to use is higher still. So for my new project at work, I am doing it with clojure.

This is a visual analytics project, and the visual part will be on the Web. It amazes me how much work has already been done for the Web using this 3 years old language. So it should be easy for me to get started. Here's what I have so far.

Continue reading »

Syndicate content
Nice place