1. to properly decouple, but not to fully decouple, to learn to divide the module
2. find the root cause of the problem and not focus on solving the current problem
3. think first, then write the code
4. instead of using the original array, use boost:: Array
5. Use shared_ptr as much as possible
6. if the interface framework provides an MVC model, be sure to use the MVC approach to write
7. do not abuse inheritance, inheritance must have a logical relationship, is-a model, not for the convenience of some operations put everything in the base class, and then inherit, if it is for the convenience of operation, reuse code, you should encapsulate the code into a function
8.c++ inside if use coroutine, must remember to clean up resources
9. use boost_scope_exit to write down the resource cleanup code where the resource is requested, similar to the defer of Go
communication with people, if more than a certain degree of complexity, preferably with a design or frame diagram
Familiar with the English level of the team, in the use of English name variables or classes, remember to bring notes, if it is abbreviated, also bring Chinese comments
12.When usingMapThe time,key If int,string This basic type, preferably using typedef< Span style= "font-family: ' Microsoft Yahei ';" lang= "ZH-CN" to make it easy to see this keylist,vector similarly
. If the program needs to handle special processing, you should write comments, such as in a const class function, if you need const_cast<t*> (this), then write a comment to tell the user why to do this
Unified variables, functions of the noun name, such as scoring, some with score, some with judging , the whole project should be unified use a noun , to prevent confusion
instant communication, do not work
Real-time review Code
The MVC model is used to separate the data from the interface and then to test the data .
When the project is determined, the requirements are not determined, take a step-by-step look at the time, if you do not know who to manage the data, unified in the global , and then regularly organize the code
in a project, it's best to have a place where you can place global variables uniformly .
If the performance, memory requirements are not very strict, using vectors instead of list, because you will never expect the demand will have random read operations, then can only use std::advance to get
good use of STL algorithm, if you encounter STL data processing first see there is no corresponding STL algorithm
because the STL code can be very long, all can build a file to put the global macro definition, similar to QtGlobal file
. Do not skip to assign tasks, otherwise you will let subordinates do only the upper level of things
The excessive publicity of personal responsibility and punishment, this is some form of management laziness , which leads to many more mistakes, less do less mistakes, try not to do
Management engineers should be technically managed and let him acknowledge your skills when preparing to manage an engineer .
to cultivate subordinates ' ability to be serious
. The engineering catalogue should be made well
There is a place to save the improvement record .
Product and technology, can not be biased, both need to argue, and then to let everyone understand the two sides of the idea
you must know how to be mutually beneficial .
performance appraisal mainly faces the manager, avoids the quantification technology
. Weakening the boundaries of testing and development to guide skills interoperability
The test is not meant to shirk responsibility for development, but to help programmers find the problem and better solve the problem
A review of the problem of periodic collation remember that reflection is not looking for who is responsible but how to avoid the problem
Some messy stuff.