Teach Yourself programming in ten years-teach programming by yourself in ten years

Source: Internet
Author: User

Author: Peter norvig

Translator: Liu haisu

Original article:/21-days.html

PDF of the translation document can be obtained here: http://download.csdn.net/source/2983778

Why is everything so hasty?
Walk into a bookstore and you will see 7 days to learn Java and a variety of books, such as learning Visual Basic, windows, and the Internet in a few days or hours. I made an advanced search on Amazon:
Pubdate: After 1992 and title: days and
(Title: Learn or title: Teach Yourself) [1]
A total of 248 results were obtained. The first 78 are computer books (79th are the 30-day learning of Bengali). I replaced the "days" in the search with "hours (hours)". The result is an astonishing similarity: Among the 253 books, the first 77 were computer books, the next 78th is "Teach yourself the grammar and style within 24 hours". After 200, 96% were computer books.
It can be seen that people are either in a rush to learn computers, or for some reason, computers are more eager to learn than anything else. No book is about how to learn Beethoven, quantum mechanics, or even dog breeding in a few days. Felleisen and others also pointed out this trend in "how to design a program". They said: "poor programming is very simple and dummies can learn it within 21 days, even if they are all wood!"
Let's analyze what titles such as "learn C ++ in three days" mean:
Learn: in three days, you have no time to complete some large programs, and you cannot learn from the successes and failures. You don't have time to work with an experienced programmer and get familiar with development in the C ++ environment. In short, you have no time to study in depth. Therefore, such books can only give you a superficial understanding rather than a deep understanding. As Alexander Pope said, it is dangerous to know and understand.
C ++: within three days, you may learn some C ++ syntax (provided that you have learned other programming languages), but you cannot learn how to use this language. All in all, if you are a basic programmer, for example, you may be able to use C ++ syntax to program in the basic style, however, you cannot master the true advantages (or disadvantages) of C ++ ). What's the problem? Alan Perlis once said: "If a language cannot affect your programming logic, it is not worth learning ." The only reasonable explanation is that you only need to learn a little bit of C ++ (similar to JavaScript or flash flex) to connect to an existing tool interface for a specific purpose. But in this case, you are not learning how to program, but just learning how to accomplish your goal.
Within three days: unfortunately, as we will show in the next section, this is far from enough.

Teach yourself how to program in ten years
Researchers (bloom (1985), Bryan & Harter (1899), Hayes (1989), simmon & Chase (1973 )) it has been pointed out that it takes about 10 years to reach the proficient level in many fields, this includes chess, music creation, telegraph operations, painting, piano playing, swimming, tennis, and research on neuropsychology or topology. The key is to exercise with your heart: instead of simply repeating over and over again, you need to challenge a goal that is just higher than your current level. Try it, analyze your performance when you do it, and identify all the errors. And then repeat ...... There is no shortcut: Even Mozart-he was a music prodigy when he was 4 years old, but it took 13 years to create world-class music. In another example, although it looks like the beetle band went viral on the eve of the 1964 Ed sulvan show, they actually started to play in small clubs in Liverpool and Hamburg as early as 1957, although they have been favored by the masses for a long time, their first major success was the album released in 1967-Sgt. peppers. Malcolm Gladwell published a study on students at the Berlin Conservatory of Music, which compared the top three students, middle and underachievers and set the exercise time for them:
The three groups started playing at almost the same age-about five years old. In the first few years, everyone practiced almost the same time-two to three hours a week. But by the age of eight, the real gap began to emerge. The best students in the class started to practice more than others: they reached the age of nine, 6 hours a week, 8 hours a week at the age of twelve, 16 hours a week at the age of fourteen, and more. At the age of 20, they spent more than 30 hours practicing each week. At the age of twenty, I practiced for 10,000 hours in the course of the life of an elite player. In contrast, it takes only 8,000 hours for a good student to practice, and only 4,000 hours for a music teacher to practice in the future.

