SlideShare a Scribd company logo
1 of 2
Download to read offline
©2014. All rights reserved. Girish Suryanarayana, Ganesh Samarthyam, Tushar Sharma. 
Based on "Refactoring for software design smells: Managing Techincal Debt", Morgan Kaufmann/Elsevier, 2014. 
http://amzn.com/0128013974 
A checklist for design reviews 
Manual design reviews are effective in finding smells in design. Use this checklist when you are reviewing UML diagrams (mainly class diagrams) or code. Please note that these are merely indicators of potential problems - you need to dig deeper and analyze further to confirm if they are actual problems or not. 
Abstraction 
1. "Encoded strings" or "clumps of primitive types" are used instead of an abstraction (i.e., a class or an interface) 
2. There are one method classes with the following characteristics: a) class name and method names are same b) the class is a stand-alone class and c) there are no other methods or data members 
3. Interrelated methods are provided together in the class or interface 
4. The class or interface has "too many methods" 
5. The members in class or interface is "non-cohesive" 
6. The class or interface has only constants 
7. The class or interface is empty or has just one or two members with the class "not doing much" 
8. The class all of its methods delegating its calls to another class (i.e., the class serves as an "agent class") 
9. The class or interface is not used by any other classes in the codebase (i.e., unreachable) 
10. The interface or abstract class has no types derived from it 
11. Classes or interfaces with the same name are present in different packages/sub-packages 
12. Classes or interfaces with the same members are present in the same codebase 
Encapsulation 
13. Data member(s) in the class has public access 
14. The members (methods or fields) are provided with more lenient access specifiers (e.g., public instead of protected or private access) 
15. A class has globally accessible static data member 
16. The class returns handle to one or more of its internal data structures through public methods 
17. Public method(s) reveal implementation details 
18. The class hierarchy exhibits "nested generalizations", i.e., the first level in a inheritance hierarchy factors one generalization and the further levels "multiples out" all possible combinations. 
19. The code uses explicit type checks using switch or chained if-else statements
©2014. All rights reserved. Girish Suryanarayana, Ganesh Samarthyam, Tushar Sharma. 
Based on "Refactoring for software design smells: Managing Techincal Debt", Morgan Kaufmann/Elsevier, 2014. 
http://amzn.com/0128013974 
Modularization 
20. The class has only (non-static) data members 
21. The members of a class or interface (that ideally should have been localized into that type) are separated and spread across multiple classes or interfaces 
22. One or more methods in a class are more interested in another class, potentially showing misplaced methods. 
23. The class or interface has huge number of public members 
24. The class has method(s) with excessive cyclomatic complexity 
24. The class has circular references 
25. The class has very high fan-in as well as fan-out 
Hierarchy 
26. The code has switch or chained if-else statements for selecting behavior based on encoded type values (e.g., enumerations) 
27. The class has a tag field that indicates the flavor of the instance 
28. None of the derived classes in a hierarchy override methods from the base class 
29. An abstract class or interface has only one concrete type realizing it 
30. Sibling classes in a hierarchy share a significant amount of code 
31. Derived classes (at the same level) in a hierarchy have duplicate code segments 
32. Base class and derived class share duplicate code segments 
33. Number of operations added by a derived type is very high (suggesting that some intermediate types between the derived type and its base type could be missing) 
34. A base type has large number of immediate derived types 
35. The inheritance hierarchy looks like a "list" (i.e., each type has only zero or one derived type) 
36. Classes in the inheritance hierarchy do not have any polymorhic methods (i.e., overridable methods) 
37. The inheritance hierarchy is very deep 
38. Method(s) in a derived class reject a base class method (by providing an empty method body, by throwing an exception, by printing "should not implement" message, or by returning an error value indicating that the method is not supported) 
39. The base and derived classes do not share a IS-A relationship 
40. A derived type (directly and indirectly) inherits from one or more base types leading to unnecessary inheritance paths in the hierarchy 
41. A base type in a hierarchy has a reference to one of its derived types

More Related Content

Viewers also liked

SOLID Principles and Design Patterns
SOLID Principles and Design PatternsSOLID Principles and Design Patterns
SOLID Principles and Design PatternsGanesh Samarthyam
 
Towards a Principle-based Classification of Structural Design Smells
Towards a Principle-based Classification of Structural Design SmellsTowards a Principle-based Classification of Structural Design Smells
Towards a Principle-based Classification of Structural Design SmellsTushar Sharma
 
Pragmatic Technical Debt Management
Pragmatic Technical Debt ManagementPragmatic Technical Debt Management
Pragmatic Technical Debt ManagementTushar Sharma
 
Refactoring for Software Design Smells: Managing Technical Debt
Refactoring for Software Design Smells: Managing Technical DebtRefactoring for Software Design Smells: Managing Technical Debt
Refactoring for Software Design Smells: Managing Technical DebtTushar Sharma
 
