Typical development experiences of C ++ programmers

Source: Internet
Author: User

Original article link

A typical C ++ProgramMember growth experience:

1.Complete learning of all c ++ Language Features, Typical books"The C ++ programming language" Part1, Part2, "C ++ primer"

C ++ is like a hodgedge (Multi-programming paradigm), with a variety of exquisite syntax features (friend, virtual/rtti, const/mutable, exception, template ), too Many exquisite things can easily make memories trivial, learn and forget, especially those rarely used parts.

Practice: write some so-called C ++ programs with class and virtual words

2.Establish C ++ rulesIt is clear that in the C ++ world, "what is legal is not necessarily reasonable." typical booksValid C ++ Series

Some things can be written in C ++, but it is generally not reasonable. For example, protected member data overwrites non-Virtual members.

Practice: I found that C ++ has strong semantic constraints and sub-language categories.Code

3.1 To make the preceding constraints more formal, useDesign Mode, Typical books"The C ++ programming language" part4, "design patterns"

Practice

I started to think: Sometimes the traditional design mode is very ugly for C ++ (OO). Is there a native idea of implementing C ++ mode (to make use of the Efficiency of C ++ ), getting fascinated with static type systems and template derivation (GP)

3.2 get started with quick developmentStandard Library, Typical books"The C ++ programming language" Part3, "the C ++ standard library", "valid STL"

The usage of standard libraries alone cannot satisfy the curiosity of true C ++ programmers: auto_ptr, iostream, how are these exquisite things implemented? What is the overhead of string? How are the functional/alogrithm, iterator, and iner separated?

So I started to read a standard library implementation (typically the implementation of HP-SGI, but it is recommended that Windows coder read msvc), and try their own equivalent implementation, although it may only be part of the standard library function. A major driving force here is to pay attention to the efficiency of C ++.

Now, you know how to choose between raw/smart pointer, char */string, static/dynamic bind, array/STL container.

Practice: write a program that can work stably, pay attention to the reusability and scalability of modules, and understand the gap between the book model (Academic School) and the high quality c ++ code.

4. Intercept: The 3.1 and 3.2 processes will overlap and causeRe-learning template C ++This language, a typical book"C ++ templates: the complete guide"

5.1Template C ++ and GPIt is found that it is a super powerful code generator, and pattern shapers, typical books"Modern C ++ design"

Start to enter a paranoid GP and Mode Application Status:
1. Visualize all objects, wrapper hell
2. Abstract all concepts. abstract class/factory
3. strategize all actions, dynamic: Strategy, static: traits, Policy
4. Move all implementations closer to the standard library. Think in STL: Every Io is iostream, every algorithm uses iterator, every container is type-safed and nonintrusive with specialization for Optimization

Success or failure Xiao He: No matter how clever and practical it is

So far, almost every C ++ programmer has his own semi-STL private library, which has accumulated many years.

Practice: Write industrial c ++ programs. Some of your code (Libraries) may be open-source or closed-source for others to use.

5.2 getting startedThink in STL is called boost.So you did the same thing to boost as STL above, a typical book"Beyond the C ++ standard library", "Boost Docs", "Full Development Guide for Boost libraries"

Maybe I am still interested in C ++ 11. Now I can use tr1 as a typical book."The C ++ standard library extensions"

Practice: Compile industrial c ++ programs with High Efficiency

The 5.1 and 5.2 processes will overlap.

6. Over-playing template C ++ will causeMetaprogramming, Typical books"C ++ template metaprogramming"

Although it shows off, it is rarely used in the production environment.

Supplement: Since TMP is turing-complete and adheres to the concepts of handy coding and compiling is running, you actually need a dynamic language (using the C ++ compiler as an interpreter, and cannot be debugged ). Then narrow down the scope: from the current C ++CommunityAt work, the most mature InterOP language is Python.

Practice: The earth is dangerous. Go back to Mars.


7. The business project of a high-quality C ++ program fails, causing youMeditation

Investigate possible causes of failure:
1. business decision-making is irrelevant to C ++
2. In fact, it is part of the high-quality C ++ program. The high-quality modules are compiled by excellent programmers, and others are very bad.
Method 1. You like the current team very much: it is impossible to learn from those new users and let them go through at least two to three stages.
Method 2. if you leave to find someone who is at the same level as you, remember that C ++ is a powerful tool for people who really understand it. Instead, it is better not to use C ++.
3. The Code complexity is too high due to excessive personal skills.
Hard to understand, difficult to maintain, and long development time
4. A degree is required.
1. The difficulty of achieving reusability and scalability should not exceed the average level of the team
2. The average level of the team should not be lower than the average level of competitors in the market for similar product development
5. A goal and attitude are required.
1. The ultimate goal is to make deliverables and work-ready products.
2. Make the best product, not necessarily use the best technology

8.Back to nature

finished

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.