So perhaps 10,000 hours-not 10 years-is a magic number. Samuel Johnson (1709-1784) believes that this may take a longer time: "to achieve excellence in any field, it will take a lifetime of struggle-there will be no lower price to get it." Chaucer (1340-1400) complained that "Life is short, but there are too many skills to learn ." Hippocrates (around 400 BC) is famous for the phrase "Ars longa, vita brevis". The full text is "Ars longa, vita brevis, occasio praeceps, experimentum periculosum, iudicium difficile ", this is expressed in Chinese [2] as "the technology is eternal, the life is short, the opportunity is easy to die, the experiment is fraudulent, and the choice is difficult ". Although the word "ARS" in the Latin word can both represent "art" and "technology ", however, in the original Greek text, the word "Techne" only means "skill" rather than "art ".
The following are my tips for programming success:

I am interested in programming and try to do something from my interest. Be sure that it will continue to bring you fun so that you can devote ten years of effort to it.
Communicate with other programmers and read other programs. This is more important than any book or training.
Programming. The best way to learn is to learn while learning. More academic: "in a specific field, the maximum limit of personal abilities cannot be automatically obtained through long-term experience. However, even experienced individuals can achieve experience improvement through deliberate efforts ." (P. 336) and "the most effective learning requires a clear objective that is difficult to address specific individuals, information feedback, and opportunities for repetition and error correction" (P. 20-21 ). Cognition in practice: Thoughts in daily life, mathematics and culture is an interesting reference book for this viewpoint.
If you want to, invest four years in the University (or continue to invest more time in the graduate school ). This will enable you to get started qualifications for some jobs and give you a deeper understanding of the subject. If you do not like to go to school, you can (you need to make some contributions) obtain similar experience at work. However, reading only is definitely not enough. "Computer Science Education won't make anyone a professional programmer, just as studying paint and paint won't make anyone a professional painter .", Eric raymand, author of the new hacker dictionary, said. One of the best programmers I have ever hired [3] has only a high school degree. He created a lot of great software, owned his own newsgroups, and even made enough money to buy his own nightclub in stock options.
Work with other programmers to complete some projects. Be the best programmer in some projects, and be the worst in others. When you are the best, you will have the opportunity to test your ability to lead a project and inspire others with your vision. When you are the worst, you need to learn what masters do, rather than what they like (because they let you do it for them ).
Take over some projects from other programmers. Understand programs compiled by others. See what you need to understand and try to solve some problems yourself when the original author is absent. Consider how to design your program to make it easier for those who take over the project from you to understand.
Learn at least six programming languages. This includes a language that supports class abstraction (such as Java or C ++), a language that supports function abstraction (such as LISP or ml ), A language that supports syntax abstraction (such as LISP), a language that supports declarative specifications (such as Prolog or C ++ template ), A language that supports coroutine (such as icon or scheme) and a language that supports parallel processing (such as sisal ).
Remember that there is a computer in "computer science ". You need to know how long the computer will take to execute one of your commands and how long it will take to read a word from the memory (with or without missing cache), how long it takes to continuously read characters from the disk, and how long it takes to relocate the disk. (The answer is here)
Participate in the standard formulation of a language. This can be an ansi c ++ Committee project, or you can simply decide whether your code uses two or four spaces as indentation. But in any case, this will allow you to learn other people's language preferences and their preferences, and even you may understand why they have such preferences.
Be rational to get away from the language standardization work as soon as possible.

From the above experience, I doubt how much you can learn from books. Before my first child was born, I read all the guide books, but I still felt confused. 30 months later, when my second child was born, do I still need to go back and review those books? No, this time it was my personal experience. This is obviously more effective for me than the thousands of pages written by experts.
Fred Brooks, in his article "no silver bullet", pointed out three steps for finding a great programmer:
Determine a group of top-level designers as soon as possible.
Assign a business supervisor to be responsible for future development and ensure career planning.
It provides sufficient opportunities to enhance the mutual influence and encouragement of designers.

The premise of doing so is that someone has the qualities that a great designer should possess. All he has to do is to guide others forward. Alan Perlis makes this much more concise: "Everyone can learn sculpture: People like Picasso need to learn how to avoid sculpture. This is also true for Great programmers ."
So, just buy the Java tutorial. Maybe you can learn something from it, but you won't change your life or become a real programmer after 24 hours, 24 days, or even 24 months.

References:
Bloom, Benjamin, "cultivating talents among young people", Ballantine, 1985.
Brooks, Fred, no silver bullet, IEEE Computer, Vol. 20, No. 4, 1987, p. 10-19.
Bryan, W. L. and Harter, N. Study of telegraph language: A habitual harvest, Psychology Review, 1899, 8,345-375
Hayes, John R., completely solving the problem, Lawrence erlbaum, 1989.
Chase, William G. and Simon, Herbert A. Perception of chess, cognitive psychology, 1973, 4, 55-81
Lave, Jean, cognition in practice: Thoughts in daily life, mathematics and culture, Cambridge University Press, 1988.

Answer:
Approximate time of various operations on a typical PC:
Execute typical commands
1/1, 000,000,000 seconds = 1 Nanosecond

Read data from the first-level cache
0.5 nanoseconds

Branch prediction error
5 nanoseconds

Read data from the second-level cache
7 nanoseconds

Mutual Exclusion lock/unlock
25 nanoseconds

Read data from the primary storage
100 nanoseconds

2 KB data is sent in a 1 Gbps network
20,000 nanoseconds

Read 1 mb data from memory
250,000 nanoseconds

Reading data from new disk locations (track searching)
8,000,000 nanoseconds

Read 1 mb data from disk
20,000,000 nanoseconds

Send packets to Europe in the United States and return
150 milliseconds = 150,000,000 nanoseconds

Appendix: language selection
Many people ask me which programming language I should first learn. The answer is not unique, but you need to consider the following:

Make good use of your friends. Every time I was asked, "which operating system should I use, windows, UNIX, or Mac ?" My answer is always: "The one that your friends are using ." What you learn from your friends is far greater than the inherent advantages between operating systems or programming languages. But you should also consider your future friends: If you continue to learn, you will certainly join a programmer community. Does your language have a large-scale community? Or is it on the verge of extinction? Is there enough books, websites, or online forums for you to find answers? Do you like people in those communities?
Keep it simple. Programming languages like C ++ or Java are designed for large-scale teams of programmers who care about their code execution efficiency and experience. Therefore, these programming languages have a complex structure designed for these situations. You are concerned with learning programming, not complex things. So what you need is a language designed to make it easier for new programmers to remember and learn.
Run. Which of the following methods do you prefer to learn how to play the piano? normal interaction mode: When you press the next piano key, you can immediately hear the corresponding notes. Or the "wholesale" mode, you can hear the sound only after you finish the whole piece of music? Obviously, the interactive mode makes learning piano easier, as does programming. Stick to a language of interactive mode and use it.

Given the above principles, we recommend that you first learn Python or scheme. However, your situation may be different, so there are many other good choices. If your age is a single digit, you may prefer Alice or squeak (older learners may also like this ). The point is-you choose and start.

Appendix: books and other resources
People often ask which books or websites can learn. I reiterate that "reading only is definitely not enough", but I recommend the following:
Scheme: the structure and interpretation of computer programs (Abelson and Sussman) may be the best introduction to computer science. As a way to understand computer science, this book also explains how to program. You can read this book's online video lectures or complete online texts. This book is challenging and will eliminate people who have succeeded in other ways.
Scheme: how to design a program (such as felleisen) is an excellent book that describes how to program in an elegant and practical way.
Python: Python programming: Introduction to computer science (zelle) is a good introduction to Python.
Python: some online tutorials on the python website are very practical.
OZ: Computer Programming Concepts, techniques and models (Van Roy and haridi) are considered to be successors of contemporary Abelson and Sussman. This book, through the overall concept of programming, is easier to read and learn, while gaining a wider view than Abelson and Sussman. The book uses a programming language called Oz. Although it is not known to the public, it can be well learned as the basis of other languages.

Author's note:
T. capey pointed out that on the page of the book "solving problems completely" on the Amazon website, the "customers who buy this item also buy" item has appeared in "30 days to learn Bengali" and "Teach yourself the syntax and style within 24 hours". I guess most of them see those books from this article. Thanks to Ross Cohen for helping me with Hippocrates.

Note:
[1] Meaning: the publication date is later than January 1, 1992. The title contains "days" and "Learning" or "self-study ". Back>
[2] the original article is "in English", which translates the previous Latin into English. This article is translated into Chinese. Back>
[3] refers to Jamie zawinski, founder of xemacs and Netscape Navigator. Back>

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.