How can I be proficient in C ++?

Source: Internet
Author: User

How can I be proficient in C ++?

C ++ is a magical language that makes people love and hate it.

How can I be proficient in C ++ when I see a post on zhihu? Here are some wonderful replies.

1
Mastering C ++ is an arduous task. Why is C ++ so much harder to learn than other languages? In fact, this is basically because C ++'s father Bjarne Stroustrup said, "I hate Language designers for imposing their preferences on users" (look at go ). As a result, C ++ has become like this in order not to limit your thoughts. It contains several paradigms, there are probably object-oriented (flexible application of virtual inheritance + shared_ptr can achieve the effect of java/C #) templates (here there are two categories, namely type rich programming and meta programming, which are very different) functional Programming (now with lambda, the combination of files is almost invincible) process, but what is commendable is how natural these things are used together in C ++. However, it takes you time to take control of him. Do you really need to learn this point? I think it has something to do with your field. For example, I split my personality, because when I design languages and compilers, I always tend to create various small DSL for myself, all templates are used (think about boost's spirit and you will probably understand what I mean, although I don't need it). Try to let people with the same background understand what my code means at a glance. When I made my GUI Library (www.gaclib.net), I simply used OO and IoC. When I write a 3D rendering program, I will become a person who sacrifices readability for performance. When I am different from me, of course I will only use part of C ++ to complete my current task. This seems to be a multi-criteria, but it is actually determined by the nature of the project. At this time, you will think that C ++ is really a good language. When you need to discard different parts for your project, C ++ can help you. When you need different abstract layers and different performance requirements, C ++ can still help you. If you use other languages, you will eventually find that the language can only be used for certain types of projects. This is because C ++ allows you to give up some parts freely, and other languages will prevent you from giving up some parts. To reach this level, you must enter a state that is infinitely close to proficient in C ++. At this time, you can enjoy it freely, it is not bound by different values of the C ++ community. If your project is very large and different parts have different characteristics (what, a program that has not been written by 1000 or 2000 people all over the world for 20 years can be called a program ?), You need to have such skills. Speaking of this, everyone probably understands what it feels like to be proficient in C ++-a big husband can be stretched out.

2
Google engineers have two levels of knowledge about C ++:

It has C ++ readability (readability) certification. To pass this authentication, you need to write a complex and complete class in actual work, and then submit the class to a committee for review. The Committee will help you correct common errors, if your class meets all the requirements of style guide [1], you will be able to get readability certification in a week or two. Generally, you need to write at least thousands of lines of code in your work to meet this requirement. The readability of C ++ has two main meanings for engineers. One is to be familiar with and avoid the defects of C ++ (for example, do not use iostream or exception ), the other is familiar with some common library functions (such as various string operations, hash_map and smart pointer usage ). After passing this certification, the engineer has the right to review the C ++ program written by others in code review (note that this is not readability review ). The vast majority of engineers are at this level.

Consultant-Level C ++ programmer. It is generally necessary to write tens of thousands of lines of C ++ code, use C ++ to implement complicated systems, familiarize yourself with common design patterns, and apply them in actual work, I have rich experience in code refactoring. Most importantly, I became a C ++ consultant for the group and colleagues around me. I was the first person to ask questions when my colleagues had questions about C ++. Consultant-Level C ++ programmers are usually senior engineers and above, not only for a certain programming language, but also for a variety of engineering problems at work. In fact, "proficient in C ++" is not just familiar with C ++ itself. You need to be familiar with the engineering problems that C ++ needs to implement and the surrounding problems; in addition, the statement "proficient in C ++" is relative. If you can become a C ++ consultant in the group, it can help colleagues use this language correctly and efficiently to solve engineering problems and avoid mistakes in C ++. You are the one who is proficient in C ++.

3
Never trust a programmer who says he knows C ++
Source code. In other words, I think it is not very practical. I want to explain the details of the language and the implementation of the language. It's just a matter of fact. The technical cool I know, people go to the ghost system, the detailed principle, and seldom buckle the language. Originally, language is a tool. Use it well, if it breaks down, it can be easily maintained, so how can it be implemented.

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.