What to learn about programming

Source: Internet
Author: User
What to learn about programming-general Linux technology-Linux programming and kernel information. The following is a detailed description. What programming really should learn is people's design ideas-how to abstract, simplify problems, how to use design to express ideas, and how to improve efficiency.
  
For example, the problem of using macros in MFC. In fact, we should look at this:

From the technical point of view, MFC is very clever. On the one hand, it bypasses the "unsupported compiler" problem, on the other hand, it improves the efficiency-when you shake your mouse, there may be dozens or hundreds of messages, and there may be hundreds of MFC objects that can receive messages: in this case, the space and time costs that have to be paid to support virtual functions are terrible-or the cost of message transmission is too high. Therefore, Microsoft has to use assembly code to optimize the macro.

Therefore, MFC uses macros to solve efficiency problems. On the other hand, users can "inherit" its processing mode without having to write too much code.
  
However, why are so many people, even many well-known experts, dismissing about this implementation?
  
Because it is not abstract. It's just a naked "Technical patchwork"-Microsoft's stuff, too many of which are like this, not abstract, "patchwork" products, such as VB. Or even windows.
  
Without good abstraction, It is very troublesome for users to learn. It is easy for novice users to draw a gourd Based on samples. However, if a Medium-and High-level user wants to make something flexible or expand the MFC, he must understand every step in the middle. This is simply the original system design solution of Microsoft. Who can get it?
  
This is why Hou Jie's "in-depth introduction to MFC" is popular.
  
At the same time, without a good abstraction, the relevant implementation code can only be implemented by a row, which is basically impossible to reuse. Programmers are also very upset.
  
On the contrary, let's look at the "Generic file concept" in unix/linux systems and the "class" concept in C ++.
  
It can be said that the design concept of the entire system is exhausted in one word.
  
In unix/linux, sound cards, graphics cards, NICS, and disks are no longer available ...... Everything is a file. After learning to read and write files, you have almost mastered all programming for unix/linux systems. After learning to simulate files, your code can be seamlessly integrated with the operating system.
  
This is the realm of design.
  
Similarly, what is the essence of C ++ classes? A struct bound to the functions that process it, and a series of mechanisms to ensure its reliable operation. It is not easy to thoroughly understand.
  
However, in the brilliant abstraction, only one "class" word is used to fulfill its true meaning. Even things you have never learned can be guessed from the comparison with the concept of "class" in reality. Checking books often makes sure you have guessed it.
  
In fact, which of the following simple concepts (classes) and their interactions (methods) are not clearly abstracted for a truly brilliant implementation )? This is not just something unique to object-oriented languages.
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.