CSDN博客

img phost

TAOUP

发表于2004/7/16 18:11:00  732人阅读

Culture? What Culture?
This is a book about Unix programming, but in it we’re going to toss around the words ‘culture’,
‘art’, and ‘philosophy’ a lot. If you are not a programmer, or you are a programmer who has had little
contact with the Unix world, this may seem strange. But Unix has a culture; it has a distinctive art
of programming; and it carries with it a powerful design philosophy. Understanding these traditions
will help you build better software, even if you’re developing for a non-Unix platform.

Unix的文化
虽然这是一本有关Unix编程的书籍,但在本书中却充满了“文化”、“艺术”和“哲学”的字眼。如果您并不是一名程序员,或者虽然是程序员

,但是对Unix世界所知甚少,这些字眼可能就看起来非常奇怪。然而,Unix具有自己的文化、独特的编程艺术以及功能强大的设计哲学。

理解这些传统有助编写更好的软件,即使您采用非Unix平台进行开发,这也会使您大获裨益。

Every branch of engineering and design has technical cultures. In most kinds of engineering,
the unwritten traditions of the field are parts of a working practitioner’s education as important
as (and, as experience grows, often more important than) the official handbooks and textbooks.
Senior engineers develop huge bodies of implicit knowledge, which they pass to their juniors by (as
Zen Buddhists put it) “a special transmission, outside the scriptures”.

工程与设计领域中的每个分支都有自己的技术文化。在大部分工程领域中,该领域未成文的传统对于从业人员的教育来说,都是非常重要

的一个方面,其重要性不亚于正式的手册和教材;而且随着经验的增长,这些传统的重要性甚至会远远超过后者。资深的工程师建立起丰

富的知识体系,并将其传授给后来者--按照禅宗的观点,这种方法称为“教外别传”。

Software engineering is generally an exception to this rule; technology has changed so rapidly,
software environments have come and gone so quickly, that technical cultures have been weak and
ephemeral. There are, however, exceptions to this exception. A very few software technologies have
proved durable enough to evolve strong technical cultures, distinctive arts, and an associated design
philosophy transmitted across generations of engineers.

对于这种规则来说,软件工程通常是一个例外:技术发展是如此迅速,软件环境不断涌现又快速消失,因此技术文化已经变得非常脆弱而

且短暂。然而,这种例外之中又有例外。有些软件技术已经证明生存足够久远,足以创造浓厚的技术文化、独特的艺术以及相应的设计哲

学,业已在一代代工程师之间广泛流传。

The Unix culture is one of these. The Internet culture is another — or, in the twenty-first century,
arguably the same one. The two have grown increasingly difficult to separate since the early 1980s,
and in this book we won’t try particularly hard.

Unix文化就是这样一种文化;Internet文化是另外一个这种文化的例子--或者更确切地说,在21世纪,Internet文化必然将形成这样

一种文化。从20世纪80年代开始,这两种文化都迅速日益发展,彼此交织在一起,很难区分开来;在本书中,我们也不会努力尝试区分这

两种文化。

The Durability of Unix
Unix was born in 1969 and has been in continuous production use ever since. That’s several geologic
eras by computer-industry standards — older than the PC or workstations or microprocessors or
even video display terminals, and contemporaneous with the first semiconductor memories. Of all
production timesharing systems today, only IBM’s VM/CMS can claim to have existed longer, and
Unix machines have provided hundreds of thousands of times more service hours; indeed, Unix has
probably supported more computing than all other timesharing systems put together.

Unix的持久性
Unix诞生于1969年,从那以后,Unix就不断地在产业界中广泛应用。这是计算机工业界标准的纪元之一,其年代甚至比PC、工作站、微

处理器甚至显示终端更为久远,可以与之相提并论的只有第一代半导体内存。在如今所有的分时操作系统中,只有IBM的VM/CMS可以宣称

自己比Unix已经存在的时间更长。Unix机器的服役时间已经超过几十万个小时;实际上,Unix平台所提供的计算能力比任何其他三种分

时系统之和都要多。


Unix has found use on a wider variety of machines than any other operating system can claim. From
supercomputers to handhelds and embedded networking hardware, through workstations and servers
and PCs and minicomputers, Unix has probably seen more architectures and more odd hardware than
any three other operating systems combined.

Unix比其他操作系统支持的机器更为广泛:从超级计算机到手持设备、嵌入式网络硬件,从工作站到服务器、PC以及小型机,Unix已经驱

动了各种体系结构和奇特的硬件,其数量比任何其他三种操作系统所支持的总数都要多。

Unix has supported a mind-bogglingly wide spectrum of uses. No other operating system has shone
simultaneously as a research vehicle, a friendly host for technical custom applications, a platform
for commercial-off-the-shelf business software, and a vital component technology of the Internet.
Confident predictions that Unix would wither away, or be crowded out by other operating systems,
have been made yearly since its infancy. And yet Unix, in its present-day avatars as Linux and BSD
and Solaris and MacOS X and half a dozen other variants, seems stronger than ever today.

Unix支持的用户遍布的领域多的让人吃惊,没有另外一种操作系统可以同时在以下几个领域内熠熠闪光:功能强大的研究工具,界面友好

的科技专用程序的主机环境,现成可靠的商业软件平台,Internet的关键技术组件。从Unix才蹒跚学步开始,就充斥了各种预言:Unix

要么会逐渐枯萎并终止灭亡,要么会被其他操作系统挤出市场。然而,Unix如今已经演化为Linux、BSD、Solaris、MacOS X以及很多

其他变种,它们的生机却似乎比以前更加盎然。

Robert Metcalf [the inventor of Ethernet] says that if something comes along to
replace Ethernet, it will be called “Ethernet”, so therefore Ethernet will never die.4
Unix has already undergone several such transformations.

<author>KenThompson</author>

Rober Metcalf(以太网的发明者)曾经说过,如果有某项技术取代了以太网,那么这种技术将依然会被称为“以太网”,因此以太网是不

会消亡的。Unix已经多次经历了这种革新。

<author>KenThompson</author>

At least one of Unix’s central technologies — the C language — has been widely naturalized
elsewhere. Indeed it is now hard to imagine doing software engineering without C as a ubiquitous
common language of systems programming. Unix also introduced both the now-ubiquitous treeshaped
file namespace with directory nodes and the pipeline for connecting programs.

至少,作为Unix的核心技术之一的C语言,已经被在各处广泛采用。实际上,现在很难想象在系统编程时不采用C作为通用语言,应该如何

实施软件工程。Unix还引入了现在依然非常流行的技术:采用目录节点的树形文件命名空间,连接程序所使用的管道。

Unix’s durability and adaptability have been nothing short of astonishing. Other technologies have
come and gone like mayflies. Machines have increased a thousandfold in power, languages have
mutated, industry practice has gone through multiple revolutions — and Unix hangs in there, still
producing, still paying the bills, and still commanding loyalty from many of the best and brightest
software technologists on the planet.

Unix良好的持久性和适应性实际上也并不足为奇。其他技术不断涌现,又不断消亡,宛如昙花一现。机器的计算能力业成千倍地进行了增

长,语言已日益成熟,业界的实现也已经进行了多次革新--而Unix依然屹立不动:它仍然在维系生产,支付帐单,忠心地服从于这个星

球上最杰出、最聪明的软件专家的指挥。

One of the many consequences of the exponential power-versus-time curve in computing, and the
corresponding pace of software development, is that 50% of what one knows becomes obsolete over
every 18 months. Unix does not abolish this phenomenon, but does do a good job of containing it.
There’s a bedrock of unchanging basics—languages, system calls, and tool invocations—that one
can actually keep using for years, even decades. Elsewhere it is impossible to predict what will be
stable; even entire operating systems cycle out of use. Under Unix, there is a fairly sharp distinction
between transient knowledge and lasting knowledge, and one can know ahead of time (with about
90% certainty) which category something is likely to fall in when one learns it. Thus the loyalty
Unix commands.

在计算机业界有很多定律,其中有一条既适用于计算能力-时间关系曲线(即摩尔定律,译者注),也适用于软件开发中的相关步调,就

是现在我们了解的知识每18个月都会过时。虽然Unix也无法违法这一规律,但是它却可以包容这种技术的革新。Unix中有一个坚不可变的

基石:语言、系统调用以及常用的工具--这些东西可以一直使用数年,甚至数十年。否则,我们将无法预期什么能够保持稳定;甚至整

个系统都会陷入这种更新的循环,而根本无法使用。在Unix中,可以长久存活的技术和无法长期存活的技术有很明显的区别,这样在我们

学习这些技术时,就可以提前知道(有90%的把握)哪种技术没有前途。这样用户对Unix的忠诚度就得以延续。

Much of Unix’s stability and success has to be attributed to its inherent strengths, to design decisions
Ken Thompson, Dennis Ritchie, Brian Kernighan, Doug McIlroy, Rob Pike and other early Unix
developers made back at the beginning; decisions that have been proven sound over and over. But
just as much is due to the design philosophy, art of programming, and technical culture that grew up
around Unix in the early days. This tradition has continuously and successfully propagated itself in
symbiosis with Unix ever since.


Unix良好的可靠性以及所取得的巨大成功,很大程度上要归功于其与生俱来的优势,归功于开发者初期所做的英明决定,他们包括:Ken

Thompson、Dennis Ritchie、Brian Kernighan、Doug McIlroy、Rob Pike以及其他一些早期的Unix开发人员;这些决定不断证

明是英明无比的。然而,这同样还要归功于早期随Unix一起成长起来的设计哲学、编程艺术以及技术文化。从头至尾,这种传统一直与

Unix共生共存,并广为传播。



0 0

相关博文

我的热门文章

img
取 消
img