Please don't misunderstand, my name is not called "NO MFC".
Write this "White", asked me if you asked me yesterday, what is the purpose of writing the NO MFC series? I can't answer it for a time, I thought a lot later.
At first writing, because I will predefine #define win32_lean_and_mean in the beginning of the source program. Remove the NO MFC programming series without including precompilation of MFC. However, I am not only for this simple reason.
The greatest advantage of NO MFC is not packaged! I have enough reason to believe this is conducive to learning. You can fully understand the basic principles of your program run, this is what you can't have in the process of learning MFC. (I don't want to just see the cat painting cat, I want to do innovation needs to be based on the "Objective World" is based on enough understanding and understanding)
The title of NO MFC does not mean that I have an MFC. In fact, I never oppose the use of high-efficiency development tools. I remember that when I just started to learn Windows programming, only all books on the hand were about MFC, and I rely on those books to get started. The results of it? I can only say that it is completely unknown. I only know how to copy another inexplicable code. Don't say that the program is expressed in accordance with himself. This situation has not improved until I know that there is SDK programming in the world, and API is available, and try to understand the Windows running mechanism.
It is worth lucky that the process of confusion only lasts for a long time!
In my values, what is the programming? I think that the study of the study at this stage should be - the basic principle of Windows run. Is to understand why, not just how!
For me, learn a language, know how to grammar, know how to make a method (inherit, template) is not the ultimate goal!
I should master and use the language you have learned to describe the abstract "virtual world" of the computer. That representative, I have enough understanding of the world.
Here I want to mention the concept of abstract levels. (The following example may be some extreme, but that is not the focus of discussion)
For example, one absolute underlying master, he fully understands the operating mechanism of the protection method, know how to initialize LDT, GDT, Task Gate, etc. until you can access them, and can even write procedures from the hard disk boot system. However, such a master arrived in the virtual world of Windows, he was completely unfamiliar, because he did not have exposed to Windows before, in this regard, he became a raised rookie in the beginning, he might have to spend half a year to learn about WiDows operation mode Can be applied to the actual in practice, and finally becoming a master.
What is the reason? (I don't want to discuss the possibility of this example) Because the computer has been abstract, separated from the operating system, it has become an independent abstract level (another virtual world), although it looks more similar to the previous Place, however, writing programs on it will be completely different, previously used compilation (or even machine code) to write programs, and now only API is available!
Java is actually another virtual world, it has its own virtual machine, actually another abstract level. Otherwise, how many APIs have been moved to Java? (It should be one?)
MFC is also! If anyone can look into the inheritance, the parent class, the act of the API is really working behind the API, then the name of him should not be embarrassed! (Hou Junjie is such a master, he is my respected seniors!) (In fact, my own white is almost the same, below is supplemented)
One of the information that has to be mentioned is about optimization.
More about regular understanding helps you do your program code optimization. (Code optimization is different from algorithm optimization, where the program has been optimized in algorithm.)
Have you heard of compact coding? (In China, there should only be a few people will do this). Under normal circumstances, the programming method like this is not used to develop large programs, but it is indispensable in the critical part of the big project, and even develops a game. It will also be used frequently ...
Anything has "good" and "bad", and software engineering is no exception. It is to develop large projects, and actually prove the theory very effective! The compact code is in some ways to carry out the idea of software engineering. Because software engineering does not guarantee code optimization! This is not its purpose.
For compact coding, it uses global variables to speed up access speed, software engineering does not advocate, because it will increase coupling; its merge module makes the code more compact, software engineering does not support, because destroying module independence; it uses GOTO To avoid far transfer, the software engineering is not allowed, because this will make the program readability becomes bad!
(It is even more than the module, and it will not pull the class, inherit, and objects. Only the data structure, array ... but sometimes, "simple" is not equal.)
Indeed, so extreme development methods are rarely used, because it is too tiring! The development cost is extremely high (the development staff is too high), the commissioning costs and time (requires developers extremely rigorous, considering the problem very comprehensive, this is why such programmers are more valuable).
Although I use it, will you do your compact code?
Compact coding can make the code optimization truth is actually very simple, I believe that people who have studied compilation know. Performing jump is divided into proximity, long shift, and CALL mode. The efficiency of these three jump methods is different. According to the 486 data of my old tooth, corresponding to the above, 3 cycles, 17 cycles and 35 cycles (maximum to 77 4x, corresponding to the case of different privileges and X parameters). You have to know that the module call is actually a call mode, and the compact code is good.
Finally, it is pointed out that compact coding is just a few people's efforts! (At this point, I have an example in my mind "" Genius is often called "fool" by the world, and Einstein is an example! "The source has been forgotten.)
Another thing to mention is about software engineering applications.
Today, in today's development of geometric levels, the role of software engineering is increasingly important.
I remember to see similar speech "India's software is the best in the overall effect; the internal code written by India is the most bad."
In fact, this is related to the Indian thinking. Indian sources will not consider using the minimum configuration, and he will think that people buying software will be used on the fastest machine.
Does the Microsoft Giant have written a big substitute?
Maybe someone will ask, is there a slow day? (This is probably not I can answer.)
In any case, the current application of software engineering is raised. Learning well this magic will be the key to determining success or failure. From another perspective, even if you can't write more excellent code, at least you should make your own procedure is best better. To learn someone else (Indian) success!
(This is my reposted "The code" I want to explain)
If the situation has changed, remember to inform me!
If you have any views on this XX "White", please tell me.
I just want to be a normal programmer. `Sea Breeze October 18, 2002 AM 11:39
-------------------------- Attachment:
Features: No arrival, just arrived to Miqi, voice slightly magnetic, character cheerful, a little smart, preamble ... Maximum hobby: compiler with video games, programming and sports love: VC DX_SDK API (称 VC ) Currently listening: Na Ying - Dream wake up