WEB Architect Growth Road - Take the Right Road

I have also been coding for many years. Although I have failed a lot, I finally have the experience of failure. However, in China, most programmers are like me, and they have been taking detours. If you want to become an architect, you must do it right. Otherwise, you will be farther and farther away from your goal. Programmers who are working hard, do you have any of the following feelings?

1. My job is to complete the tasks assigned to me by the leader on time. As for how the code is written, I know there is room for improvement, but there is no time to improve. The key is that the leader does not give time.

2. I find that my level is always unable to keep up with the progress of technology. There are too many things to learn. Jquery is used by more people recently. I heard that MVC is very popular recently, and LINQ. I heard that Microsoft has There is Silverlight...

3. I found that although I have been working for several years, in addition to non-stop coding, Ctrl+c and Ctrl+V have become more proficient, but the coding level has not improved. I am still an ordinary programmer, but some people have done it. On to the architect.

4. I have been working for several years and want to change jobs. As a result, the interviewers asked about data structures, garbage collection, and design patterns. Although I have read it, I don’t usually need it, and I have forgotten it. , I couldn't answer, and the examiner said that my foundation was too poor. . .

If there is, if not, then you don't need to read it, you must have taken it, or already understand the way, huh, huh.

If so, congratulations, you have entered a learning misunderstanding. If you want to advance in technology, you cannot always code. To work to meet the needs, we must keep our thinking and level constantly improving while coding. .

Writing code goes through the following stages.

1. You must learn the basics of object-oriented. If you forget this, then your programming path is destined to be a repetition of primitive and primary!

Many programmers know the concepts of classes, methods, abstract classes, interfaces, etc., but why object-oriented, what are the benefits, and what problems should be solved? I just understand the concept, but the expression is not clear, and then I can't use it in actual work. After a period of time, the object-oriented things are blurred again. The result is that most programmers use object-oriented languages ​​to do process-oriented work. , so to learn object-oriented, you should first understand what is the purpose of object-oriented?

What is the purpose of object orientation?

Development languages ​​are constantly evolving, from machine language, to assembly, to high-level languages, to fourth-generation languages; software development methods are constantly evolving, from process-oriented, object-oriented, to aspect-oriented, etc. Although these are constantly developing, the goals it pursues have not changed. These goals are:

1. Reduce the complexity of

software development 2. Improve the efficiency of software development

3. Improve software quality: maintainability, scalability , reusability, etc.

Among them, the development of the language and the development of the development method have made great progress in the two items 1 and 2, but for the third item, we cannot rely on the development method itself to solve it.

Improve software quality: maintainability, scalability, reusability, etc. To be more specific, it is high cohesion, low coupling, and object-oriented is to solve the third problem. Therefore, to be a good programmer, the most unavoidable thing is object-oriented.

Second, in order to learn object-oriented, you must learn design patterns.

Suppose we understand the purpose and concept of object-oriented, but during the coding process, we find that our object-oriented knowledge seems to be useless all the time. In fact, the reason is very simple, because we do not know how to use it, just like swimming In the same way, we have understood the benefits of swimming, as well as several swimming postures, dog planing, backstroke, breaststroke, freestyle, but we still can't swim. . . .

Therefore, it is not possible to have these basic principles. We must have some more detailed principles to know our design. This has more basic five principles of object-oriented, and these principles are applied in practice in more detail. Come, solve practical problems, this is design mode, so to learn OO well, you must learn design mode, learn design mode, according to the master's words, the successful solutions in many fields that human beings strive to solve come from various modes, An important goal of education is to pass on patterns of knowledge from generation to generation.

So learning design patterns is like we are watching the world's top swimming competition, we are crazy about it, we are fascinated by it.

3. Learning Design Patterns

Just like we don't want to just watch other people perform, we have to learn to swim by ourselves, which is our purpose.

When we read a few design patterns, we were excited about it. When we were new to coding, we always tried to use the design patterns we learned, but we often misused the patterns. After a long time, we found that we were taking off our pants. scratching. . .

