Design Patterns in C ++-painful contemporary programmers-life planning

Source: Internet
Author: User

The term "Design Pattern" is widely used not only in C ++ but also in other computer programming languages.

The famous Design Model Book head first has already sold well. "Big talk Design Model" also sells well.

It's really hard for people who are engaged in computer programming to think about it. After learning a C ++ language, the troubles will continue to emerge. First, we need to learn a "design pattern". Please note that, I did not learn any practical things. I learned this kind of things first. Some beginners also learned how to boost and compile things that would take n hours for beginners to learn, even a large part of the source code is read. I have a feeling of crying. Our programmers are really hard working, a lot of programming concepts, what "Frameworks", "structures ", "reuse", "cross-platform", many people think of these as fashionable terms.

Let's take a look at it. If you haven't actually done anything, you should first learn a lot about it. Our Chinese programmers are hard-working and don't have to say much about it?

Is design patterns important? Are reuse and framework important? Of course, no one denies their importance. These are things proposed by foreigners based on their years of work experience. They certainly have the rationality of their existence. However, the importance does not mean that you have to learn, nor does it mean that you need to learn at present, because people have limited energy and time to learn anything, we must calculate the input/output ratio and think it is cost-effective.

I have been studying C language, and I have always felt that C ++ is not a good language. The more complex the language is, the less complicated it is. Of course, many young C ++ programmers disagree with this sentence, because they may have never studied C language and they are learning C ++, why do I speak C ++? For example:

"You are a person", this sentence is very simple, you must understand immediately, or even understand without thinking. If I say "you are not a person ", you will understand this sentence after a while, but I will say "you are not a person or not". I guess you will be confused.

The C language is like the first sentence, which is simple and easy to understand. The C ++ language is like the second or third sentence. You need to think about it, increasing the burden of thinking. However, as a young programmer, you need to say "you are not a person" to him every day. After hearing this for a long time, he will not need to think about it and reflect it, this means that he has adapted to C ++. If you say "you are a person" to him at this time, maybe he needs to reflect it to understand the meaning?

The C ++ language is so complicated that the modern language has come up with so many concepts and there are some reasons for its existence. However, when Chinese people study it, they often fall into this situation and do not understand the truth of its existence, however, I tried to learn the concept as fashionable, but I don't know. The C ++ giant has the power to make good use of it. If it is not good, it takes a lot of effort.

I have raised a question about the design pattern only. Is the design pattern of foreigners a so-called four-person gang? The reason for this is that when foreigners develop large programs, they encounter actual needs for flexible architecture programs to facilitate expansion. That is to say, the programs written by these foreigners are very large, internal design is required to be very flexible, and it is very easy to expand what part to expand. At this time, they continue to practice and summarize the concept of design pattern and some specific program writing. Please note that, the appearance of this design pattern is undoubtedly deeply felt by foreigners who think it is very good and practical ".

When programmers in China Study the design model, there is no actual requirement. They just read a book and understand the design model they have learned. What is the strange phenomenon in the end, this is a strange thing to use the design pattern in order to use the design pattern. When a foreigner finds a solution to a problem and sums up the technology of the design pattern, Chinese people use the design pattern in a fashion, this will inevitably lead to misuse of the design model. Many things are clearly visible, but you are encapsulated into various design patterns for usage, increasing the complexity of the problem and increasing the cost of subsequent maintenance personnel, do you think so? As if you want to kill a mosquito, you can beat it to death with a slap in the face. However, if you do not carry a cannon to fight mosquitoes, you can certainly kill it, but the cannon is heavy, you have paid a lot of physical labor costs.

How many of the programs written by Chinese people are so huge that the subsequent maintenance upgrade must use the design pattern for standardization? It is really worth reflecting on. We used to learn a variety of computer languages to find a job and solve practical problems. It should be short and fast, and we have applied what we have learned. Now we can do it well. We just need to use the design model and reuse it, boost libraries and other things increase the learning time cost of every programmer for at least one year, one year, a year of valuable time that makes people feel bad, it is useful for some people to spend one year learning (maybe the bigger the project, the more complex the more useful), but I believe that most people spend more time learning this year, which is of little use and a waste of time.

Therefore, any technical knowledge should be learned selectively, first understanding what you want to do before you can learn with a goal.

After so many years of technical career, I personally agree that I would rather spend five years thinking about the true meaning of this sentence, it is worth learning more than a year to learn a variety of messy technologies. If you do not understand this sentence, it is because you are young and ignorant, then I think you will be sad and regret it, A painful day:

We need to plan a person's life, set goals, 5-year goals, 10-year goals, and 20-year goals. We need to break these goals into every year, even every month, every day, every day, we need to check whether our goals for the day have been fulfilled. Every day, we need to constantly check whether our goals for life are reasonable and whether they can keep up with the development of the times, can you keep yourself undefeated in the fierce competition, constantly adjust these small goals, and continue to move toward your big goals in life? Every day, never relax, move forward toward your long-term goal.

As a programmer who has been writing programs for 15 years, I want to write my own feelings to my later generations. There are too many things to be done in my life, never get into the ocean of technology without knowing it, but cannot extricate yourself.

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.