星期一, 十二月 29, 2008

thunderbird lightning 0.9 multi在ubuntu 8.10 intrepid下不能使用的问题解决

经查,只需要安装libstdc++5即可。如下:

$ sudo apt-get install libstdc++5

卸载插件,重新安装插件即可。

参考:
http://sns.linuxpk.com/space-25443-do-blog-id-15264.html

udi manber同学的语录

udi manber是个大牛啊,呵呵。查资料时又翻了翻他在arizona时候的homepage,发现了两条好玩的语录,如下。

The difference between theory and practice in practice is greater than the difference between theory and practice in theory.
理论和实际的实际距离比两者的理论距离要大得多。

The difference between democracy and dictatorship is that in a dictatorship the government lies and the newspapers lie. In a democracy the government lies and the newspapers lie, but they are different lies.
民主和独裁的区别是:独裁政府说谎,报纸也说谎;民主政府说谎,报纸也说谎,但是他们说不同的谎。

星期日, 十二月 28, 2008

在ubuntu下编译linux 2.6.28内核手记

编译2.6.28内核

$ sudo apt-get install build-essential kernel-package libncurses5-dev

download kernel from http://www.kernel.org/

$ tar xfj linux-2.6.28.tar.bz2
$ cd linux-2.6.28

$ cp /boot/config-`uname -r` ./.config
#XXX /boot/config...近乎全部编译,必须精简!不然编译下来,2G空间都不够用的,汗~

####### 查看硬件信息
sudo dmidecode
lspci
dmesg
########

make menuconfig #根据硬件信息对config做精简。很遗憾,目前没有自动化工具能够帮助自动完成内核定制工作。搞明白几千个配置选项是个体力活。

make -j2 #两个线程编译,因为我是core duo
make -j2 modules

make modules_install
make install


sudo mkinitramfs -o /boot/initrd.img-2.6.28 /lib/modules/2.6.28 #添加引导信息

因为我用wubi,所以要编辑C:的menu.lst,而不是/boot/grub/menu.lst (我是把/boot/grub/menu.lst拷贝到C:做为wubi的menu.lst)
添加
## ## End Default Options ##
title Ubuntu 8.10, kernel 2.6.28
root (hd0,6)/ubuntu/disks
kernel /boot/vmlinuz-2.6.28 root=/dev/sda7 loop=/ubuntu/disks/root.disk ro ROOTFLAGS=sync quiet splash
initrd /boot/initrd.img-2.6.28

title Ubuntu 8.10, kernel 2.6.28 (recovery mode)
root (hd0,6)/ubuntu/disks
kernel /boot/vmlinuz-2.6.28 root=/dev/sda7 loop=/ubuntu/disks/root.disk ro ROOTFLAGS=sync single
initrd /boot/initrd.img-2.6.28

重启

参考文献:
http://blog.chinaunix.net/u/28781/showart_1728364.html

ubuntu 8.10 intrepid ibex cpu frequency scaling功能失效的问题

在某些本本上安装ubuntu 8.10 intrepid ibex的童鞋应该发现了一个问题,原来8.04 hardy下的cpu自动降频功能失效了。8.04 hardy如果升级内核也会出现同样问题。现象就是cpu总是工作在满负荷的频率上。btw, 我的本本是hp compaq nx6320。

经过漫长的调研和费尔八吃劲折腾内核编译得到的事实证明,nx6320的BIOS和新内核有点不对付。已知最有效的解决方案就是:升级BIOS。

很简单,到HP网站下载F.0D版本的bios (sp35614.exe),windowsxp下运行即刷之!重启,搞定。

注意:不要用最新的F.0E,据HP论坛上说存在另外一个问题。

陆奇同学动向跟踪(完结篇)

旧闻了,一直没有更新到博客来。趁机更新一下,做个完结。

微软12月5日宣布,雅虎前高管陆奇将加盟微软,任在线服务集团总裁,主要负责搜索、在线广告、在线信息和通信服务等互联网业务,直接向微软CEO史蒂夫·鲍尔默(Steve Ballmer)汇报。

参考:
http://news.xinhuanet.com/employment/2008-12/05/content_10459178.htm

[老贴重发]云计算解读

http://en.wikipedia.org/wiki/Cloud_computing 解读

基本概念:
云计算是一个概念。
网格计算、公用计算、服务即软件都是一种技术。

Cloud computing is a new (circa late 2007) label for the subset of grid computing that includes utility computing and other approaches to the use of shared computing resources, rather than having local servers or personal devices handling users' applications.
解读:
1. 云计算是一个很新的概念(2007年底才被提出来的)。
2. 云计算是网格计算的子集。
3. 云计算的实现手段有:公用计算(utility computing)以及其他利用公共资源完成计算任务的方法。

The label of "cloud computing" is not, however, identical with the business model of software as a service or the usage model of utility computing.
解读:
云计算 不等于 服务即软件(service as a software)。
云计算 不等于 公用计算的一种具体的应用模型。

Grid computing is a technology approach to manage a cloud.
解读:
网格计算是一种管理“云”的技术手段。

In effect, all clouds are managed by a grid but not all grids manage cloud.
解读:
所有的“云”都需要借助网格技术来进行管理。
但不是所有的网格都是用来管理“云”的。

xxx Specifically a compute grid and a cloud are synonymous while a data grid and a cloud can be different.
解读:
计算网格和云可以指同一个意思。(所以才老会混淆)
数据网格和云可以是不同的意思。

