十年之後,教你怎麼樣編程。

Teach Yourself Programming in Ten Years 

                Peter Norvig 

Why is everyone in such a rush?

爲什麼每個人都那麼匆忙?(急功近利)


不管你走進任何一個書店,你都會發現這字眼,“如何在7天內速成Java”,或者多種多樣的那種,“如何在幾天內或者幾個小時內學會Visual Basic,Windows,Internet”,等等。我在Amazon.com 做了下列調查。 

I did the following power search at Amazon.com:)

  pubdate: after 1992 and title: days and

      (title: learn or title: teach yourself)


並且得到了248個回饋。這首先的是,這有78本都是有關計算機方面的書(第79本就是,30天學會孟加拉語.Learn Bengali in 30 days).我把Hours代替了“days”,並得到了非常相似的結果:253本書,有77本關於計算機的書籍。其次就是“Teach Yourself Grammar and Style in 24 Hours ,排名第78。在銷量前200的書籍之外,基本上96%上的都是計算機書籍。(翻譯排名的挺怪的,反正作者的意思就是,計算機的書比較多 :))


The conclusion is that either people are in a big rush to learn about computers, or that computers are somehow fabulously easier to learn than anything else. There are no books on how to learn Beethoven, or Quantum Physics, or even Dog Grooming in a few days. Felleisen et al. give a nod to this trend in their book How to Design Programs, when they say "Bad programming is easy. Idiots can learn it in 21 days, even if they are dummies.

這個結論說明了,每一個人都那麼瘋狂的去學習計算機,又或者是,相對與其他專業都那麼好學一樣。在這幾年,對於那些怎樣去學習貝多芬或者量子物理學,甚至怎樣給狗打扮,都是沒有相關的書籍的。Fellesisen et al.在How to Design Programs 這本書裏面,非常同意這樣的看法,他說,“Bad Programming”纔是很簡單的。

Let's analyze what a title like Learn C++ in Three Days could mean:

