编程之道英文版(tao of programming)

3星(超过75%的资源)
所需积分/C币:16 2013-06-13 13:42:42 96KB PDF
8
收藏 收藏
举报

编程之道英文版,tao of programming。
Who can tell the secrets of their hearts and minds? The answer exists only in Tao Grand Master Turing once dreamed that he was a machine. When he awoke he exclaimed I dont know whether I am Turing dreaming that I am a machine, or a machine dreaming that I am turing a programmer from a very large computer company went to a software conference and then returned to report to his manager, sayil What sort of programmers work for other companies? They behaved badly and were unconcerned with appearances. Their hair was long and unkempt and their clothes were wrinkled and old. They crashed our hospitality suite and they made rude noises during my presentation The manager said: i should have never sent you to the conference. Those programmers live beyond the physical world They consider life absurd, an accidental coincidence. They come and go without knowing limitations. Without a care, they live only for their programs. Why should they bother with socia conventions? They are alive within the Tao A novice asked the Master: Here is a programmer that never designs, documents or tests his programs. Yet all who know him consider him one of the best programmers in the world. Why is this? The Master replies: That programmer has mastered the Tao. He has gone beyond the need for design; he does not become angry when the system crashes, but accepts the universe without concern he has gone beyond the need for documentation; he no longer cares if anyone else sees his code. He has gone beyond the need for testing; each of his programs are perfect within themselves, serene and elegant, their purpose self-evident. Truly, he has entered the mystery of tao. BOOK 3- DESIGN Thus spake the master programmer When the program is being tested, it is too late to make design changes There once was a man who went to a computer trade show. Each day as he entered, the man told the guard at the e door I am a great thief, renowned for my feats of shoplifting. Be forewarned, for this trade show shall not escape unplundered This speech disturbed the guard greatly, because there were millions of dollars of computer equipment inside,so he watched the man carefully. but the man merely wandered from booth to booth, humming quietly to himself When the man left, the guard took him aside and searched his clothes, but nothing was to be found On the next day of the trade show, the man returned and chided the guard saying: I escaped with a vast boot yesterday, but today will be even better. So the guard watched him ever more closely but to no avail On the final da ay of the trade show, the guard coul restrain his curiosity no longer. Sir Thief, "he said,I am so perplexed, I cannot live in peace. Please enlighten me. What is it that you are stealing The man smiled. i am stealing ideas, he said There once was a master programmer who wrote unstructured programs. A novice programmer, seeking to imitate him, also began to write unstructured programs When the novice asked the master to evaluate his progress, the master criticized him for writing unstructured programs, saying, What is appropriate for the master is not appropriate for the novice. You must understand the tao before transcending structure There was once a programmer who was attached to the court of the warlord of wu. The warlord asked the programmer: Which is easier to design: an accounting package or an operating system? An operating system, replied the programmer The warlord uttered an exclamation of disbelief.Surel y an accounting package is trivial next to the complexity of an operating system he said Not so, said the programmer, when designing an accounting package, the programmer operates as a mediator between people ha ving different ideas: how it must operate, how its reports must appear, and how it must conform to the tax laws. By contrast, an operating system is not limited by outside appearances. When designing an operating system, the programmer seeks the simplest harmony between machine and ideas. This is why an operating system is easier to design The warlord of Wu nodded and smiled. That is all good and well, but which is easier to debug? The programmer made no reply. A manager went to the master programmer and showed him the requirements document for a new application The manager asked the master: How long will it take design this system if I assign five programmers to it? e to It will take one vear, said the master promptly But we need this system immediately or even sooner How long will it take if I assign ten programmers to it The master programmer frowned. In that case, it will take two years And what if I assign a hundred programmers to it? The master programmer shrugged. Then the design will never be completed, he said BOOK 4 Thus spake the master programmer: A well-written program is its own heaven; a poorly written program is its own hell. 4.1 a program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much neither needless loops nor useless variables, neither lack of structure nor overw helming rigidity a program should follow the Law of Least Astonishment. What is this law? It is simply that the program should always respond to the user in the way that astonishes him least A program, no matter how complex, should act as a single unit. The program should be directed by the logic within rather than by outward appearances If the program fails in these requirements it will be in a state of disorder and confusion. The only way to correct this is to rewrite the program 4.2 a novice asked the master: I have a program that sometime runs and sometimes aborts. i have followed the rules of programming, yet I am totally baffled. What is the reason for this? The master replied: You are confused because you do not understand Tao. Only a fool expects rational behavior from his fellow humans. Why do you expect it from a machine that humans have constructed? Computers simulate determinism; only tao is perfect The rules of programming are transitory only Tao is eternal. Therefore you must contemplate tao before you receive enlightenment But how will i know when nave receive enlightenment?" asked the novice Your program will then run correctly, "replied the master A master was explaining the nature of Tao of to one of his novices. The tao is embodied in all software regardless of how insignificant, "said the master Is the fao in a hand-held calculator? asked the novice It is, "came the reply. Is the tao in a video game? continued the novice It is even in a video game "said the master And is the Tao in the dos for a personal computer? The master coughed and shifted his position slightly The lesson is over for today, he said Prince Wangs programmer was coding software. His fingers danced upon the keyboard. The pr compiled without an error message, and the program ran like a gentle wind Excellent! "the Prince exclaimed, Your technique is Technique? said the programmer turning from his terminal, What I follow is Tao- beyond all techniques When i first began to program I would see before me the whole problem in one mass. After three years I no longer saw this mass. Instead, i used subroutines. But now i see nothing. My whole being exists in a formless void. M senses are idle. My spirit, free to work without plan follows its own instinct. In short, m y program writes itself. True, sometimes there are difficult problems. I see them coming, I slow down,I watch silently. Then I change a single line of code and the difficulties vanish like puffs of idle smoke. I then compile the program. I sit still and let the joy of the work fill my being. I close my eyes for a moment and then log off Prince Wang said, Would that all of my programmers were as wise BOOK 5- MAINTENANCE Thus spake the master programmer Though a program be but three lines long, someday it will have to be maintained A well-used door needs no oil on its hinges A swift-flowing stream does not grow stagnant Neither sound nor thoughts can travel through a vacuum Software rots if not used These are great mysteries 5.2 A manager asked a programmer how long it would take him to finish the program on which he was working. It will be finished tomorrow the programmer promptly replied I think y g unrealistiC e manager, Truthfully, how long will it take? The programmer thought for a moment. I have some features that i wish to add. This will take at least two weeks, he finally sa Even that is too much to expect, insisted the manager, I will be satisfied if you simply tell me when the program is complete The programmer agreed to this everal years later, the manager retired. On the way to his retirement luncheon, he discovered the programmer asleep at his terminal. He had been programming all ht A novice programmer was once assigned to code a simple financial package The novice worked furiously for many days, but when his master reviewed his program, he discovered that it contained a screen editor, a set of generalized graphics routines, an artificial intelligence interface, but not the slightest mention of anything financial When the master asked about this, the novice became indignant. Don 't be so impatient, he said, Ill put in the financial stuff eventually. Does a good farmer neglect a crop he has planted? Does a good teacher overlook even the most humble student? Does a good father allow a single child to starve? Does a good programmer refuse to maintain his code? BOOK 6- MANAGEMENT Thus spake the master programmer: Let the programmers be many and the managers few then all will be productive. 6 When managers hold endless meetings, the programmers write games. When accountants talk of quarterly profits, the development budget is about to be cut. When senior scientists talk blue sky, the clouds are about to roll in Truly, this is not the Tao of Programming When managers make commitments, game programs are ignored. When accountants make long-range plans, harmony and order are about to be restored when senior scientists address the problems at hand, the problems will soon be solved Truly, this is the Tao of Programming Why are programmers non-productive? Because their time is wasted in meetings Why are programmers rebellious? Because the management interferes too much Why are the programmers resigning one by one Because they are burnt out Having worked for poor management, they no longer value their jobs A manager was about to be fired, but a programmer who worked for him invented a new program that became popular and sold well. As a result, the manager retained his job The manager tried to give the programmer a bonus, but the programmer refused it, saying I wrote the program because I thought it was an interesting concept, and thus I expect no reward The manager upon hearing this remarked, This programmer, though he holds a position of small esteem, understands well the proper duty of an employee. Let us promote him to the exalted position of management consultant! But when told this, the programmer once more refused, saying, I exist so that I can program. If I were promoted, I would do nothing but waste everyone's time Can I go now? I have a program that I'm working on A manager went to his programmers and told them:As regards to your work hours: you are going to have to come in at nine in the morning and leave at five in the afternoon. At this, all of them became angry and several resigned on the spot So the manager said: All right, in that case you may set your own working hours, as long as you finish your projects on schedule. "The programmers, now satisfied began to come in at noon and work to the wee hours of the morning BOOK Z- CORPORATE WISDOM Thus spake the master programmer You can demonstrate a program for a corporate executive but you can't make him computer literate 7.1 A novice asked the master: In the east there is a great tree-structure that men call Corporate Headquarters. It is bloated out of shape with vice presidents and accountants. It issues a multitude of memos, each saying Go, Hence! or Go, Hither and nobody knows what is meant. Every year new names are put onto the branches, but all to no avail how can such an unnatural entity be? The master replied: You perceive this immense structure and are disturbed that it has no rational purpose. Can you not take amusement from its endless gyrations? Do you not enjoy the untroubled ease of programming beneath its sheltering branches? Why are you bothered uselessness?”" 7,2 In the east there is a shark which is larger than all other fish. It changes into a bird whose wings are like clouds filling the sky. When this bird moves across the land, it brings a message from Corporate headquarters. This message it drops into the midst of the programmers, like

...展开详情
试读 13P 编程之道英文版(tao of programming)
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
hellokevincheng 垃圾东西,那是什么书,乱七八糟
2019-11-13
回复
EFCHolla 很好的书,找了好久了
2015-06-17
回复
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
上传资源赚钱or赚积分
最新推荐
编程之道英文版(tao of programming) 16积分/C币 立即下载
1/13
编程之道英文版(tao of programming)第1页
编程之道英文版(tao of programming)第2页
编程之道英文版(tao of programming)第3页

试读结束, 可继续读1页

16积分/C币 立即下载