Code Tour - Preparatory Articles

xiaoxiao2021-03-06  60

What should be done as a qualified programmer? Familiar with the programming language, master the framework structure, related technology, understand the needs, understand the operation mechanism of the program ... Is there any?

As a programmer, you may encounter this situation: you have received the needs of your customers (no matter who your customers are, there may be customers of your products, there may be other members of your group, It is possible to be a QA person), you think about these needs, then you don't hesitate to start coding, but you wrote some part You suddenly found some places wrong, you are currently wrong, then you delete After a large number of modifications, it is a few times, it is finally done, or you think it is doing it, then you are sighing, "It's really tired!", Then you start doing some Simple functional test, the results found that there is a bug, "Tian, ​​how can there be bug?" Next, it is naturally modified code, and then recall. "Finally revised", you sigh, but the fact is not the case, soon, you will find a few bugs, then naturally a change, the gas is the code you modified, it will bring more BUG, this makes you very afraid of your code, very afraid to change the code, very afraid to find bug, so if someone is a little bit of question, you will not hesitate to push the problem without hesitation. Others explain that if you have any questions, there will be no problem, let others change his code, not your code, because you are afraid of your code! If your customers ask you to add a few or some functions, you will die, and you will try our best to stop your customers, I hope he is old and realistic using an existing system. Don't "noisy" again, because it is already chaotic! What is the result of all this? You hate your own industry, "Why did I choose to make a programmer? I really want to go!", Of course this is only one of the results! Believe in yourself or you must have such a person.

The current question is that the programmer really wants so tired? Answer is natural is not! The scene described above is very common, which mentioned two key issues:

The programmer did not do pre-design work, so many problems in the later period need to modify a large number of code. The working model that is written will apparently needs to be avoided! Please pay attention to the design work is not only the work of architects and designers (the architecture is actually a design, just more generalized). Many programmers said when you asked him if he used UML, but just came to the style. When you want to design a drawing, you will be able to apply it, some simply reverse one, change It is used as a design diagram without changing. This is wrong, the purpose of UML is to help you design, clarify the idea, if your system is done, is it UML? ! The programmer does not have a planned coding process, which will throw a certain efficiency during the coding phase, which is not a time resource and human waste. If there is a process plan at the beginning, as long as you follow the process, you can go, you don't need to waste your mental consider when you should do what you should do. Another process that has been well-designed is to cope with most encoding work and help assess the project time.

We are also discussing in the "Coded Tour" series. It is worth mentioning about the design work mentioned in the question. It actually needs to be learned and mastering design models. This part is very wide, it is more complicated, when you are familiar with it, you will understand what is true. Object-oriented programming! You may feel a bit exaggerated, "I have already learned OOP", really? ! I will squeeze out some time in the future, summarize some of the design patterns and the principle of OOD (Object Oriented Design). Welcome readers to have time to discuss! That is, the design pattern will not be explained in the "encoded journey", but just a brief introduction, you should first have a design, then go to the design, not blindly write code. . So, gossip less, set sail, let us discuss the code process, let's go!

转载请注明原文地址:https://www.9cbs.com/read-111591.html

New Post(0)