About This Blog

This is Chunhao's Blog

I'm writing something about life and technology here. As a practice of English writing.

My Chinese Blog: http://blog.chunhao.net

My Chinese Page: http://chunhao.net/index-cn.html

Subscribe

The books I’m reading

The items I’m interested in

License

14 September 2008 - 21:30Upgrading to Hardy

Upgrading is evil.

Although sometimes software need upgrading, in order to fix bugs, or add new supporting, when you find bugs, there are only two things you can do for it. The first is fixing it yourself, while the second is waiting for upgrade. On the other hand, you might find some bugs appears after you upgrading a software, which worked well before. It’s hard to tell why we are willing to upgrade it. Just for upgrading?

Almost 5 months have passed since Ubuntu 8.04 “Hardy Heron” had released. And even “Intrepid Ibex” is coming within one month. I, should like changing, still used “Gutsy” in my laptop. There are several reasons why I keep using it. It’s hard to make all parts of my laptop Dell 1420 work well under Ubuntu 7.10, including the sound card, wireless, and microphone. Thank Dell Ubuntu Wiki a lot to provide patches to fix these issues. About 5 months ago, when “Hardy” was just released, the entry “Known Issues” in Dell Ubuntu Wiki is empty. I cannot put myself in hell to try the new release. Fortunately, issues have be found and fixed now for “Hardy”. I can upgrade my system safely–at least in image.

Another thing is that I have patched something on the kernel, such as VBox. I don’t want to repatch them after upgrading. And I was afraid that some software may don’t work after upgrading to “Hardy”. I have no time and don’t want to reinstall and reconfig them. Maybe a small issue can cause the damage of entire system. Then, I have to reinstall everything, and encounter all kinds of problems. A good thing is that I have my /home located in a separate partition. If my system is down, at least I can retain the things under my home folder, which are very very important.

I have one thousand reasons for not upgrading. However, how could you image that the software you are about to install depend on a newer version of “libglib” or “libc6″? Pidgin 2.5 support off-line messages for MSN, which I desired for a long time. When I tried to install it, it told me that it need a newer version of “libglib”. That meant I have to upgrade almost everything. Sounds like hell. Finally, I decided to do upgrade for Ubuntu.

The whole process took me an afternoon. I followed the official guide. It was not very hard. After downloading everything, dialogues popped up one after another. After I handled all of them, upgrading is over. The following thing is following the Dell Ubuntu Wiki to fix issues. At last, everything seems work fine, including microphone.

The last thing is installing Pidgin 2.5, for which, seems, the whole upgrading is processing.

2 Comments | Tags: linux

13 September 2008 - 0:19Command & Conquer

首先,这篇日志和技术有关,应该用英文写的,但里面夹杂了一些中文的元素,就写成中文了。

这个题目,作为游戏的名字就是“命令与征服”,作为Full Circle中文杂志的一个栏目名,就是“决胜命令行”。

人们总在做关于图形界面与命令行的争论,其实,二者各有优缺点。图形界面总能给人一种直观的感受,在一定程度上提高工作效率。但是,任何事都有它的局限性。如果画一个圆,里面的空间代表图形界面所擅长的工作,那么,这个圆环外面的整个空间都应该属于命令行!

命令行也有它的局限性,用手敲命令的时间有时并不一定比把鼠标移到某个菜单并点一下快。而且,尤其是对于非英语国家的人来说,了解那么多的命令和参数并不是一件容易的事情,尽管man命令可以帮助我们很多。

命令行的一个杀手应用就是批处理。如果你需要对几十个,甚至几百个文件进行类似的操作,摆在你面前的有三条路:1. 等专门的软件被写出来。2. 自己纯手工对这几百个文件处理。3.动手写个脚本。

在Linux世界,如果你要完成一项工作,有三条法则:

  1. 如果有现成的软件,使用它。
  2. 如果需要使用几个软件来完成,用管道或其他东西把他们连接起来。
  3. 否则,自己写程序完成它。

使用命令行,使用脚本,应该是介于第二条和第三条之间。脚本是用于把几个程序连接起来的工具,当然,也算是自己写的一个程序。

在批处理中,我们可以通过脚本,通过定义的一些变量,甚至一些循环、判断语句来很轻松地完成工作。当然,这一些的基础就是命令行,脚本很难通过图形界面和其他程序交互。当然,也有一些在命令行中生成GUI的工具,例如zenity

大概半年前,我做史记的电子书。其中,一个文件夹下的文件是这样的:

Read more…

No Comments | Tags: linux, programming