In the process of project development, market personnel are often eager to write, but they still cannot catch up with the progress. Everyone feels very tired, but not very effective. What should we do? I think this situation can be avoided. To put it back, at least it should not look like this. Here are some of my experiences and experiences:
1. Frequent SummaryComplete the common code of the module and encapsulate it into methods or components for future calls.
For example, data access, xml configuration operations, paging controls, data verification, encryption, and so on are all summarized into independent modules or components. You can call them when using them, it takes a lot of time for the project and more time to process the business logic.
2. simplify complex services
For some complex business systems, you can simply abstract them into simple models and turn them into easy-to-understand business models. Why are we so complicated to solve problems in a simple way. We develop software to solve the problem, not to make a show.
3. clear thinking, concise code, and easy to read. Especially important for team development.
I don't know what's wrong with some programmers. Personal heroism is very heavy and code writing is strange. It seems to express my extraordinary experience and a high level of technology. In fact, I think as a team development, this will bring great risks to enterprises. At the same time, I personally think this is not a good coding habit, because writing code is also a way for people to express their thoughts, it is the most challenging to express the problems that people can easily understand with the least words and the most incisive words. It's just as if people wear clothes and pay attention to cleanliness. If they don't pay attention to cleanliness, they feel as bad as they do.
4. Pay attention to high cohesion and low coupling. Reduce the coupling between modules and extract common modules. Each module is like a block. In this way, if you can make full use of these resources, you will get twice the result with half the effort. Save time and effort. The role permission management module I summarized is like this. Many projects have been used, saving me a lot of time and creating a lot of benefits for the company.
5. design the architecture.A good architecture will give developers a clear orientation, and won't let programmers do too much useless and repetitive work and rework. In addition, good scalability design will provide a good response to the needs of stable projects.
6. Use typical development modes such as OOP and hierarchical developmentTo a certain extent, reduce duplication and enhance scalability.
7. Try to adopt mature and reliable technologies.
There are two ways to understand this sentence,
I. AdoptionMost SuitableInstead of selecting the "most advanced" technology. You cannot use technology because you use technology ". The consequences it brings to the project are immeasurable, and risks are also high, and even delays. Of course, it is still good to learn it well, but it should be well considered in commercial applications.
Ii. Use existingMature mode or codeDon't create a car on your own. To shorten the development cycle and reduce risks. Therefore, we need a certain degree of "tailism" during normal development, which is nothing bad. On the contrary, it should be a wise choice.
8. Learn to change the world.
After writing a program for a long time, I got into the habit of using as much code as possible, so the code that can be shared is generally written as shared, this reduces the amount of code. In addition, through certain abstract processes, I have summarized certain rules and successfully developed one. net (C #) Code Automatic Generator tool. Basically, I tried a system with over 20 tables. Within 20 minutes, I completed the construction of a three-tier architecture, 80% of the Code is generated. If this process is manual, I think it will take a week or two to make it more efficient. Human progress begins with the use of tools. We need to make better progress than manufacturing tools to replace humans and change the world. In fact, our lives can be wonderful.
(Author: Li Tianping, please note)