A computer cluster can offer cost-effective service in specific applications, but may be limited to a single type of computing node that allows all nodes to run a common operating system.
解读:
集群技术的区别是,集群中的节点都是同类型的。(比如体系结构、操作系统等都一样)
而网格的目标是要把任何终端设备(例如电脑、手机、打印机等等)都整合到一起的。

Also important to the notion of cloud computing is the automation of many management tasks. If the system requires human management to allocate processes to resources, it's not a cloud: it's just a data center.
解读:
数据中心的区别是,需要人来手工管理资源分配。
网格计算是自动管理的。

As a result, the services that can be delivered from the cloud are not limited to web applications, but may also include storage, raw computing, or access to any number of specialized services.
解读:
云计算能够提供的服务包括但不限于:web应用(例如Google Maps),存储服务(例如Google GFS已经开放给美国大学使用),计算(例如Google MapReduce已经开放给美国大学使用),其他特殊服务,等等。

git-svn,爽

@ubuntu intrepid

sudo apt-get install git-svn

git svn clone https://hmisty.googlecode.com/svn/trunk/ hmisty --username qingyan123

提示输入密码时,输入googlecode上generate的密码(注意不是账号的登录密码)

### 出错啦 ###
error: More than one value for the key svn-remote.svn.fetch: :refs/remotes/git-svn

解决:删除checkout出来的目录,重新执行clone命令
### 出错啦 ###
RA layer request failed: Server sent unexpected return value (502 Bad Gateway) in response to PROPFIND request for '/svn/!svn/vcc/default' at /usr/bin/git-svn line 1493

解决:删除checkout出来的目录,重新执行clone命令
### ###

cd hmisty

git checkout -b work #建立了work分支,可以开始编码了。注意,并没有又创建一份代码拷贝哦,比较节省磁盘

编码举例:

$ cd try
$ mkdir udp
$ cd udp

$ vi udp_udp_server.c
#include

$ git add .
$ git commit -a -m 'udp try'

$ vi udp_udp_server.c
#include

int main(int argc, char ** argv)
{
printf("starting udpl udp server\n");
}

$ git diff
diff --git a/try/udp/udp_udp_server.c b/try/udp/udp_udp_server.c
index 10b222c..3c94538 100644
--- a/try/udp/udp_udp_server.c
+++ b/try/udp/udp_udp_server.c
@@ -1,2 +1,6 @@
#include

+int main(int argc, char ** argv)
+{
+ printf("starting udpl udp server\n");
+}

$ git commit -a -m 'add main function'

编码结束。

合并分支,然后提交到远程svn server:
cd ~/hmisty/
git checkout master #切换到master分支
git merge work #合并work分支的工作过来
git svn rebase #rebase
git svn dcommit #提交到svn server

确实比svn好用哈哈,也比SVK简单方便。充分彰显如下的代码开发模式:

master
\-> branch bug_001 -> fix bug_001 -> tests pass
\-> branch bug_002 -> fix bug_002 -> tests pass
\-> branch bug_003 -> fix bug_003 -> tests pass
-> merge all branches bug_001 bug_002 bug_003
-> all tests pass
-> commit

星期四, 十二月 11, 2008

[旧文] 开放平台的三个矛盾的思考

看了Mark 的专访,由其中有些话又想起之前在思考的开放平台的三个矛盾。后面收集些资料有机会和大家共同探讨。

一、开放和封闭的矛盾

He said people have been trained to believe that there is a binary set of options concerning privacy and sharing of data: that some things are sharable and others are not.

"Take a photo album from a party," he said. "Unless you have specific tools to limit who can see it, then you won't share it with anyone."

有无相生,难易相成,长短相形。开放封闭是相对而生的矛盾共同体。

二、长尾和短头的矛盾

"Developers aren't fundamentally spammy," he told me, "they want to add value around what they are enabled to do. So far they've been incentivized to get as many users as possible." He said the company is trying to shift the incentive structure to reward truly useful, trustworthy apps.

长尾的需求其实往往是被短头的应用所满足。

三、大象和蚂蚁的矛盾

Data portability advocates might take heart in the fact that Zuckerberg wants to clean up the Facebook ecosystem of Zombie-throwing crap. The percentage of data worth making portable on Facebook is far from ideal today.

Data portability will not be viable anywhere until there are simple, granular and effective controls over user data and privacy. Facebook is in a good place to focus on solving those problems.

Facebook may have felt like the only game in town when the Platform launched, but things change fast and between the much broader OpenSocial and a fast expanding community of standards based developers - Facebook might soon find that it's sitting on the sidelines while everyone else works together to solve these common problems.

善舞的大象和蚂蚁雄兵的博弈,后势如何?

星期二, 十二月 09, 2008

孔子,山寨版,人民群众的智慧是无穷的

今天查阅孔子的名言,"已欲立而立人,己欲达而达人"。正暗自为先圣为我们指引的崇高境界而沉思时,猛然看到山寨版,顿被雷倒:"己欲理而理人,己欲打而 打人"——我想搭理你的时候就搭理你,我想打你的时候就打你,绝对是当代漫山遍野的野蛮女友、野蛮老婆的生动写照~ 先圣所谓,理想也;山寨所谓,现实也。人民群众的智慧,可歌可叹!