I also coding many years, although very failure, but also finally a bit of a failure of experience, but I in China, most programmers are like me, in the same way, if you want to become an architect, you must go the right way, or farther away from the goal, are working programmers, Do you have any of the following feelings?
First, my job is to finish on time the leadership entrusted to my task, as to the code to write how, know that there is room for improvement, but there is no time to improve, the key is leadership also do not give time ah.
Second, I found that my level is always not keep up with the progress of technology, there are too many things to learn, jquery with people recently more ah, heard the recent MVC comparison Fire, and LINQ, I heard that Microsoft has Silverlight ...
Third, I found that although I worked for several years, in addition to the constant Coding,ctrl+c and Ctrl + V more proficient, but the level of coding is not improved, or an ordinary programmer, but someone has done the architect.
Four, work for a few years, want to change jobs, the results of the interview examiner asked some what data structure, what garbage collection, what design patterns and other things, although seen, but usually do not need to see also forget, answer not come up, the results of the examiner said I was poor foundation ...
There is no, if not, then do not have to look, you must be danale, or already understand the way, hehe.
If you have, congratulations, you enter the learning misunderstanding, if you want to advance in technology, you can not always coding, in order to complete the needs and work, must be in the coding at the same time, so that our thinking, the level is constantly improving.
Writing code goes through the following stages.
First, you have to learn the basics of object-oriented, if you forget, then the path of your programming is destined to do the original primary repetition!
Many programmers know the concepts of classes, methods, abstract classes, interfaces, etc., but why object-oriented, where are the benefits, and what problems to solve? Just understand the concept, is not clear, and then in the actual work is not used, after a period of time, object-oriented things blurred, the result is that most programmers use object-oriented language to do the process-oriented work, so to learn object-oriented, we should first understand the purpose of object-oriented?
What is the object-oriented purpose?
Development language is evolving, from machine language, to assembly, to high-level language, to fourth-generation language, and software development methods are evolving, from process-oriented, object-oriented, to aspect-oriented. While these are evolving, the goals they pursue remain the same:
1. Reduce the complexity of software development
2. Improve the efficiency of software development
3. Improve the quality of software: maintainability, scalability, reusability, etc.
The development of language, development method of development in 1, 22 above has made great progress, but for the 3rd, we can not rely on the development method itself to solve.
Improve software quality: maintainability, extensibility, reusability, and so on, the specific point, is high cohesion, low coupling, object-oriented is to solve the 3rd problem. Therefore, to become a good programmer, the most inseparable is the object-oriented.
Second, in order to learn the object-oriented, we must learn design patterns.
Assuming we understand the object-oriented purpose, the concept, but we coding in the process found that our object-oriented knowledge seems to have been useless, in fact, it is very simple, because we do not know how to use, like swimming, we have understood the benefits of swimming, as well as several kinds of swimming posture, dog planing, Backstroke, breaststroke, freestyle, but we still can't swim ....
Therefore, with these basic principles is not possible, we must have some finer principles to know our design, this has a more basic object-oriented five principles, and the more detailed application of these principles in practice, to solve the actual problem, this is the design pattern, so to learn oo, must learn design patterns, Learning design patterns, according to the master, is that in many areas of human endeavor to solve the success of the scheme are derived from various models, education is an important goal is to transfer knowledge of the model generation.
So learn design patterns, like we are watching the world's top swimming competitions, we are crazy, fascinated by it.
Three Learning Design Patterns
Just as we don't want to see others performing, we have to learn how to swim, and that's what we want to do.
When we read a few design patterns, we are excited about the spirit of the new coding, we always want to work hard to use the school to the design pattern, but often in the misuse of the model, tossing half a day found to be in off pants scratching ...
After learning the design pattern, we were confused, feeling that these patterns are just too similar, many times we can not tell the difference between these patterns, and understand the design process of a deadly thing-over-design, because design patterns require us to high scalability, high reusability, but at the beginning of demand, We are not gods, but we rely on past experience to judge, we do not know where to expand, where to reuse, and the past experience must be correct? So we don't even dare to use design patterns any more, but we've been using a process-oriented approach to achieve demand.
Four-learning reconstruction
The wonderful code is how to think out, than to see the wonderful code is more exciting, so we began to think, these masters do not have to work, the need to do not have to lead the completion of time, only to design wonderful code as the standard to carry out work? This kind of work is too good, also impossible, the boss does not want AH. Even if he had all these ideal conditions, he would have devised the perfect code from the beginning. Nor is it possible, unless he is God, to anticipate all the needs of the future at the outset, since none of these conditions, how did they write the wonderful code?
Joshua Kerievsky in that famous "model and XP" (included in the book "Research on Extreme Programming") clearly pointed out: in the design of pre-use patterns often lead to over-engineering (over-engineering). This is a cruel reality, the pursuit of perfection alone can not write practical code, and "Practical" is the overwhelming element of software.
In the book "Refactoring-improving the design of existing code", you can find the balance of change by refactoring (refactoring). You will find that design is no longer the premise of all actions, but is gradually emerging throughout the development process. During the system building process, you can learn how to strengthen the design, and the interaction between them allows a program to maintain a good design throughout the development process.
Summing up is that we use design patterns in the early stages of design, often lead to excessive design, it should be in the entire development process, the entire need to change the process of constantly refactoring the current code, in order to let the program has maintained a good design, this shows that the development process needs to be reconstructed, otherwise, no matter how good design, As demand changes, it becomes a bunch of rotten code, difficult to maintain, and difficult to scale. Refactoring is a process that "modifies the code to improve the internal structure of the program without changing the external behavior of the code." The goal of refactoring is to design patterns and, more fundamentally, to make the architecture of the program more reasonable, thus improving the maintainability, extensibility and reusability of the software.
"Refactoring-improving the design of existing code" is also the works of Martin Fowler and other masters, the Software engineering field of the Super classic masterpiece, and another masterpiece, "design mode" and called "soft double male", it is a good thing to read AH.
Five start on the road to excellent software designers
Through design patterns and refactoring, what we learn and the coding we work with are finally combined, and we can use object-oriented thinking in our work to think about problems and start learning refactoring, like swimming, we've seen all kinds of top swimming competitions, understand the rules, the methods and techniques used by celebrities, Now is the time to go home to the village next to the river to practice, practice is also need to have a coach, recommended another classic book called "Reconstruction and Mode", quoting his opening introduction, the book pioneering and deeply revealed the reconstruction and mode of the two key technologies of software development link between, show that through the reconstruction of the model to improve the existing design, Often superior to early use patterns in new designs. This book not only presents an innovative approach to application patterns and refactoring, but also helps readers to understand refactoring and patterns in combination with actual combat.
This book is the coach we need and it's worth reading.
There is no end to the six, only persistent research and efforts.
After a few years of persistence, finally learned the flexible use of various models, we do not need to deliberately want to use what mode, how to reconstruct. The goal of the program, is maintainability, extensibility, reusability, has become a programming habit, a habit of thinking, as we contacted a few years after swimming, we do not have to deliberate to consider, how to let oneself in float up, backstroke and breaststroke difference .... Instead of jumping into the water, they swam naturally and swam toward the other side. But to be compared with the master, hey, we still have a long way to go, the end may not become a master, but whether or not to become a master, we have been in the right way to become a master, we and other programmers have started different, because they no matter how many years, their level will not change, just repeating the wheel, The only thing faster than you is CTRL + C and CTRL + V.
The right way, as long as the insistence on the closer to the goal, the future will certainly be a good architect, and the distinction between excellent architects, may only be a matter of time.
The. NET Senior Architect Web architect------take the right path