Saturday, August 31, 2013
Wednesday, August 28, 2013
Saturday, August 10, 2013
To Do's
- Try to insert const both in parameters and return values
- Make the ToString()'s in the specific events final
- Use DENY_COPY whenever possible
- Add a virtual dtor to the GlobalEvent class
- Use explicit for every constructor with at least one argument
- return reference to *this from assignment operators
- In the assignment operators, check for self assignment
- Create shared_ptr's in standalone statements and then pass
- Pass by reference-to-const for everything that is not built-in type, or STL iterator, or function object
- DO NOT return reference to a locally defined objects or reference to a heap-allocated one; if a new object needs to be returned return an object
- Make all data members private, never public or protected
- Postpone variable definition as long as possible
- Try avoiding dynamic_casts using virtual functions with a better design
- Try using declaration when you do not need definition through includes
- Avoid differentiating names by a single capital/small letter; avoid differentiating by 0, o, O, 1, l
- Understand the protocol well, ask why's as many as you can come up with.
- Each part of the code is implementing something of the protocol; so, find the connections between the code and the protocol.
- Only if a part of the protocol does not make sense, consult books on ds.
- Only if the code syntax or design does not make sense, consult c++ books.
Subscribe to:
Posts (Atom)