jgs CSC 309 Software Engineering II Lecture 07: Code Review II Dr. Javier Gonzalez-Sanchez [email protected] users.csc.calpoly.edu/~javiergs | javiergs.com Building 14 -227 Office Hours: By appointment
jgs Fall 2022 | 00000001 Summary (par 1 /2 ) § Check Javadoc for Classes and Methods § Check to name classes, methods, and variables. § Be suspicious of any static element and ask, Does this really need to be static? Static is dangerous and can drive you to the Structural Programming model, and you want to do Object-Oriented. § Is it DRY? § Is it KIS?
jgs Fall 2022 | 00000001 Summary (par 1 /2 ) § Check connections (inheritance, having, using) § Are these global variables needed as global? § Should this be delegation or inheritance? § Be careful about what is shared on the Blackboard. Blackboard is dangerous; it can make you forget encapsulation and drive you to the everyone have access to everything approach. § Check for Observer pattern misuse or overuse
jgs Fall 2022 | 00000001 Summary (par 1 /2 ) § Single Responsibility. Is this my responsibility, or is it some other class responsibility? § Do not be afraid to Delegate or be an Observer The more complex your units (methods), the more complex it will be to test them. Therefore, the more prone to errors they are.
jgs Fall 2022 | 00000001 Last But not Least § Take care of your user. § Using your software must be an experience that they enjoy. § Do not make them suffer – trying to figure out what is happening or what to do next
jgs CSC 309 Software Engineering II Lab 07: Code Review Dr. Javier Gonzalez-Sanchez [email protected] users.csc.calpoly.edu/~javiergs | javiergs.com Building 14 -227 Office Hours: By appointment
jgs CSC 309 Software Engineering II Javier Gonzalez-Sanchez, Ph.D. [email protected] Winter 2023 Copyright. These slides can only be used as study material for the class CSC308 at Cal Poly. They cannot be distributed or used for another purpose.