Yiping's profileYiping's spaceBlog Tools Help

Yiping's space

Want more protein foldings?

Yiping Ruan

Occupation
20 October

Use your computer smartly

We always feel our laptop can open a file it in seconds. Yet as the FYP goes on, we suddenly find sometimes the file is so large or the calculation is so complex that waiting become necessary. But trust me, our small laptop can still handle most of the cases. It’s just that you have to choice the right tool.

Last night, a friend ask me to make a C++ program because her Perl script has been running forever. The task is easily understood: inner product of two tables.

image

The bottleneck is that one of the table contains 40,000 records and she was using a n^2 complexity method (search the whole table for each match). I don’t want to look at the Perl script or code a C++ during such a relaxing night because the first idea came into my mind is SQL. Yes, it is nature to do this in SQL.

I host Microsoft SQL 2008 Express on my old T43 so I just import the two tables then do the simple query:

SELECT * FROM [Table1], [Table2]

WHERE [ID1] = [ID2]

No doubt the database engine was highly optimized for doing such things and the whole process was finished in 6 min.

15 October

Year 4

终于,不可避免的,同学之间见面的问候变成了“毕业以后怎么打算”。我承认自己是一个看上去不太上进,没有冲劲的人,听听这个问题就会面部瘫痪。也许只有成为保洁公司大中华区销售代理,或者左手MIT右手普林斯顿的孩子,才会开开心心的谈论它吧。

为了心中的还有的一点残念,说读书吧,我可怜的CAP不由引得同屋轻蔑的笑声。工作?修修硬盘也可以混一口饭吃,可是这么多年学生物又是为了什么?

梦想不得不面对现实的一年,祝福各位能好好的把握自己。

See you next year.

13 October

无极生太极

1223300428481_000

太极生两仪,两仪生四象,四象生八卦,八卦演万物。

世界中有太多的东西是何阴阳两极相对应,

光和暗,善与恶,雄跟雌。

是日也,在做Computer Graphics的作业,默默编写读取bmp图像的代码。望着一个一个RGB的hex value,不禁联想起这周易里面的太极八卦。

Bit,信息的基本单位;0,1,不正好就是对应阴阳么?

1Byte = 8Bit,Byte不就是一个八卦么。

就靠这些无穷的变化,产生了所有的程序。

= =b

 

bitbyte

07 October

。。。。。。

高锟:(1933年11月4日-),华人,生于中国上海金山区。光纤通讯、电机工程专家。光纤之父,前香港中文大学校长。美国国家工程院院士、英国皇家工程科学院院士、英国皇家艺术学会会员和瑞典皇家工程科学院外籍院士,台湾中央研究院院士。1996年当选中国科学院外籍院士