Applying Design Principles in Practice
Applying Design Principles in PracticeApplying Design Principles in Practice
Applying Design Principles in PracticeTushar Sharma
 
Tools for refactoring
Tools for refactoringTools for refactoring
Tools for refactoringTushar Sharma
 
Why care about technical debt?
Why care about technical debt?Why care about technical debt?
Why care about technical debt?Tushar Sharma
 
PHAME: Principles of Hierarchy Abstraction Modularization and Encapsulation
PHAME: Principles of Hierarchy Abstraction Modularization and EncapsulationPHAME: Principles of Hierarchy Abstraction Modularization and Encapsulation
PHAME: Principles of Hierarchy Abstraction Modularization and EncapsulationTushar Sharma
 
Tools for Identifying and Addressing Technical Debt
Tools for Identifying and Addressing Technical DebtTools for Identifying and Addressing Technical Debt
Tools for Identifying and Addressing Technical DebtTushar Sharma
 
Infographic - Pragmatic Technical Debt Management
Infographic - Pragmatic Technical Debt ManagementInfographic - Pragmatic Technical Debt Management
Infographic - Pragmatic Technical Debt ManagementTushar Sharma
 
Working Effectively With Legacy Code
Working Effectively With Legacy CodeWorking Effectively With Legacy Code
Working Effectively With Legacy CodeNaresh Jain
 

Viewers also liked (11)

SOLID Principles and Design Patterns
SOLID Principles and Design PatternsSOLID Principles and Design Patterns
SOLID Principles and Design Patterns
 
Towards a Principle-based Classification of Structural Design Smells
Towards a Principle-based Classification of Structural Design SmellsTowards a Principle-based Classification of Structural Design Smells
Towards a Principle-based Classification of Structural Design Smells
 
Pragmatic Technical Debt Management
Pragmatic Technical Debt ManagementPragmatic Technical Debt Management
Pragmatic Technical Debt Management
 
Refactoring for Software Design Smells: Managing Technical Debt
Refactoring for Software Design Smells: Managing Technical DebtRefactoring for Software Design Smells: Managing Technical Debt
Refactoring for Software Design Smells: Managing Technical Debt
 
Applying Design Principles in Practice
Applying Design Principles in PracticeApplying Design Principles in Practice
Applying Design Principles in Practice
 
Tools for refactoring
Tools for refactoringTools for refactoring
Tools for refactoring
 
Why care about technical debt?
Why care about technical debt?Why care about technical debt?
Why care about technical debt?
 
PHAME: Principles of Hierarchy Abstraction Modularization and Encapsulation
PHAME: Principles of Hierarchy Abstraction Modularization and EncapsulationPHAME: Principles of Hierarchy Abstraction Modularization and Encapsulation
PHAME: Principles of Hierarchy Abstraction Modularization and Encapsulation
 
Tools for Identifying and Addressing Technical Debt
Tools for Identifying and Addressing Technical DebtTools for Identifying and Addressing Technical Debt
Tools for Identifying and Addressing Technical Debt
 
Infographic - Pragmatic Technical Debt Management
Infographic - Pragmatic Technical Debt ManagementInfographic - Pragmatic Technical Debt Management
Infographic - Pragmatic Technical Debt Management
 
Working Effectively With Legacy Code
Working Effectively With Legacy CodeWorking Effectively With Legacy Code
Working Effectively With Legacy Code
 

Similar to A Checklist for Design Reviews

Similar to A Checklist for Design Reviews (20)

Lecture 8 Library classes
Lecture 8 Library classesLecture 8 Library classes
Lecture 8 Library classes
 
Java interview questions
Java interview questionsJava interview questions
Java interview questions
 
Java interview questions and answers
Java interview questions and answersJava interview questions and answers
Java interview questions and answers
 
LectureNotes-02-DSA
LectureNotes-02-DSALectureNotes-02-DSA
LectureNotes-02-DSA
 
C# question answers
C# question answersC# question answers
C# question answers
 
Suga java training_with_footer
Suga java training_with_footerSuga java training_with_footer
Suga java training_with_footer
 
Faqs in java
Faqs in javaFaqs in java
Faqs in java
 
Java/J2EE interview Qestions
Java/J2EE interview QestionsJava/J2EE interview Qestions
Java/J2EE interview Qestions
 
C# interview quesions
C# interview quesionsC# interview quesions
C# interview quesions
 
Interface
InterfaceInterface
Interface
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
Inheritance
InheritanceInheritance
Inheritance
 
C# interview questions
C# interview questionsC# interview questions
C# interview questions
 
Micro Anti-patterns in Java Code
Micro Anti-patterns in Java CodeMicro Anti-patterns in Java Code
Micro Anti-patterns in Java Code
 
