Tuesday, November 2, 2010

C and c++ learning journey

Always been the students asked, how to learn the C and c++ are not lost and is not arbitrary in that thought for a moment, here to give a general answer.
1, you can consider learning C.

Most of the time, we learn a language is not intended to be a language expert, but rather wants to be an expert to solve the problem. To be a useful for programmers, do a make money programmers. Our value, the value will be reflected in the customer instead of language is well written.

C++ is an object-oriented C, C ++ to C expansion of a large-scale application, complex system structure of the Organization and control methods, however, I think, C + + bones or C.

After all, solve specific problems, each function is used within the C way to write the program or process-oriented.

Therefore, want to learn good C + +, my suggestion to learn C, first learn the ability to solve problems, and discuss solutions to problems. Is to learn how to walk, then learn how to run.

2. learning C process, be sure to understand the thinking of structured programming.

Why do I have in front of the article says, the software development process, the language is a process of privatization of data, the application of large projects, stressing the high cohesion and low coupling, modular design, keep the code maximum flexibility and security.

This is a modern engineering development of core and soul.

Therefore, use C language getting started as a way of understanding the structure of thinking, it can be said is a very convenient way. Because the C function, is getting ready for reuse. At the same time, global variables and cpp internal private variable difference, its principles, these can learn a lot of structured development thinking.

3, begin to learn C ++

C ++ is not difficult, many people find it difficult to learn C + +, in fact, because it is in C, and provides many of the concepts, particularly object, it is difficult to understand.

But I after so many years, put the issue but fades out, I think the opposite process-oriented, object-oriented, simply structured programming is a specific expression, the compiler provides a means to force the programmer must follow the data for an instance of the privatization, c++, and C, the core than this.

Now we return to C and then see if we have a global variable, or write to a cpp, and in the corresponding h file does not declare that it is not only the modules you can use the? is it is a private variable to this understanding, the class can understand?

4. learning c++ in-depth skills

C++ classes, after so many years of development, it offers many in-depth concepts, looks very complicated, in fact I see is also very simple. Such as templates, my understanding is that "class", we say yes?

Since the template by understanding, STL, ATL, static template libraries, dynamic template library, is also difficult to understand? is that a lot of class class, can realize many of the classes in the application need, do not require programmers then write their own.

Ok, the STL is understood, generic development also difficult? so-called generic development, in fact, I make a template to define a set of rules, but this algorithm, I hope that this algorithm rules, to further abstract the core data types do not limited to death, I put the various data sets in, can be used, so the only algorithm this part, I do not need to be rewritten. Do you think is this truth?

Learn here, c++, and C, in fact, have almost the same. To learn a language, that is, those who criticized too.

5. learn application development

Said earlier, the purpose is not to learn a language, is to make people think you are the experts, is to write programs to make money. Therefore, linguistics, to learn application development.

What is application development, I will be a language, however, the customer does not understand that customers say it directly in Windows me write a program, what I want. Why Windows? "because I'm used to.

OK, more often than not, the application developer must respect customer habits, General, language this dongdong, or in conjunction with specific platform development, to develop meaningful applications sell. So, in General, the client is a Windows system, the server is Linux, these are industry practice, various embedded kindness, platforms, S60, Palm, WinCE, Linux, and so on. According to their target customers.

When we selected target platform, there is a problem, what language, very often, students and commercial programmer difference here, students generally didn't have selected, you will do just what it means to Enterprise programmers who are not in, to assess needs to see which language more suitable, no language to learn.

Ok, suppose we chose C and C + +, so we need to select a development platform, Windows not have said, this is the best VC, under Linux, gcc, others are similar.

If we develop VC, and using C + +, this time, you need to consider learning MFC because this is Microsoft's standard class libraries, at least under Windows platforms, it is the most authoritative, you see not, we start from learning how to walk, go to step MFC is MFC is not a learning C ++ up must learn? 

No comments:

Post a Comment