A copy of the code: ten Years of programming (Teach yourself programming in ten years)

Source: Internet
Author: User

Original: Teach yourself programming in Ten years
Guo Xiaogang translation: Guo Xiaogang ([email protected])
Last revision date:2004-3-19
A new translation link was added in 2005-01-12.

The Chinese translation has been licensed by Peter Norvig.


Why is everyone impatient?


Walk into any bookstore and you'll see the Teach yourself Java in 7 days (7-day Java taught) next to a long line of similar books with no end of sight to teach you about visual Basic, Windows, the Internet, etc. It only takes a few days or even hours. I made the following on the Amazon.comSearch:
     Pubdate:after 1992 and Title:days and (Title:learn or title:teach yourself)
(Published Date: 1992 years later and title: Days and (title: Learning or Title: taught))
I got a total of 248 search results. The first 78 are computer books (the 79th is thelearn Bengali in", 30 days to learn Bengali). I replaced the keyword "days" with "hours", and got very similar results: this time there are 253 books, the first 77 is a computer book, the 78th is theTeach yourself Grammar and Style in Hours(24 Hours of learning grammar and style). Of the first 200 books, 96% are computer books.
The conclusion is that either people are very eager to learn the computer, or simply do not know why the computer is surprisingly simple and easier to learn than anything else. No book is going to teach people to admire Beethoven or quantum physics in a few days, or even how to dress a dog.
Let's look at some of theLearn Pascal in three days"(3 days to learn Pascal) what is the meaning of this topic:

    • Learn: in 3 days, you don't have enough time to write meaningful programs and learn from their failures and successes. You don't have enough time to work with some experienced programmers, and you don't know what it's like to be in that environment. In short, there is not enough time for you to learn many things. So these books are all about superficial mastery, not deep understanding. As Alexander Pope (English poet, writer, 1688-1744) said, smattering is dangerous (a little learning is a dangerous thing).
    • Pascal: in 3 days you can learn the grammar of Pascal (if you already have a similar language), but you can't learn how to use these grammars. In short, if you are, say, a basic programmer, you can learn to write basic-style programs in Pascal's grammar, but you can't learn the real virtues (and weaknesses) of Pascal. Where's the key? Alan Perlis, the first president of ACM, the Turing Prize winner, 1922-1990, once said: "If a language doesn't affect your idea of programming, it's not worth learning." Another point of view is that sometimes you have to learn some of the fur of Pascal (more likely, like Visual Basic and JavaScript) because you need to touch existing tools to accomplish specific tasks. But at this point you are not learning how to program, you are learning how to complete the task.
    • 3 days: Unfortunately, this is not enough, as the next section says.




10 Programming taught


Research by some researchers (Hayes,Bloom) has shown that in many areas it takes about 10 years to develop professional skills, including chess, composition, painting, piano, swimming, tennis, and neuropsychological and topological studies. There doesn't seem to be a real shortcut: Even Mozart, he showed a musical genius at the age of 4 and spent more than 13 years before he wrote world-class music. The Beatles, who looked at another type of music, appeared to be suddenly take hold in the 1964 Ed Sullivan Program. But in fact they have been performing since 1957, and even if they have shown great attraction early, their first real success as SGT peppers will not be released until 1967. Samuel Johnson says 10 is not enough: "Excellence in any field can only be achieved through a lifetime of effort, and a lower price will not change." (Excellence in any department can is attained only by the labor of a lifetime; It is not to being purchased at a lesser price. Chaucer (Chaucer, British poet, 1340-1400) also complained: "Life is so short, the mastery of skills is so long." (The Lyf so short, the craft so long to Lerne.)
Here is my recipe for success in the programming profession:

  • Interested in programming, because it's fun to program. Make sure that you always have enough fun so that you can devote 10 years of your time.
  • Talk to other programmers, read other programs. This is more important than any book or training course.
  • Programming. The best learning is learning from the practice . In a more technical language, "the highest level of individual performance in a given field is not automatically obtained as a result of long experience, but even very experienced individuals can improve their performance by deliberate effort." (p. 366), and "the most effective learning requires the creation of appropriate tasks for specific individuals, meaningful feedback, and the opportunity to repeat and correct errors." "(p. 20-21) "cognition in Practice:mind, mathematics, and Culture in EverydayLife" (Cognition in Practice: mind, The culture of mathematics and everyday life) is an interesting reference book on this point of view.
  • If you want, spend 4 years in college (or spend a few more years in graduate school). This gives you the ability to get started with some work and gives you a deeper understanding of the area, but if you don't like to go to school, you'll get similar experience at work. In any case, it is not enough to learn from books alone. "Computer science education will not make anyone an expert programmer, just as research brushes and paints will not make anyone an expert painter," says Eric Raymond, the author of the new Hacker's Dictionary, the novel Hacker Dictionary. One of the best programmers I ever hired had a high school degree, but he created great software , even a newsgroup that talked about himself, and stock options allowed him to reach the level of wealth I was unable to achieve (saying Jamie Zawinski, author of XEmacs and Netscape Navigator).
  • Work with other programmers to complete the project. Be the best programmer in some projects, and one of the worst in some other projects. When you are the best programmer, you have to test your ability to lead the project and inspire others through your insights. When you're the worst, you learn what the pros are doing and what they don't like (because they ask you to help them do that).
  • Take over other programmers to complete the project. Understand the program written by others. See what it takes to understand and modify the program without the initial program clerk present. Think about how to design your program to make it easier for others to take over and maintain your program.
  • Learn at least half a dozen programming languages. Includes a language that supports abstract class abstraction (such as Java or C + +), a language that supports function abstraction (functional abstraction), such as Lisp or ML, and one that supports syntactic abstraction (syntactic Abstraction) language (such as Lisp), a language that supports descriptive protocols (declarative specification), such as Prolog or C + + templates, A language that supports the coroutine (such as icon or scheme), and a language (such as sisal) that supports parallel processing (parallelism).
  • Remember that the phrase "computer science" contains the word "Computers". Learn how long it takes your computer to execute an instruction, how long it takes a word from memory (including cache hits and misses), how long it takes to read contiguous data from disk, and how long it will take to navigate to a new location on disk. ( here's the answer.) )
  • Try to participate in a language standardization effort. It can be an ANSI C + + committee, or you can decide whether your team's coding style is indented with 2 spaces or 4. Either way, you can learn exactly what people like in this language, how much they like it, and maybe even a little bit about why they feel that way.
  • Have good judgment as soon as possible from the language standardization work.


With these thoughts in mind, I doubt how much I can learn from books. Before my first child was born, I read all the "How ..." books, but still felt that I was a great loss novice. 30 months later, when my second child was born, did I pick up the books and revise them again? No. Instead, I relied on my own experience, which turned out to be more useful and reliable than the thousands of pages that the experts wrote.
Fred Brooks The three-step plan for discovering outstanding software Designers in his short essay, "No Silver Bullets" (No Sliver Bullets):

    1. Identify the best group of designers early and systematically.
    2. Appoint a career mentor who is responsible for the development of potential targets and carefully helps him maintain his career history.
    3. Let the growing designers have the opportunity to influence each other and inspire each other.


This actually assumes that some people themselves have the necessary potential to become outstanding designers, to do is to guide them forward. Alan Perlis More concise: "Everyone can be taught how to sculpture, but for Michelangelo, can teach him how can not go to sculpture." Great programmers, too. "
So go buy those Java books, and you'll probably find something useful. But your life, or your real expertise as a programmer, does not really change in 24 hours, 24 days, or even 24 months.


Reference documents


Bloom, Benjamin (ed.) Developing Talentin young People, Ballantine, 1985.
Brooks, Fred, no Silver bullets, IEEE Computer, vol. 4, 1987, p. 10-19.
Hayes, John R., complete problem Solver, Lawrence Erlbaum, 1989.
Lave, Jean, cognition in Practice:mind, mathematics, and Culture in everydaylife, Cambridge University Press, 1 988.


Answer


The timing of various operations was completed in the summer of 2001 on a typical 1GHz PC:
Executes a single instruction 1 nanoseconds = (1/1,000,000,000) seconds
Take a Word 2 nanoseconds from the L1 cache
Take a word 10 nanoseconds from main memory
Take a word 200 nanoseconds from a contiguous disk location
Take a word (addressing) 8,000,000 nanoseconds = 8 milliseconds from the new disk location


Footnote


T. capey points out that Amazon above the "completeproblem Solver" page, "Teach yourself Bengali in" and "Teach yourself Grammar and S Tyle "is listed in the" purchase of this book customers also bought the following books "column. I guess most of the people who looked at both books came from me.


Translation


Thanks to the following authors for translating this article into other languages:
Japanese (Yasushi Murakawa), Chinese (Guo Xiaogang), Traditional Chinese (Jason Chen), Spanish (Carlos Rueda), German (Stefan Ram), French (P. E. Allary), Turkish (Ça?? L Ulu?ahin).

A copy of the code: ten Years of programming (Teach yourself programming in ten years)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.