Core java interview faq
Core java interview faqCore java interview faq
Core java interview faq
 
116824015 java-j2 ee
116824015 java-j2 ee116824015 java-j2 ee
116824015 java-j2 ee
 
Core java questions
Core java questionsCore java questions
Core java questions
 
Core java questions
Core java questionsCore java questions
Core java questions
 
Basic concept of class, method , command line-argument
Basic concept of class, method , command line-argumentBasic concept of class, method , command line-argument
Basic concept of class, method , command line-argument
 
Selenium Training .pptx
Selenium Training .pptxSelenium Training .pptx
Selenium Training .pptx
 

More from Tushar Sharma

House of Cards: Code Smells in Open-source C# Repositories
House of Cards: Code Smells in Open-source C# RepositoriesHouse of Cards: Code Smells in Open-source C# Repositories
House of Cards: Code Smells in Open-source C# RepositoriesTushar Sharma
 
The tail of two source-code analysis tools - Learning and experiences
The tail of two source-code analysis tools - Learning and experiencesThe tail of two source-code analysis tools - Learning and experiences
The tail of two source-code analysis tools - Learning and experiencesTushar Sharma
 
Designite: A Customizable Tool for Smell Mining in C# Repositories
Designite: A Customizable Tool for Smell Mining in C# RepositoriesDesignite: A Customizable Tool for Smell Mining in C# Repositories
Designite: A Customizable Tool for Smell Mining in C# RepositoriesTushar Sharma
 
Writing Maintainable Code
Writing Maintainable Code Writing Maintainable Code
Writing Maintainable Code Tushar Sharma
 
FOSDEM - Does your configuration code smell?
FOSDEM - Does your configuration code smell?FOSDEM - Does your configuration code smell?
FOSDEM - Does your configuration code smell?Tushar Sharma
 
Achieving Design Agility by Refactoring Design Smells
Achieving Design Agility by Refactoring Design SmellsAchieving Design Agility by Refactoring Design Smells
Achieving Design Agility by Refactoring Design SmellsTushar Sharma
 
Does your configuration code smell?
Does your configuration code smell?Does your configuration code smell?
Does your configuration code smell?Tushar Sharma
 
Designite – Software Design Quality Assessment Tool
Designite – Software Design Quality Assessment ToolDesignite – Software Design Quality Assessment Tool
Designite – Software Design Quality Assessment ToolTushar Sharma
 
Does Your Configuration Code Smell?
Does Your Configuration Code Smell?Does Your Configuration Code Smell?
Does Your Configuration Code Smell?Tushar Sharma
 
Technical debt - The elephant in the room
Technical debt - The elephant in the roomTechnical debt - The elephant in the room
Technical debt - The elephant in the roomTushar Sharma
 
Understanding software metrics
Understanding software metricsUnderstanding software metrics
Understanding software metricsTushar Sharma
 
Does your design smell?
Does your design smell?Does your design smell?
Does your design smell?Tushar Sharma
 
Refactoring for Design Smells - ICSE 2014 Tutorial
Refactoring for Design Smells - ICSE 2014 TutorialRefactoring for Design Smells - ICSE 2014 Tutorial
Refactoring for Design Smells - ICSE 2014 TutorialTushar Sharma
 

More from Tushar Sharma (13)

House of Cards: Code Smells in Open-source C# Repositories
House of Cards: Code Smells in Open-source C# RepositoriesHouse of Cards: Code Smells in Open-source C# Repositories
House of Cards: Code Smells in Open-source C# Repositories
 
The tail of two source-code analysis tools - Learning and experiences
The tail of two source-code analysis tools - Learning and experiencesThe tail of two source-code analysis tools - Learning and experiences
The tail of two source-code analysis tools - Learning and experiences
 
Designite: A Customizable Tool for Smell Mining in C# Repositories
Designite: A Customizable Tool for Smell Mining in C# RepositoriesDesignite: A Customizable Tool for Smell Mining in C# Repositories
Designite: A Customizable Tool for Smell Mining in C# Repositories
 
Writing Maintainable Code
Writing Maintainable Code Writing Maintainable Code
Writing Maintainable Code
 
FOSDEM - Does your configuration code smell?
FOSDEM - Does your configuration code smell?FOSDEM - Does your configuration code smell?
FOSDEM - Does your configuration code smell?
 
Achieving Design Agility by Refactoring Design Smells
Achieving Design Agility by Refactoring Design SmellsAchieving Design Agility by Refactoring Design Smells
Achieving Design Agility by Refactoring Design Smells
 
Does your configuration code smell?
Does your configuration code smell?Does your configuration code smell?
Does your configuration code smell?
 