After learning design patterns, we were confused again, and felt that these patterns were too similar. Many times we couldn't tell the difference between these patterns, and we understood a fatal thing in the design process-overdesign , because the design pattern requires us to have high scalability and high reusability, but at the beginning of the requirement, we are not gods. Except for relying on past experience to judge, we do not know where to expand and where to reuse, and in the past Is the experience necessarily correct? So we don't even dare to use design patterns easily, but have been implementing requirements in a process-oriented approach.

4. Learning how to refactor

the wonderful code is more exciting than seeing the wonderful code, so we started to think, these masters do not need to work, there is no leader to set the completion time when the demand comes, only to design wonderful code Code as a standard to do work? This kind of work is too cool and impossible, and the boss doesn't want it. Even if he has these ideal conditions, he has designed the perfect code from the beginning? It's impossible, unless he is a god and anticipates all future needs from the beginning. Since these conditions are not available, how can they write wonderful code?

Joshua Kerievsky makes it clear in his famous "Patterns and XP" (in "Extreme Programming Research") that using patterns early in the design often leads to over-engineering. This is a harsh reality. The pursuit of perfection alone cannot lead to practical code, and "utility" is the overriding element of software.

As mentioned in the book "Refactoring - Improving the Design of Existing Code", through refactoring, you can find the balance of changes. You will find that the so-called design is no longer the premise of all actions, but gradually emerges throughout the development process. During the system building process, you can learn how to enhance the design; the interactions that come with it can keep a program well-designed as it is developed.

To sum up, we use design patterns in the early stage of design, which often leads to excessive design. Therefore, we should constantly refactor the current code during the entire development process and the entire requirement change process, so that the program can always maintain a good design. It can be seen that the development process needs to be refactored all the time, otherwise no matter how good the original design is, as the requirements change, it will become a pile of rotten code, which is difficult to maintain and expand. The so-called refactoring is the process of "making changes to 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 essentially, to make the architecture of the program more reasonable, thereby improving the maintainability, scalability, and reusability of the software.

The book "Refactoring-Improving the Design of Existing Code" is also the work of Martin Fowler and other masters. It is a super classic masterpiece in the field of software engineering. It is also known as "The Double Hero of Soft Work" together with another masterpiece "Design Patterns". It is a must-read. what.

Five start the road to a good software designer

Through design patterns and refactoring, what we have learned and the coding of our work are finally combined. We can use object-oriented thinking to think about problems at work and start learning to refactor. It's like swimming, we see After finishing all kinds of top swimming competitions, I understand all kinds of rules, methods and techniques used by celebrities, now it's time to go home and practice in the small river next to the village. Practice also requires a coach. I recommend another classic book called " Refactoring and Patterns", citing his opening introduction, this book pioneered and deeply revealed the connection between refactoring and patterns, two key software development technologies, and explained that implementing patterns through refactoring to improve existing designs often Better than using patterns early in a new design. This book not only shows an innovative method of applying patterns and refactoring, but also helps readers to deeply understand refactoring and patterns in combination with actual combat.

This book is just the coach we need, and it's worth reading.

Sixth, there is no end, only persistent research and hard work.

After several years of perseverance, I finally learned to use various modes flexibly. We don’t need to deliberately think about which mode to use and how to reconstruct it. The goal of the program, namely maintainability, scalability, and reusability, has become a programming habit, a habit of thinking, just like after we have been swimming for a few years, we no longer need to deliberately think about how to do it. Let yourself float on the water, the difference between backstroke and breaststroke... But jump into the water, then swim naturally, and swim towards the opposite bank. But compared with masters, hehe, we still have a long way to go, and we may not become masters in the end, but whether we can become masters or not, we are already on the right path to become masters, we and other programs Members have started to be different, because no matter how many years they have, their level will not change, they are just repeating the wheel, the only thing faster than you is ctrl+c and ctrl+v.

On the right path, as long as you persist, you will get closer and closer to your goal, and you will definitely be an excellent architect in the future. The difference from an excellent architect may only be a matter of time.

Therefore, focusing on a certain technical field is an ironclad rule for success.

Original link: http://www.cnblogs.com/vance/archive/2013/04/12/3017532.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326445887&siteId=291194637