• Upgrade Drupal with Almost Zero Down Time

    Posted on: Sat, 07/16/2011 - 09:17 By: Huahai

    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).

  • Fix Drupal Search

    Posted on: Sun, 07/10/2011 - 20:18 By: Huahai

    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.

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

    Posted on: Sun, 06/05/2011 - 06:36 By: Huahai

    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.

  • My solutions for problems No. 51-75 on 4clojure.com

    Posted on: Wed, 05/25/2011 - 02:59 By: Huahai

    This post continues the previous one, on my solutions for small clojure programming problems on 4clojure.com. Doing these problems seems to be addictive as I could not seem to stop myself. The site recently added a golf league feature, so one can see how short one's own solution compared with others. If a lot of people got a much shorter solution than yours, you know you are not thinking in the right way.

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

    Posted on: Thu, 05/19/2011 - 00:13 By: Huahai

    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.

  • Develop clojure Web applications with vim

    Posted on: Tue, 05/03/2011 - 00:02 By: Huahai

    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.


  • A conversation about the job talks of new Ph.D. graduates in computer science

    Posted on: Mon, 03/07/2011 - 20:40 By: Huahai

    Yunyao and I work in a research center of a major technology company. At this time of a year, we attend job talks every week. These talks are technical presentations given by candidates for our research or development positions, as part of their two day job interviews here. Not surprisingly, the majority of the talks are given by newly graduated computer science PhDs who have published a lot of technical papers in premier computer science conferences. After a while, we kind of see some common deficiencies of these new graduates. Below is an instant messaging conversation we had right after attending a talk, which I hope would be helpful for some people.

    YY: How do you like the talk?

    HH: good slides

    YY: yes, very well made

    HH: lack of big picture in question handling

  • 一个关于儒家核心价值观的对话

    Posted on: Fri, 02/04/2011 - 23:57 By: Huahai

    下面是一个中文BBS上发生的一个关于中国传统文化和价值观的对话,我简单编辑了一下,贴在这儿,也许对某些人有所助益。

    [猴娘]  基督教中国化,会不会产生一个类似禅宗一样的新宗教呢?儒学和基督教的融合,存在什么样的困难?
    ...

    [东沟]  ...儒家其实从鸦片战争之后就有所蚕食,五四以后开始被踹,文革时候彻底踹倒。然后改革开放的现代化把其经济基础彻底瓦解,连死灰复燃的机会都没了。一句话:我没有说文革十年毁掉中华文化,我说的是文革十年在中华文化的破房子上踹上最重也是最终的一脚。

    今天儒家只能当历史瞻仰,不可能当做信仰。你可以对儒家有无限怀念,但你绝对不会三妻四妾,绝对不会趋义弃利,父母死了绝对不会三年守孝,要是女的更绝对不会三从,也绝对不会饿死事小,失节事大等等等等。你可能会“三思而后行”,会“满招损谦受益”,会“学而时习之”,会“己所不欲勿施于人”,但因为这些东西跟普世价值太像了,你不能说信奉他就是信奉儒家。

    [火柴]  你真逗,因为不能“三妻四妾趋义弃利三年守孝三从饿死事小失节事大”,所以儒家灭了。因为“满招损谦受益,学而时习之,己所不欲勿施于人”跟普世价值太像了,所以不能叫儒家得叫普适价值。感情叫不叫儒家不取决于自己,取决于别人.如果有一天查理提出个“朋友来了我真高兴”的狗皮膏价值来,我们就得把自个的信仰改成狗皮膏了

    [东沟]  听你启发,我要修正以下,“满招损谦受益,学而时习之,己所不欲勿施于人,朋友来了我真高兴”,这些东西就是生活箴言,算不上信仰。

  • 读《概念空间》 - 0

    Posted on: Thu, 02/03/2011 - 23:28 By: Huahai

    Peter Gardenfors, Conceptual Space: The Geometry of Thought, MIT Press, 2004

    我先写个总的印象,再逐章总结一下,这书共八章。

  • 中国的技术引爆文艺复兴?

    Posted on: Wed, 02/02/2011 - 06:33 By: Huahai

    《1434》是一个英国退役的潜艇舰长Gavin Menzies写的书,是他的《1421》的后续。《1421》主要是说是中国
    人,具体的说,就是郑和舰队的一支,发现了美洲。自然,有很多人质疑。其中一个观点就是如果中国人发现了美洲,咋没到更近的欧洲?《1434》就主要讲郑和的舰队的一支,在最后一次出航的时候的确到了意大利,并且带去了技术引爆了文艺复兴。 这本书也花很大篇幅介绍了中国舰队使用的星相航行技术的细节,弥补了上一本书的一些缺陷。

Subscribe to Huahai's Blog