Note the following when writing a program:
1. Check whether the text editing box contains invalid characters. For the numeric type, you must determine whether it contains non-numeric values. For the character type, you must determine whether it is within the allowed characters.
2. for a period, you must determine whether the previous date is greater than the next one. We also need to judge the date of January. (The birth date in www.chinaren.com is not determined ). Do not slander me :)
3. For path selection, you must determine whether the path is valid and accessible. Whether the entered path length exceeds the maximum character length.
4. For the value to be written into the database, you must determine whether it exceeds the length defined by the field.
5. When writing data to a folder on the network, you must determine whether data can be written.
6. For the default data in the interface, the default value must be displayed, even if it is 0, because the software is not used by one person, others may not know.
7. When performing batch deletion, it is best to provide a Cancel button to give others a chance to regret it.
8. During a long period of operation, make sure to turn the mouse into a funnel model to let others know that your program is still running. It is best to use a progress bar to display the progress. Give the user the confidence to continue.
9. For menu items in the menu bar, it is best to make a shortcut on the toolbar. Users are too lazy to sit there without moving the keyboard or mouse, and your program can work.
10. The folders and files in the operating system are case-insensitive, but the code written in the program is case-sensitive. Especially when determining whether a file exists.
11. In an interface, buttons in the function set should be put together as much as possible.
12. Pay attention to concurrent access when calling DLL in multiple threads.
13. When writing data to the hard disk or database, it is best to write data to the buffer zone first and then write data at one time, which can speed up the process.
14. When naming a parameter, try to make it meaningful. Do not enter a, B or something everywhere .. Do not write too long for a function. Write more comments. When you leave, do something good for the people who come later.
I hope you can write down what you think you should pay attention to for your reference.