Designite – Software Design Quality Assessment Tool
Designite – Software Design Quality Assessment ToolDesignite – Software Design Quality Assessment Tool
Designite – Software Design Quality Assessment Tool
 
Does Your Configuration Code Smell?
Does Your Configuration Code Smell?Does Your Configuration Code Smell?
Does Your Configuration Code Smell?
 
Technical debt - The elephant in the room
Technical debt - The elephant in the roomTechnical debt - The elephant in the room
Technical debt - The elephant in the room
 
Understanding software metrics
Understanding software metricsUnderstanding software metrics
Understanding software metrics
 
Does your design smell?
Does your design smell?Does your design smell?
Does your design smell?
 
Refactoring for Design Smells - ICSE 2014 Tutorial
Refactoring for Design Smells - ICSE 2014 TutorialRefactoring for Design Smells - ICSE 2014 Tutorial
Refactoring for Design Smells - ICSE 2014 Tutorial
 

Recently uploaded

Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationShrmpro
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 

Recently uploaded (20)

Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 

A Checklist for Design Reviews

  • 1. ©2014. All rights reserved. Girish Suryanarayana, Ganesh Samarthyam, Tushar Sharma. Based on "Refactoring for software design smells: Managing Techincal Debt", Morgan Kaufmann/Elsevier, 2014. http://amzn.com/0128013974 A checklist for design reviews Manual design reviews are effective in finding smells in design. Use this checklist when you are reviewing UML diagrams (mainly class diagrams) or code. Please note that these are merely indicators of potential problems - you need to dig deeper and analyze further to confirm if they are actual problems or not. Abstraction 1. "Encoded strings" or "clumps of primitive types" are used instead of an abstraction (i.e., a class or an interface) 2. There are one method classes with the following characteristics: a) class name and method names are same b) the class is a stand-alone class and c) there are no other methods or data members 3. Interrelated methods are provided together in the class or interface 4. The class or interface has "too many methods" 5. The members in class or interface is "non-cohesive" 6. The class or interface has only constants 7. The class or interface is empty or has just one or two members with the class "not doing much" 8. The class all of its methods delegating its calls to another class (i.e., the class serves as an "agent class") 9. The class or interface is not used by any other classes in the codebase (i.e., unreachable) 10. The interface or abstract class has no types derived from it 11. Classes or interfaces with the same name are present in different packages/sub-packages 12. Classes or interfaces with the same members are present in the same codebase Encapsulation 13. Data member(s) in the class has public access 14. The members (methods or fields) are provided with more lenient access specifiers (e.g., public instead of protected or private access) 15. A class has globally accessible static data member 16. The class returns handle to one or more of its internal data structures through public methods 17. Public method(s) reveal implementation details 18. The class hierarchy exhibits "nested generalizations", i.e., the first level in a inheritance hierarchy factors one generalization and the further levels "multiples out" all possible combinations. 19. The code uses explicit type checks using switch or chained if-else statements
  • 2. ©2014. All rights reserved. Girish Suryanarayana, Ganesh Samarthyam, Tushar Sharma. Based on "Refactoring for software design smells: Managing Techincal Debt", Morgan Kaufmann/Elsevier, 2014. http://amzn.com/0128013974 Modularization 20. The class has only (non-static) data members 21. The members of a class or interface (that ideally should have been localized into that type) are separated and spread across multiple classes or interfaces 22. One or more methods in a class are more interested in another class, potentially showing misplaced methods. 23. The class or interface has huge number of public members 24. The class has method(s) with excessive cyclomatic complexity 24. The class has circular references 25. The class has very high fan-in as well as fan-out Hierarchy 26. The code has switch or chained if-else statements for selecting behavior based on encoded type values (e.g., enumerations) 27. The class has a tag field that indicates the flavor of the instance 28. None of the derived classes in a hierarchy override methods from the base class 29. An abstract class or interface has only one concrete type realizing it 30. Sibling classes in a hierarchy share a significant amount of code 31. Derived classes (at the same level) in a hierarchy have duplicate code segments 32. Base class and derived class share duplicate code segments 33. Number of operations added by a derived type is very high (suggesting that some intermediate types between the derived type and its base type could be missing) 34. A base type has large number of immediate derived types 35. The inheritance hierarchy looks like a "list" (i.e., each type has only zero or one derived type) 36. Classes in the inheritance hierarchy do not have any polymorhic methods (i.e., overridable methods) 37. The inheritance hierarchy is very deep 38. Method(s) in a derived class reject a base class method (by providing an empty method body, by throwing an exception, by printing "should not implement" message, or by returning an error value indicating that the method is not supported) 39. The base and derived classes do not share a IS-A relationship 40. A derived type (directly and indirectly) inherits from one or more base types leading to unnecessary inheritance paths in the hierarchy 41. A base type in a hierarchy has a reference to one of its derived types