14 programming experiences summed up

1. If the performance is not good, deal with it in the application layer, not in the database layer.

Sorting and grouping is an example. It is always easier to operate performance improvements at the application layer than at the data layer. At this point, this is true whether it is a MySQL database on the server side or a sqlite database on the mobile device side. Let me explain to you: You will apply some specific query methods, although they can't reduce the client's response time, but they can still reduce the pressure on the database server, which can prevent the database from becoming a bottleneck for all clients.
2. Avoid concurrent operations

Sometimes it may be unavoidable, so you must know that the more powerful the function, the more complex the program will of course be. It's best to avoid confronting the thread. Be sure to deal with the problem at a higher level. Take the example of the ios system: GCD, dispatch and queue operations are our good helpers. One thing to understand is that the human brain does not have the function of reasoning about temporary storage and infinite situations. This is a painful lesson that I have experienced. I hope everyone can refer to it and use it.
3. Single responsibility, as few object states as possible, practicality is the last word.
4. Concise, combine, not aggregate
5. Try not to use comments in some places, because sometimes it will backfire.

With the passage of time, your comment may become outdated, but it is not right if you do not comment, as long as it is not a trivial matter, it is fine. Everyone must know how to grasp the degree, and that can be commented. That doesn't need a comment. In some places, we may have to write large notes, because human memory is always limited and may be forgotten after a day.
6. Don't make assumptions

Sometimes when you are working on a certain application, you will think, this should not be a problem, it may not take long for you to be angry with yourself, and ask yourself why you want to save trouble, and turning back will cost you the most. Therefore, when in doubt, be sure to actively test and actively verify.
7. When in doubt, actively discuss and communicate with your friends.
8. Don't, do the right thing, I think everyone understands.
9. Users aren't stupid, they just don't want to waste time learning about your so-called shortcuts.
10.

Sometimes a developer is not assigned to maintain the team that they have participated in the creation of, and if they find a problem, they cannot participate. They may feel that their previous efforts are not worth it, but when it is outdated, they find that the maintenance of those previous personnel has failed again. You have to get involved yourself when you have a problem, don't blame others, you have to understand that this is the rhythm that you will become a wiser professional programmer.
11. Before and after each project, you must have a to-do list.
12. Strive to be more positive about work so that we can find it interesting.
13.

Sometimes the crash of the system is still not seen by yourself, so you must do a good job of daily monitoring, keep a good monitoring log, avoid various abnormalities, and maintain the sensitivity of the system to faults and timely alerts.
14. Last point, remember to do your own essential work, deal with problems in a timely manner, and take appropriate countermeasures.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325493697&siteId=291194637