讓我們來分析一下,有這樣的title“Learn C++ in Three Days ”,上面說:

  • Learn: In 3 days you won't have time to write several significant programs, and learn from your successes and failures with them. You won't have time to work with an experienced programmer and understand what it is like to live in a C++ environment. In short, you won't have time to learn much. So the book can only be talking about a superficial familiarity, not a deep understanding. As Alexander Pope said, a little learning is a dangerous thing.
  • 學習:在3天內,你不會寫出幾個非常著名的項目,但是,你可以在成功和失敗上面學到一些東西。你不會有時間和非常有經驗的工程師一起工作,並且也不理解C++的環境。短期,你不會充分的深刻的理解他們。所以,這些書籍只會講解非常淺顯的內容,而不是特別深的。Alexander Pope 說,一點點學習是一個非常危險的事情。
  • C++: In 3 days you might be able to learn some of the syntax of C++ (if you already know another language), but you couldn't learn much about how to use the language. In short, if you were, say, a Basic programmer, you could learn to write programs in the style of Basic using C++ syntax, but you couldn't learn what C++ is actually good (and bad) for. So what's the point? Alan Perlis once said: "A language that doesn't affect the way you think about programming, is not worth knowing". One possible point is that you have to learn a tiny bit of C++ (or more likely, something like JavaScript or Flash's Flex) because you need to interface with an existing tool to accomplish a specific task. But then you're not learning how to program; you're learning to accomplish that task.
  • C++:在3天內,你可能會學習一些C++的語法(如果你一直學過其他相似的語言),但是你可能會短期內熟練掌握這種語言的使用。短期,作爲一個初級的編程人員,你可能會寫出一個C++的程序,但是你並不知道這個C++是否是高效的(or not)。所以,重點是?Alan Perlis  曾經說過:“一個語言並不能影響你思考程序的方式,而在於去想怎麼完成它。”一個可能點就是,你會去學習小字節的C++【tiny bit of C++】(更多的可能,或者是JavaScript 或者 Flash's Flex),因爲你需要去用現有的工具去完成這樣的接口去完成一個制定的任務。到那個時候,你學的其實不是怎樣去編程,而是去學習去完成那項任務。
  • in Three Days: Unfortunately, this is not enough, as the next section shows.
  • in Three Days:不幸的事,這些還不夠,下一下章節會有涉及。

Teach Yourself Programming in Ten Years

教你怎樣在10年會編程

Researchers (Bloom (1985)Bryan & Harter (1899)Hayes (1989)Simmon & Chase (1973)) have shown it takes about ten years to develop expertise in any of a wide variety of areas, including chess playing, music composition, telegraph operation, painting, piano playing, swimming, tennis, and research in neuropsychology and topology. The key is deliberative practice: not just doing it again and again, but challenging yourself with a task that is just beyond your current ability, trying it, analyzing your performance while and after doing it, and correcting any mistakes. Then repeat. And repeat again. There appear to be no real shortcuts: even Mozart, who was a musical prodigy at age 4, took 13 more years before he began to produce world-class music. In another genre, the Beatles seemed to burst onto the scene with a string of #1 hits and an appearance on the Ed Sullivan show in 1964. But they had been playing small clubs in Liverpool and Hamburg since 1957, and while they had mass appeal early on, their first great critical success, Sgt. Peppers, was released in 1967. Malcolm Gladwell reports that a study of students at the Berlin Academy of Music compared the top, middle, and bottom third of the class and asked them how much they had practiced:

在這篇(Bloom (1985)Bryan & Harter (1899)Hayes (1989)Simmon & Chase (1973)) 文章裏面說,在任何領域做到專業水平,都需要花費10年時間,其中都包括下棋,音樂會,電報操作,打印,演奏鋼琴,游泳,打網球,和研究神經心理學和拓撲學。這些測試的關鍵在於:不只是一次又一次這樣做。在你現有的能力上面挑戰自己,嘗試他,挑戰它,分析現有自己的表現,之後糾正自己的錯誤,之後,在一直不斷的重複,嘗試。這很顯然是,永遠沒有捷徑!即使莫扎特,在4歲被認爲是音樂神童,也花了超過13年的時間才創造出一個世界級的音樂。


So You Want to be a Programmer

所以,你想要成爲一個編程大家

Here's my recipe for programming success:

這有我幾點成功的建議:

  • Get interested in programming, and do some because it is fun. Make sure that it keeps being enough fun so that you will be willing to put in your ten years/10,000 hours.
  • 要對編程很有興趣,並且做他是一件很開心的事情。保證能在10年中會有10,000個小時保持着興趣並且推動你成長。
  • Program. The best kind of learning is learning by doing. To put it more technically, "the maximal level of performance for individuals in a given domain is not attained automatically as a function of extended experience, but the level of performance can be increased even by highly experienced individuals as a result of deliberate efforts to improve." (p. 366) and "the most effective learning requires a well-defined task with an appropriate difficulty level for the particular individual, informative feedback, and opportunities for repetition and corrections of errors." (p. 20-21) The bookCognition in Practice: Mind, Mathematics, and Culture in Everyday Life is an interesting reference for this viewpoint.
  • 編程。最好的方法就是,做着學着。learning by doing. 說的更技術一點,“作爲拓展體驗功能,單獨給定域的最大等級的性能是不會自動增加的,但是,對於性能等級提升是對於有經驗的的獨立人來說的。” (p. 366) 並且“最高的有效率的學習是需要有well-defined ,有合適難度的任務。書《Cognition in Practice: Mind, Mathematics, and Culture in Everyday Life 》是一本很有意思的書籍,正好也支持了這個觀點。
  • Talk with other programmers; read other programs. This is more important than any book or training course.
  • 和其他工程師一起討論,閱讀其工程項目代碼。這比任何一本書籍或者培訓課程都要重要。
  • If you want, put in four years at a college (or more at a graduate school). This will give you access to some jobs that require credentials, and it will give you a deeper understanding of the field, but if you don't enjoy school, you can (with some dedication) get similar experience on your own or on the job. In any case, book learning alone won't be enough. "Computer science education cannot make anybody an expert programmer any more than studying brushes and pigment can make somebody an expert painter" says Eric Raymond, author of The New Hacker's Dictionary. One of the best programmers I ever hired had only a High School degree; he's produced a lot of great software, has his own news group, and made enough in stock options to buy his own nightclub.
  • 如果你想把你4年的時間都花費在大學(或者畢業學校)。這裏會給你一些相關的工作認證的證書,並且會加深你對相關專業領域的理解。但是,如果你不喜歡在學校,你可以(和一些特殊貢獻的)有你工作上有相似經驗的人一起。在很多方面上,書籍上的內容往往是不夠的。”計算機科學教育部門也不能讓所有的人成爲專家,不會比那些研究刷子,畫筆的人更成爲畫筆專家。Eric Raymond說。一位很偉大的程序大家只有高中文憑。但他製作了很多偉大的軟件,他有自己的news group,他也有足夠的股票去買屬於自己的nightclub.
  • Work on projects with other programmers. Be the best programmer on some projects; be the worst on some others. When you're the best, you get to test your abilities to lead a project, and to inspire others with your vision. When you're the worst, you learn what the masters do, and you learn what they don't like to do (because they make you do it for them).
  • 和其他編程人員一起工作在一個項目中。在一些項目中做到最好的程序人員。在其他方面做的最糟糕。當你做到最好的時候,你可以檢測你領導項目的能力,也會鼓舞人心。當你做的最糟糕的時候,你可以學到其他主管是怎麼管理的,你可以學到什麼是他們不喜歡做的(因爲他們會讓你做)
  • Work on projects after other programmers. Understand a program written by someone else. See what it takes to understand and fix it when the original programmers are not around. Think about how to design your programs to make it easier for those who will maintain them after you.
  • 在其他的編程人員工作之後。瞭解整個項目。去看看什麼還需要去了解,並且在原來工程項目中沒有修復的東西。想想怎樣設計出一個好的程序,會讓事情變得更簡單。
  • Learn at least a half dozen programming languages. Include one language that supports class abstractions (like Java or C++), one that supports functional abstraction (like Lisp or ML), one that supports syntactic abstraction (like Lisp), one that supports declarative specifications (like Prolog or C++ templates), one that supports coroutines (like Icon or Scheme), and one that supports parallelism (like Sisal).
  • 學習至少一門冷門的編程語言。那些可以包括一種語言支持一種類屬性(像Java 或者C++),那種可以支持多個函數屬性的(像Lisp 或者ML),那種可以支持同步屬性(像Lisp),一種可以支持聲明變量的(像Prolog 或者C++模板),一種可以支持協成(像Icon 或者 Schema),一直支持並行的(像Sisal)
  • Remember that there is a "computer" in "computer science". Know how long it takes your computer to execute an instruction, fetch a word from memory (with and without a cache miss), read consecutive words from disk, and seek to a new location on disk. (Answers here.)
  • 記住“計算機”在“計算機科學”裏面。知道你的計算機執行一條指令要花費多長時間去從內存中讀取一個文字(包括和不包括沒有cache命中),從磁盤連續的讀取出來,自動磁盤尋道。
  • Get involved in a language standardization effort. It could be the ANSI C++ committee, or it could be deciding if your local coding style will have 2 or 4 space indentation levels. Either way, you learn about what other people like in a language, how deeply they feel so, and perhaps even a little about why they feel so.
  • 參與一項語言標準化工作。像ANSI C++委員會,或者可能確定你本地編碼是2 或者4個空間的縮進。任何一種,你都能學到其他人喜歡什麼語言,他們喜歡的程度,大概也能纔到爲什麼他們會有這樣的感覺。
  • Have the good sense to get off the language standardization effort as quickly as possible.
  • 有一個非常好的第六感。要儘快逃脫這樣語言定義的這樣的工作,越快愈好!

With all that in mind, its questionable how far you can get just by book learning. Before my first child was born, I read all theHow To books, and still felt like a clueless novice. 30 Months later, when my second child was due, did I go back to the books for a refresher? No. Instead, I relied on my personal experience, which turned out to be far more useful and reassuring to me than the thousands of pages written by experts.

把那些都記載腦子裏面,但是你也會質疑你從書籍中學到的東西。在我第一個小孩出生之前,我讀完所有的”HOW TO “books,仍然感覺是個手足無措的新手,30個月之後,當我第二個小孩出生,我又重讀了一邊?No,不是。我完全憑着自己的經驗,直覺完成了,那樣的效率比專家寫上1000頁的文章要強的很多。

Fred Brooks, in his essay No Silver Bullet identified a three-part plan for finding great software designers:

Fred Brooks,在他的文章中”No Silver Bullet“ 寫到這三個計劃。爲了找到更好的軟件設計師:


  1. Systematically identify top designers as early as possible.
  2. Assign a career mentor to be responsible for the development of the prospect and carefully keep a career file.
  3. Provide opportunities for growing designers to interact and stimulate each other.
  4. 系統的去認證頂級的設計師,越早越好
  5. 分配一個事業部負責那些有潛力的對象,並且小心的保持這他們的職業生涯
  6. 提供一個設計師一個相互交流,相互認識的機會


因此,繼續去購買Java / Ruby/ Javascript / PHP的書,你可能會得到一些使用了。 但你不會改變你的生活,或者你真正的整體專業知識,在24小時內,幾天,甚至幾周程序員。 如何努力工作,不斷提高超過24個月呢? 好了,現在你開始得到的地方...



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章