How to become an excellent programmer?

xiaoxiao2021-03-06  223

1) Learning should start from the basis, do not try the highest and deep technologies at first. 2) Every time I see a book, don't say this chapter I have learned before, and I have a very good, so I can skip this chapter to see more important. 3) For homework, try not to ask others immediately. If you can't solve the problem, you can complete you first, then take some special difficulties, ask your master. 3) Don't expect books and hipsters to help you solve all problems, because you don't have all questions to teach you. 4) Ask others, you should understand the problem. For error prompt information, it should be supplied, do not provide information on your understanding. Because since you can't do it yourself, you understand that you understand problems. 5) Ask questions, it is best to bring code. 6) Don't say "Compilation, but run ...", because compiling errors and run errors may have no relationships. In general, compilation is grammar issues, while running is a logic problem. 7) The book is not as good as the program, and should try to write the program as much as possible. 8) Do a thousand programs that are worse than doing the program. Should try to improve the procedures you do now, not to open new plan, and each plan is tiger head snake. 9) To think of you are not a man writing, but write a program with everyone. 10) Although a deep skill showed a deep skill, it is often harmful to cooperation, and should try to write simple read code. 11) The program should try as much as possible, that is, the code itself understands, as if you have the same logic. 12) Complex code If you don't do your own comment, you should give an appropriate amount of annotations. 13) Note Should be modified accordingly when modifying the code, and cannot mislead others with old comments. 14) The code should try to be reused. The same function should be done by the same function, and the important function should give debug information to debug the problem early. 15) You should try to write a small function, and each function should not exceed 40 rows or less. This allows you to read a full function without scrolling the screen. 16) For Switch statements, try not to have too much branch, if the branch is too much, you can consider using a jump table. 17) Try to use some controversial statements, such as goto and three-mean operators, since it has a dispute, it must have some shortcomings. 18) For GOTO, many engineers can be used reasonably, not to cause problems. But your program does not necessarily give you the same level, you can't guarantee reasonable read and modify these related code. 19) When the code is written, there should be a certain format, and the basic requirement is to help understand the code. 20) If the data is common, a package should be provided to manage it and provide a suitable interface to each module. In this way, if the data content has major modifications, only the interface is not changed, it can guarantee that the program should not be complicated. 21) The concurrency control of the data should be taken into account. 22) The concurrent control of the data should be encapsulated instead of exposure to other modules, which can reduce the procedure of the program caused by concurrent causes. 23) The structure of the data cannot be too complicated. It should be divided into two groups of data as much as possible. 24) The database should be considered for the case where the amount of data is relatively large. 25) The database interface should use a standard ODBC or ADO interface, try not to process according to the interface provided by the actual database DBMS because you may replace DBMS in actual use. 26) Small data can consider files, file paths should have to be designed to be relative paths.

27) In a function, you should try it immediately after using the file immediately after use, so other programs may use the file. 28) Don't try to read all the files all over the memory, you should handle the big file. 29) Write programs should provide relevant test procedures to provide test methods. 30) Should consider the code, the usage of functions, do not exceed the range of functions that can be used. -------------------------------------------------- ---------------------------- 1. Solid foundation. Data structure, discrete mathematics, compilation principle, these are the foundation of all computer science, if you don't master them, it is difficult to write high levels. According to my observation, people who learn computer majors can more written high quality software than others. The program will write, but when you find that it is difficult to write a certain degree, it should think about whether it is to go back to learn these most basic theories. Don't go to learn OOP at the beginning, even if you are fine, you may have no hand when you encounter some basic algorithms. 2. Rich imagination. Don't stick to a fixed thinking method. When you encounter problems, you should think about several solutions to solve the problem, try the way others have never thought about. Rich imagination is based on rich knowledge, except for computers, more about other disciplines, such as astronomy, physics, mathematics, etc. In addition, it is also a good way to see more sci-fi movies. 3. The simplest is the best. This may be a criterion following all sciences. Such complex quality interchange principles are just a simple formula that is simple in Einstein: E = MC2. A simple approach is easier to be understood, more easily implemented, and more easily maintained. When you encounter problems, you should give priority to the easiest solution, and only the simple solution cannot meet the requirements. 4. Do not drill the horn. When you encounter obstacles, you may wish to stay away from the computer, look at the scenery outside the window, listen to light music, chat with friends. When I encounter a problem, I will play games, and it is the kind of violent fighting game. When the part of the brain cells responsible for the game, the part of the brain cells responsible for programming have been fully resting. When I started working, I will find that the problem is now able to solve it. 5. The desire for the answer. The history of human nature science is a process of eager to get the answer, even if you can only know a small part of the answer, we pay for us. As long as you firmly believe, you must find the answer to the question, you will pay energy to explore, even if you don't get answers, you will learn a lot during the process. 6. More than others. Three people must have my teacher, maybe in a conversation with others, you can explore the inspirational spark. Many up-to-go, see what others' views on the same issue will give you a lot of inspiration. 7. Good programming style. Pay attention to develop a good habit, the indential arrangement of the code, the naming rules of the variable should always be consistent. Everyone knows how to exclude the error in the code, but often ignore the missed troubleshooting. Note is an important part of the program, which makes your code easier to understand, and if the code has clearly expressed your thoughts, you don't have to add any comments. If the comments and code are inconsistent, it is even worse. 8. Toughness and perseverance. This may be the "master" and general programmers the biggest difference. A Good Programmingis 99 Weat and 1 ffee. Masters are not genius, they are hone in countless daysday night. Success can bring us extremely joy, but the process is incomparably boring.

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

New Post(0)