Learning C + +: The method of practitioner

Source: Internet
Author: User

Objective

My blog has been a long time focusing on the technology & details in C + +, even the reader and the respondents are few. However, May wrote a "How should you learn C + +", reading volume reached more than 30,000, in all the articles on the blog is the highest (and far more than the second), the number of comments also has more than 100. Why alone this article can arouse so many responses, presumably is the domestic C + + community by the C + + suppressed too long, or, strictly speaking, is the education of C + + repressed too long. In fact, whether in the major domestic forums, or in the international C + + forums such as comp.lang.c++.moderated, and even in the Douban group, the heart will find that the details of C + + language attention has not stopped, the same, the C + + The complaint of the details of the language has never ceased. One example is comp.lang.c++.moderated, a technology man James Kanze said, he said that exposure to C + + 10 years, and now still need to turn to C + + standard. No wonder Eric Raymond in the Art of Unix programming that "C + + is anti-compact." C + + in the details too much, even if you have seen, it is impossible to remember. More crucially, even if you remember, you can't be a really good programmer.

The vast majority of people put too much detail (or "Too much in the dark corner" in derogatory) as the essence of C + +, thinking that all evils are born. And so, in about September, Linus said on the mailing list, "C + + is a mind-burdened language; just to keep programmers away from C + +, I'm going to use C." This short words in the domestic cause a lot of reaction, initially is Liu turn Linus words, then cloud Wind and Meng all published their views; I also wrote a "Why C + +" (later sent to Bjarne,bjarne to make a friendship commentary on this article).

However, after this muddy water has been stirred up, I believe that the changes caused may not be very large. Most of the original opponents were able to find out the reasons for the objections, so they were more opposed, and most of the former respondents could find the reasons for their approval, and they were more sympathetic;

Getting rid of self-service bias--the precondition of rational thinking

"Decision and judgment" mentioned an interesting true story: one day in 1980, the United States Air Combat Command computer suddenly issued a warning-a nuclear bomb in the Soviet Union is flying to the United States. The headquarters immediately mobilizing its troops, ready for a nuclear war, but 3 minutes later, the engineers found that a small part of the computer caused the failure. However, after this false alarm, the public response is really interesting: those who originally supported the nuclear arms felt that they were now feeling more secure (because "the failures proved to be completely insurmountable") and that the original opposition to the nuclear arms was considered more unsafe (because "such false signals could lead to a Soviet overreaction, Spark a real nuclear war "). Similarly, after the three-island nuclear spill, opponents say ("This shows that management has no way of managing nuclear power safely"), and supporters believe ("This is a sign that such a danger is not as serious as it is to be overcome"). Social psychology sums up such phenomena as "self-service bias". Unfortunately, "the more the truth, the more clearly" is only applicable to rational thinkers.

Why do you have such a long chase? It is because the "language battles" that have been rampant in the programmer community, the real reason behind it is not the quality of the language, but the eye of the viewer. In the eyes of the observer, language is not a tool, but it spends more than n time (especially C + + as the most) to "cultivate" skills, for such a skill, is denied is tantamount to being denied. So, psychologically speaking, language is not a tool (though there has always been such a call), but a belief. Such beliefs are more intense in the language that takes longer. Interestingly, almost all the "lively" communities have this phenomenon, Java, Python, Ruby ... Because even if the language itself is not complicated, programmers still have to devote a lot of effort to learning all kinds of framework libraries (think about the Java frameworks?). )。 So the beliefs of these language communities are not necessarily stronger than those of the C + + community.

However, once we find out why we think of language as a belief, it is very helpful to get rid of the "Self service bias" in the view of language, and to look at the problem from an objective perspective. "When you see evidence supporting an opinion, try to think about what evidence does not support it."

So why get rid of self service bias? Small, to be a better programmer (no one wants to use a inefficient language or even an inappropriate language because of prejudice). Talking big is saving lives (because prejudices can lead to deeper, more wasted time).

So if you can rationally think about the issues we're going to discuss, avoid self service biases (just when you've never spent time on C + +). Then we can start talking about the real problem.

Preface 2

Now, almost every learning C + + knows that the core problem of C + + is its complexity, and even if it is not in the C + + community, it is true. The eyes of the masses are sharp, not to mention the fact that it is too obvious.

But see a few articles on C + + complexity, and the controversy over C + + complexity of the Spit-star (including I wrote a previous period of two of the summary of C + +). I always have a feeling--no analysis, just like elephant. As one of the readers of "Why C + +" criticized, I did not write in the article what exactly is C + + "non-essential complexity." Of course, I can tell by my own feelings, people who have been in contact with C + + for some time can generally know, but the novice and even the novice does not have a specific understanding of what I call "non-essential complexity", which makes the "Why C + +" out of its original intent--for all C + + users and learners.

For the same reason, after writing the article "How do you learn C + +", when Mr. Meng invited me to write a series of articles to programmers about my attitude and understanding in the process of contacting C + +, I was happy to say yes, but until now 3 months have passed. Why? Because I feel that the true nature of the problem has not been clearly touched, so until now I have not written, lest the nonsense said a lot of, in addition to being read as a novel, to really consider whether to learn or even use C + + people may not have any practical use.

However, this idea has always been in the subconscious. A while ago and Bjarne communication, talked about the complexity of C + + some ideas, in the mail summed up the complexity of C + + sources, feeling a lot clearer. And the purpose of this article is to convey a concrete and clear understanding of the complexities of C + +, and with this understanding as a support, we can extrapolate the best (practitioner) approach to learning C + +.

Related Article

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.