1. Before the requirements are clarified, there is no need to develop, this is a taboo
2. The development time should be increased by at least 1.2 times the estimated demand time
3. Clarify the original intention of the requester; clarify whether this development will be developed according to its task assignment or independently developed
4. Although there is no technology that cannot be realized, there is still time to introduce new technologies Cost and labor costs as well as subsequent maintenance costs are extremely high; it is impossible to provide the most perfect technical architecture within a suitable time, but it is necessary to come up with an industry standard solution that is controllable within the unit cost time; technology Whoever introduces it is responsible
5. Git provides a large number of log records. Unless under special circumstances, it is generally necessary to avoid introducing non-statement comments. Comments must be meaningful
6. Large chunks Code segment reuse must be encapsulated. Large code segments can be C/V directly, but detailed statements must be read through and checked.
7. The way to write code is not to write a little bit and then test a little bit. It is to organize the steps in your heart and write a basic version for testing and modification. Just writing a sentence of code and testing it is an entry-level approach for primary school students.
8. The code environment must be independent; the code must be hosted using distributed Git or GitLab; and there must be backup habits, manage permissions and branches, and allocate operations according to the principle of least permissions; code Branch management is divided into development branch, test branch, pre-release branch, online master branch, and hotfix bug repair branch. Only hotfix can be directly merged into the main Master branch. For the code environment, development is the development branch; testing is the test branch, business branch and pre-release black box environment. Each environment is an independent box, and people with relevant content should have corresponding permissions.
9. Technology development is first of all the selection of talents. Development means responsibility and trust in talents. You must be responsible for the content developed. Content that has not been tested is prohibited from being published. Posting casually without passing the test Review, design, joint discussion, and written content will not be published in the official environment and are only allowed to be released in the test environment and within. The joint and several liability arising from non-compliance shall be borne by the claimant.
10. In a startup company or during a mission, the goal is to quickly produce results, produce products, and get started quickly. The priority of the architecture is lower than the launch date, so rapid iteration is particularly important; technical architecture must have dedicated personnel Forcibly implemented, if there is already a coding style, it will be developed according to the previous style.
11. Product managers are the proposers of requirements. The estimated development time comes from their own development speed, understanding and concentration on development tasks, as well as what the demander can provide. Weigh the time, and finally give the corresponding development time based on 60% of your own development capabilities plus 40% of the time given by the developer.
12. Code reusability, beauty and readability cannot be achieved in one go; it must have a certain scale, reuse the places that can be reused, abstract the places that can be abstracted, and provide More superior solutions require superior algorithms. Solving problems is important, but code reuse and structure readability are also very important. The ratio between the two is still 6 to 4. Functions should be implemented first, and then the introduction of specific specifications should also be strengthened.
For more PHP related technical articles, please visit the PHP Tutorial column to learn!
The above is the detailed content of 12 pieces of advice from a five-year back-end development veteran to newbies. For more information, please follow other related articles on the PHP Chinese website!