最近在看一本好書
Practical C++ Programming Second Edition
By Steve Oualline
Publisher : O'Reilly
Pub Date : December 2002
ISBN : 0-596-00419-2
Pages : 574
我個人覺得最正的是它每個章節內都有一兩句名言, 而且還收錄了我國的道家始祖老子的名句及中國的一個諺語, 我把它們都節錄了在這裡.
Chapter 1. What Is C++?
Profanity is the one language that all programmers understand.
Anonymous
詛咒: 每個程式設計帥的共同語言.
無名氏
Chapter 2. The Basics of Program Writing
The first and most important thing of all, at least for writers today, is to strip language clean, to lay it bare down to the bone.
Ernest Hemingway
對於設計者而言, 最重要的事莫過於簡潔, 去無存菁.
海明威
Chapter 3. Style
There is no programming language, no matter how structured, that will prevent programmers from writing bad programs.
L. Flon
無論多麼優雅的電腦語言, 都無法阻止設計師寫出爛程式.
It is the nobility of their style which will make our writers of 1840 unreadable forty years from now.
Stendhal
由於這個時代高尚的寫作風氣使然, 導致四十年之內沒人看得懂他們的文章.
Chapter 4. Basic Declarations and Expressions
A journey of a thousand miles must begin with a single step.
Lao-zi
登高必自卑 行遠必自邇
老子
Chapter 5. Arrays, Qualifiers, and Reading Numbers
That mysterious independent variable of political calculations, Public Opinion.
Thomas Henry Huxley
所謂的民意, 就是最大的變數.
Chapter 6. Decision and Control Statements
Once a decision was made, I did not worry about it afterward.
Harry Truman
一旦確定了目標, 我就不會再膽前顧後.
杜魯門總統
Chapter 7. The Programming Process
It's just a simple matter of programming.
Any boss who has never written a program
程式設計簡直跟吃飯一樣簡單.
每位沒有寫過程式的老闆
Chapter 8. More Control Statements
Grammar, which knows how to control even kings . . .
molière
文法, 上至帝王尊侯亦得卑躬屈膝.
莫里哀
Chapter 9. Variable Scope and Functions
But in the gross and scope of my opinion, This bodes some strange eruption to our state.
Shakespeare, Hamlet, Act I, Scene I
就我放眼所見,這預示國內將有怪事爆發.
莎士比亞, 哈姆雷特, 第一幕, 第一場
Chapter 10. The C++ Preprocessor
The speech of man is like embroidered tapestries, since like them this has to be extended in order to display its patterns, but when it is rolled up it conceals and distorts them.
Themistocles
演說家就像華麗刺繡的壁毯商人一樣, 以誇張的言辭誇耀花色的繁美以求人們購買, 但在其鍍金的言辭背後, 往往是被扭曲的事實.
俗諺
Chapter 11. Bit Operations
To be or not to be, that is the question.
Shakespeare on Boolean algebra
莎士比亞論布林代數
Chapter 12. Advanced Types
Total grandeur of a total edifice, Chosen by an inquisitor of structures.
Wallace Stevens
建築物的偉大, 在於結構的精緻.
Chapter 13. Simple Classes
She thinks that even up in heavenHer class lies late and snores.
Cyril Connolly
她認為天堂也有和她一樣嗜睡如命的同類.
Chapter 14. More on Classes
This method is, to define as the number of a class the class of all classes similar to the given class.
Bertrand Russell, Principles of Mathematics, Part II, Chapter 11, Section iii, 1903
所謂分類法, 在定義一個分類別的總數前, 必順先給予所有的類別
Bertrand Russell, 數學原理 , 第二部, 第十一章, 第三節, 1903
Chapter 15. Simple Pointers
The choice of a point of view is the initial act of culture.
Ortega y Gasset
觀察東西所採取的角度, 決定了文化本身的差異.
Chapter 16. File Input/Output
I am the heir of all the ages, in the foremost files of time.
Tennyson
我是所有時代的繼承者, 最好的時代.
Chapter 17. Debugging and Optimization
Bloody instructions which, being learned, return to plague the inventor.
Shakespeare, on debugging
命令, 誠如我們所見, 下令者總是自食惡果.
莎士比亞論除錯
Chapter 18. Operator Overloading
Overloaded, undermanned, meant to founder, we Euchred God Almighty's storm, bluffed the Eternal Sea!
Kipling
負荷過重再加上人員不足, 註定會造成這樣兵荒馬亂的結果.
Chapter 19. Floating Point
1 is equal to 2 for sufficiently large values of 1.
Anonymous
一可以等於二, 如果一夠大的話.
無名氏
Chapter 20. Advanced Pointers
A race that binds Its body in chains and calls them Liberty, And calls each fresh link progress.
Robert Buchanan
他們稱這些前仆後繼的活動為自由, 並認為自己是不可或缺的一環.
Chapter 21. Advanced Classes
The ruling ideas of each age have ever been the ideas of its ruling class.
karl Marx, Manifesto of the Communist Party
每個年代的主要思想正是當時統治階層的思想.
馬克斯 共產黨宣言
Chapter 22. Exceptions
How glorious it isnd also how painfulo be an exception.
Alfred de Musset
例外, 是多麼的值得讚揚, 又多麼的令人痛苦啊.
Chapter 23. Modular Programming
Many hands make light work.
John Heywood
一件事的成功, 並非一個人的功勞.
Chapter 24. Templates
Thou cunning'st pattern of excelling nature.
Shakespeare, Othello, Act V
你這天生尤物
莎士比亞, 奧塞羅, 第五幕
Chapter 25. Standard Template Library
Goodness and evil never share the same road, just as ice and charcoal never share the same container.
Chinese proverb
這是我個人覺得原來的諺語應該是, 正邪不兩立, 水火不相容.
中國的諺語
Chapter 26. Program Design
If carpenters made houses the way programmers design programs, the first woodpecker to come along would destroy all of civilization.
Traditional computer proverb
如果木匠蓋房子的方式和程式設計師一樣的話, 出現一隻啄木鳥就會使整個人類文明煙消雲散!
Chapter 27. Putting It All Together
For there isn't a job on the top of the earth the beggar don't know, nor do.
kipling
世界上沒有一種工作是乞丐不知道, 或是做不到的.
Chapter 28. From C to C++
No distinction so little excites envy as that which is derived from ancestors by a long descent.
François de Salignac de la Mothe Fénelon
沒想到一點以為小的差異竟會導致完全不同的結果, 好像他們是來自兩個完全不同的祖先.
Chapter 29. C++'s Dustier Corners
There be of them that have left a name behind them.
Ecclesiasticus XLIV, 1
他們生後必定留下名字
德訓篇 XLIV, 1
Chapter 30. Programming Adages
Second thoughts are ever wiser.
Euripides
三思而後行就對了.
在第一版內還有以下一句
Chapter 25. Portability Problems
Wherein I spake of most disastrous changes, Of moving accidents by flood and field, Of hair-breath 'scapes i' the imminent deadly breath...
Shakespeare, on program porting [Othello, Act 1, Scene III]
這其間我講到一些頂悲慘的遭遇, 海上陸上的驚人變故, 城破人亡時間不容髮的逃生.
莎士比亞論程式移植, 奧塞羅, 第一幕, 第三場.
而在同一個作者的另一本書 Practical C Programming, 3rd Edition 內有以下兩句
Chapter 19. Ancient Compilers
Almost in every kingdom the most ancient families have been at first princes' bastards....
Robert Burton
Chapter 21. C's Dustier Corners
There be of them that have left a name behind them.
Ecclesiasticus 44:8