?? program-xwin-7-principia.html
字號(hào):
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Author" content="Edward Fu">
<meta name="GENERATOR" content="Mozilla/4.05 [zh-CN] (X11; I; Linux 2.1.127 i686) [Netscape]">
<title>Freesoft Linux FAQ -- X系統(tǒng)設(shè)計(jì)7原則</title>
</head>
<body>
1988 年 X 系統(tǒng)被設(shè)計(jì)之時(shí), 有 7 條原則,
<br>我覺得非常好, 供給寫系統(tǒng)的人作為參考:
<p>1 Do not add new functionality unless an implementation cannot complete
<br>a real application without it.
<p>除非一件真正的應(yīng)用程式非用某種功能否則無法完成, 不然就不要添加新的功能.
<p>按: 太多功能卻處處相似劣於將他們整合為一個(gè)功能, 太多相似的功能往往造成
<br>程式設(shè)計(jì)的選擇困擾, 也就是去蕪存菁, 方能顯現(xiàn)功能的真正實(shí)用價(jià)值.
<p>2 It is as important to decide what a system is not as to decide what
it
<br>is. Do not serve all the world's needs, but make the system extensible
<br>so that additional needs can be met in an upwardly compatible fashion.
<p>要決定一個(gè)系統(tǒng)是什麼跟決定一個(gè)系統(tǒng)不是什麼是同等重要的. 不須滿足全世界
<br>的需求, 而應(yīng)讓系統(tǒng)能夠延伸擴(kuò)張, 以便額外的需求能以往上相容的方式被滿足.
<p>按: 往上相容的意思是, 系統(tǒng)只須再做微小修改便可以將功能更新或擴(kuò)充.
<p>3 The only thing worse than generalizing from one example is generalizing
<br>from no example at all.
<p>唯一比從一個(gè)例子中歸納做出結(jié)論更糟只有從完全無例子中歸納做出結(jié)論.
<p>按: 也就是說, 從許多例子中歸納做出結(jié)論是好的, 優(yōu)於自己憑空造想.
<p>4 If a problem is not completely understood, it is probably best to
<br>provide no solution at all.
<p>如果不能完全了解一個(gè)問題, 大概最好別提供任何解決之道.
<p>按: 可能解決之道不符合問題本意, 誤入歧途, 浪費(fèi)精力.
<p>5 If you get 90 percent of the desired effect for 10 percent of the
work
<br>required to get 100 percent, use the simpler solution.
<p>如果因?yàn)橐患ぷ鞯陌俜种?該工作要求做到 100%), 你得到想要的效果之
90%,
<br>則使用比較簡(jiǎn)單的解決之道.
<p>按: 10% work -> 90% effect (easy) ; 剩馀 90% work 才 10% more effect
(hard) ;
<br>10% work 是比較好的解決之道, 簡(jiǎn)單, 有效率, 縱使不能盡善盡美.
<p>6 Isolate complexity as much as possible.
<p>盡可能把復(fù)雜性獨(dú)立出來.
<p>7 Provide mechanism rather than policy. In particular, place user interface
<br>policy in the client's hands.
<p>與其提供施行方針不如提供處理機(jī)制. 特別將使用者介面的施行方針交由客戶處理.
<p>按: policy => 大綱, 處理規(guī)定.
<br>mechanism => 細(xì)則, 處理流程.
<p>上述中文翻譯與編按部分由我一手完成, 如有錯(cuò)謬之處, 歡迎來信指正. (ee)
<br>--
<br>well ... here is my E-mail: daniel@rs560.ncu.edu.tw
<br>
<br>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -