Teach yourself programming in Ten years

Source: Internet
Author: User
Tags php book

Teach yourself programming in Ten Yearspeter Norvig
Why are everyone in such a rush? Walk into any bookstore, and you'll see how toTeach yourself Java in HoursAlongside endless variations offering to teach C, SQL, Ruby, algorithms, and so on with a few days or hours. The Amazon advanced search for [Title:teach, yourself, hours, since:2000 and found such books. Of the top ten, Nine was programming books (the other was about bookkeeping). Similar results come from replacing ' teach yourself ' with ' learn ' or ' hours ' with ' days '.

The conclusion is that either people be in a big rush to learn on programming, or that programming is somehow fabulous   Ly easier to learn than anything else. Felleisen et al give a nod to this trend in their book What to Design Programswhen they say ' bad progr Amming is easy. Idiots can learn it in days, even if they is dummies. " The Abtruse Goose comic also had their take.

Let's analyze what's a title like Teach yourself C + + in Hours could mean:

  • Teach yourself: in hours you won ' t has time to write several significant programs, and learn from Your successes and failures with them.  you won ' t has time to work with an experienced programmer and understand WH At it's like to live in a C + + environment.  in short, you won ' t has time to learn much.  so the book can only Be talking on a superficial familiarity, not a deep understanding. As Alexander Pope said, a little learning is a dangerous thing.

     

  • C + +: In hours might is able to learn some of the syntax of C + + (if you already know another language), but you couldn ' t  Learn much the language. In short, if you were, say, a Basic programmer, you could learn to write programs in the style of the Basic using C + + syntax,  But the 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 the-I think about programming, was not worth knowing". One possible point is so you had to learn a tiny bit of C + + (or more likely, something like JavaScript or processing) b Ecause a accomplish task for need to interface with an existing tool to specific. But then your ' re not learning what to program; You ' re learning to accomplish the that task.

  • In Hours: Unfortunately, this was not enough, and as the next section shows.
Teach yourself programming in Ten years

Researchers (Bloom (1985), Bryan & Harter (1899), Hayes (1989), Simmon & Chase (1973)) has shown it takes about t En years to develop expertise in any of a wide variety of areas, including chess playing, music composition, Telegraph Ope  Ration, painting, piano playing, swimming, tennis, and in neuropsychology and topology. The key isDeliberativePractice:not just doing it again and again, but challenging yourself with a task that's 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 is no real shortcuts:even Mozart, who is a musical prodigy at age 4, took + 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 have popularized the idea, although he concentrates on the hours rather than.

It is the-hours, not-years, is the magic number. Or It might is some other metric; Henri Cartier-Bresson (1908-2004) said "Your first photographs is Your worst." True Expertise Lifetime:samuel Johnson (1709-1784) said "excellence in any department can attained The labor of a lifetime;  It is not to being purchased at a lesser price. " and Chaucer (1340-1400) complained "The Lyf so short, the craft so long to Lerne." Hippocrates (c. 400BC) is known for the excerpt "Ars Longa, Vita brevis", which are part of the longer quotation "Ars longa , Vita brevis, Occasio praeceps, experimentum periculosum, Iudicium difficile ", which in 中文版 renders as" life was short , [the] craft long, opportunity fleeting, experiment treacherous, judgment difficult. " Of course, no single number can is the final answer:it doesn ' t seem reasonable to assume so each of programming, chess Playing, checkers playing, and music playing could all require exactly the same amount of time to master, nor so all PEO Ple'll take exactly the same amount of time.

So you want to be a Programmer

Here's my recipe for programming success:

  • Get interested in programming, and does some because it is fun. Make sure this it keeps being enough fun so then you'll be willing to put in your ten years/10,000 hours.

  • Program.  The best kind of learning are learning by doing. To put it more technically, "the maximal level of performance for individuals in a given domain was not attained automatica Lly as a function of extended experience, but the level of performance can is increased even by highly experienced Individ Uals 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 partic Ular individual, informative feedback, and opportunities for repetition and corrections of errors. " (p. 20-21) The book Cognition in Practice:mind, mathematics, and Culture in everyday life are an interesting re Ference for this viewpoint.

  • 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 would give you Access to some jobs that require credentials, and it'll give you a deeper understanding of the field, but if you don ' t E NJoy School, you can (with some dedication) get similar experience on your own or on the job. In any case, book learning alone won ' is enough. "Computer science education cannot make anybody a expert programmer any further than studying brushes and pigment can make s Omebody 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, had his own news group, and made enough in the stock options to buy his own nightclub.< p> 

  • Work on projects with other programmers. Being the best programmer on some projects;  Be the worst on some others.  When your ' re the best, you get to test your abilities to leads a project, and to inspire others with your vision. When you're the worst, you learn what the Masters does, and you learn what they don ' t like to do (because they make you do I T 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 is not around. Think about-to-design your programs to make it easier-those who'll maintain them after you.

  • Learn at least a half dozen programming languages. Include one language that emphasizes class abstractions (like Java or C + +), one that emphasizes functional abstraction (Li Ke lisp or ML or Haskell), one, supports syntactic abstraction (like Lisp), one, supports declarative specificatio NS (like Prolog or C + + templates), and one that is emphasizes parallelism (like Clojure or Go).

  • Remember that there was 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.)

  • Get involved in a language standardization effort. It could be the ANSI C + + committee, or it could be deciding if your local coding style would have 2 or 4 space indentation  Levels. Either-Learn, what's the people like in a language, how deeply they feel so, and perhaps even a little about Why they feel.

  • The good sense to get off The language standardization effort as quickly as possible.

With all, it questionable how far can get just by book learning.  Before my first child is born, I read all the what to books, and still felt like a clueless novice. Months later, when my second is due, did I go and the books for a refresher?  No. Instead, I relied on my personal experience, which turned off to being far more useful and reassuring to me than the Thousan DS of pages written by experts.

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

    1. Systematically identify top designers as early as possible.

    2. Assign a career mentor to being responsible for the development of the prospect and carefully keep a career file.

    3. Provide opportunities for growing designers to interact and stimulate.

This assumes, some people already has the qualities necessary for being a great designer; the job was to properly c Oax them along.  Alan Perlis put it more succinctly: "Everyone can is taught to Sculpt:michelangelo would has had t o being taught how does not. So it's with the great programmers ".  Perlis are saying that the greats has some internal quality that transcends th Eir training.  But where does the quality come from?  are it innate?  Or do they develop it through DILIGENC e?  as Auguste Gusteau (the fictional chef in Ratatouille ) puts it, "Anyone can cook, and only the fearless can be great. "   I think of it more as willingness to devote a large portion of one's life to deliberative practice.  but maybe Fearless is a-to-summarize that. Or, as Gusteau ' s critic, Anton Ego, says: "Not everyone can become a great artist, but a great artist can come from anywhe Re. "

So go ahead and buy this java/ruby/javascript/php book;  You'll probably get some use out of it.   But you won ' t-your life, or your real overall expertise as a programmer in + hours or days. How is working hard-to-continually improve over months? Well, now your ' re starting to get somewhere ...

References

Bloom, Benjamin (ed.) Developing Talentin young People, Ballantine, 1985.

Brooks, Fred, no Silver bullets, IEEE Computer, vol. 4, 1987, p. 10-19.

Bryan, W.L & Harter, N. "Studies on the telegraphic Language:the acquisition of a hierarchy of habits. Psychology Review, 1899, 8, 345-375

Hayes, John R., complete problem Solver Lawrence Erlbaum, 1989.

Chase, William G. & Simon, Herbert A. "Perception in Chess" cognitive Psychology, 1973, 4, 55-81.

Lave, Jean, cognition in Practice:mind, mathematics, and Culture in everydaylife, Cambridge University Press, 1 988.

Answers

Approximate timing for various operations on a typical PC:

Execute typical instruction 1/1,000,000,000 sec = 1 nanosec Fetch from L1 cache memory 0.5 nanosec Branch Misprediction 5 nanosec Fetch from L2 cache memory 7 nanosec Mutex Lock/unlock Nanosec Fetch from main memory Nanosec Send 2K bytes over 1Gbps network 20,000 nanosec Read 1MB sequentially from memory 250,000 nanosec Fetch from the new disk location (seek) 8,000,000 nanosec Read 1MB sequentially from disk 20,000,000 nanosec Send packet US to Europe and back milliseconds = 150,000,000 Nanosec
Appendix:language Choice

Several people has asked what programming language they should learn first. There is no one answer, but consider these points:

  • Use your friends. When asked ' what operating system should I use, Windows, Unix, or Mac? ', my answer is usually: ' Use whatever your friends  Use. " The advantage you get from learning to your friends would offset any intrinsic difference between OS, or between Programm  ing languages.  Also consider your future friends:the community of programmers that's you'll be a part of if you continue.  Does your chosen language have a large growing community or a small dying one?  Is there books, Web sites, and online forums to get answers from? People in those forums?
  • Keep itsimple. Programming languages such as C + + and Java is designed for professional development by large teams of experienced program MERS who is concerned about the run-time efficiency of their code. As a result, these languages has complicated parts designed for these circumstances.  You ' re concerned with learning to program. You don ' t need that complication. You want a language, is designed to being easy-learn and remember by a single new programmer.
  • Play. Which-would you rather learn to play the Piano:the normal, interactive-on, in which-hear each note as soon as Yo U hit a key, or "batch" mode, in which hear the the notes after you finish a whole song? Clearly, interactive mode makes learning easier for the piano, and also for programming. Insist on a language with the interactive mode and use it.

Given these criteria, my recommendations for a first programming language would is Python or Scheme. Another choice is Javascript, not because it was perfectly well-designed for beginners, but because there was so many Onlin E tutorials for it, such as Khan Academy ' s tutorial. But your circumstances may vary, and there is other good choices. If your is a single-digit, you might prefer Alice or Squeak or blockly (older learners might also enjoy these). The important thing is so you choose and get started.

Appendix:books and other Resources

Several people has asked what books and Web pages they should learn from. I repeat that "book Learning alone won ' t being enough" but I can recommend the following:

  • Scheme: Structure and interpretation of Computer Programs (Abelson & Sussman) is probably the best introduction to Computer SC  Ience, and it does teach programming as a, the understanding the computer science. You can see online videos of lectures in this book, as well as the complete text online. The book is challenging and would weed out some people who perhaps could was successful with another approach.
  • Scheme: How to design Programs (Felleisen et al.) is one of the most books on what to actually Design Programs in an Elega NT and functional.
  • Python: Python Programming:an Intro to CS (Zelle) is a good introduction using Python.
  • Python: Several Online tutorials is available at python.org.
  • Oz: Concepts, techniques, and Models of computer programming (Van Roy & Haridi) are seen by some as the Modern-day Successo R to Abelson & Sussman. It's a tour through the big ideas of programming, covering a wider range than Abelson & Sussman while being perhaps E  Asier to read and follow. It uses a language, Oz, that's not widely known but serves as a basis for learning other languages.<
Notes

T. capey points out that the complete problem Solver page on Amazon now have the "Teach yourself Bengali in + days" and "Teach yourself Grammar and Style" books under the "Customers who shopped for this item also shopped for these items" se  Ction. I guess that a large portion of the people who look at the is coming from this page. Thanks to Ross Cohen for help with Hippocrates.

Peter Norvig (Copyright 2001-2014)

Turn from: Teach yourself programming in Ten years

Teach yourself programming in ten years--programming with a decade of the church itself

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.