Seven secrets of successful programmers
Author Merrion
7 items that make you become an excellent member of the developer community
1. Code the most common misunderstanding of the computer world is that the original code is for computer services. The computer is working on a low-level binary code, which is on a series of difficult to understand 1 or 0 or hexadecimal numbers instead of our structural advanced computer language. The purpose of these languages is developed to help us. In practice, the demand code for people usually means that there must be clear and transparent structures and ideas, followed by efficiency and speed.
2. Regular Note An Extreme Language Element Examples of the People's Demand Codes. Most compilers will leave the comment with the executable program. The purpose of the annotation is to tell you what the function of the program (or other future development) program is. Write these annotations - and avoid just simply reform code. Good Note: Disable Button to Prevent ITS Activation Wo Note: Set CMD = FALSE
The standard for a good inspection note is: If only the annotations are not removed, can someone know the role of your program?
3. Good code layout increases readability As a writer divides a book into sections and paragraphs to help read, the developer considers how the code can enhance the readability of the code. Especially in any statement block (such as IF..THEN ... ELSE statement fast) and any loop structure (such as while ... End While) code should be indented so that it is easy to distinguish where is the beginning.
4. Predict and handle what you can't think about you before you open a file, make sure the file is the current file. Before you set the focus to the control, determine whether the control is visible and available. Try to find out what conditions make your code, and test it before you crash.
5. Name variable enhancement readability has many policies to make variables naming. The primary principle is consistency and as much as possible with sufficient information by named variables. If you name a variable is nmonth, the information you provide to the programmer is what this variable will be designed to store what content. I am inclined to use Hungary's naming style - but no matter which style you use, consistency is the most important.
6. Keep your method and process to make a simple method or process ideals should only be a thing. In my experience, the biggest misunderstanding is, a process is usually designed to complete a lot of different operations. They should be split into different methods to handle their respective things, so that each function can be easily reused, and the code changes in each method are also easy to understand.
7. Appropriate methods and variables Use range function and variables If only in one component is used, it should not be seen outside of that component. If the variable is only designed for a method or process, then it should not be seen in that method or process. This avoids any variable or method in its meaningless place.
There are many other tips and techniques that make you have become a better programmer, which will make you more efficient and your program is more maintenance, but the seven secrets listed above will be a good Basics - however, allow you to be highly constructed above them.