UNIX编程艺术

花5天时间读完了<UNIX编程艺术>一书,获益良多.有价值观点众多,此处仅举几例.

教外别传,不立文字,直指人心,见性成佛 (A special transmission independent of the scriptures. Not founded on words or letters. By directly pointing to the mind. One’s nature is seen, enlightenment is attained.)

过早优化是万恶之源(Premature optimization is the root of all evil.) 程序员工具箱中最强大的优化就是不做优化.

Unix哲学浓缩成一句话:Keep it simple, stupid!

事情要尽可能简单,但别简单过了头.

Don’t reinvent the wheel.

Those who cannot remember the past are condemned to repeat it.
— George Santayana

Unix发明者:Ken Thompson
Lisp发明者 John McCarthy
C语言发明者 Dennis Ritchie

有极少数软件技术被证明经久耐用,变成强势的文,有鲜明特色的艺术,和世代相传的设计哲学,Unix文化是其一.互联网文化是第二个.

策略相对短寿,机制才能长存.

UNIX哲学是这样的:一个程序只做一件事,并做好.

UNIX哲学的更多内容不是先哲们口头表达出来的,而是由他们所做的一切和UNIX本身所作出的榜样体现出来的,可以概括为:模块原则,清晰原则,(引后省略”原则”二字),组合,分离,简洁,吝啬,透明,健壮,通俗,缄默,补救,经济,生成,优化,多样,扩展等.

精简的UNIX的发展简史: 创世纪(1969-1971), 出埃及记(1971-1980), TCP/IP和UNIX内战(1980-1990), 反击帝国(1991-1995), 开源运动(1998-present).

UNIX历史的最大规律:距开源越近就越繁荣.任何将其专有化的企图,只能陷入停滞和衰败.

软件设计有两种方式,一种是设计得极为简洁,没有看得到的缺陷;另一种是设计得极为复杂,有缺陷也看不出来.第一种方式难度要大得多.

重构的原则性目标就是提高正交性.

Beauty is more important in computing than anywhere else in technology because software is so complicated. Beauty is the ultimate defense against complexity.

… etc

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s