Several common mistakes made by programmers!

Introduction: Let's list a few mistakes that programmers often make when programming, for everyone to compare themselves.

image


User input


Never trust the user's input to the software. Programmers should assume that these people will enter invalid or even illegal data.


If they enter illegal data, the data in the software system will be destroyed.


The input to the user includes client-side verification as well as server-side verification. The client should inform the user that the input is invalid during verification.


In addition to the client-side verification, it must be verified again on the server. If the user disables JavaScript or other means on the client-side, prevent some malicious data from being stored in the system.


Manual test


Manual testing takes a lot of time, and some people find it annoying to test the full functionality of the application.


Computers are good at running repetitive tasks, so programmers should write unit tests to run the modules of the system, such as classes and related functions.


You can also write some end-to-end tests to check the behavior of the entire system to see if they are running well.


Skip document


If there is no documentation, no one can continue to work. We must write documentation that tells people how to perform operations, such as the configuration of local projects.


In addition, product documentation is needed to let people understand the function and purpose of the product.


The most important thing is that programmers should ensure that the documentation is the latest version to avoid people being misled by the old documentation.



Skip log


We must record the actions performed by the system so that we know what it is doing and can find out the cause of the problem when something goes wrong.


Using the error log, we can check for recurring errors, and be able to quickly locate and resolve them.


In addition, programmers should be able to track and audit user behavior and prevent any malicious activities through this ability.


Privileged user


Any privileged user has its destructive ability, such as modifying and deleting data. Even if there is a backup, the data must be restored, so think twice in this step.


If you are not careful or do not know what you are doing, you will still mess things up.


Disorganized configuration files


Configuration files should be placed in one place, so that you don't have to look for them everywhere, and it's easier to modify, so it's easier to protect them.


Don't hard code


image


Don't use hard coding in the code, you should replace it with constant or descriptive variable names.


Won't rest


To prevent burnout, programmers should take regular breaks. Resting can make people full of energy and think about problems in different ways.


We need to give ourselves a vacation, which is more productive than non-stop work. Too much work will mess up the work.


Learning too little


The computer and software industries are constantly changing and upgrading, and we should continue to learn in order to update our energy in the future.


Lifelong learning is already the main theme of today's era, you and I need to try it immediately. In order to avoid difficulties and stress, certain functions and projects must have deadlines.


If there is no deadline, learning may be more casual, but you need to be clear about the effect, and you can move forward at your own pace.


in conclusion


We don't know when development goes wrong, people are always too attached to their work, then they will make mistakes, and will have a negative impact on us in another way.


Let us always learn and move forward, not just for not being unemployed.



Guess you like

Origin blog.51cto.com/15127566/2664706