SCNA 2009 - Grand Unified Theory of Software Design: Jim Weirich
When interviewing over the phone, what do you look for? Passion?
"What do you look for in a good design?" Criteria?
Coupling and Cohesion - Myers
7 types of coupling - less is good.
- Method has "flag" parameter that controls what algorithm to use
- Description includes "or" or "otherwise"
Two pieces of software share connascence when a change in one requires a corresponding
change in the other.
What Every Programmer Should Know About Object-Oriented Design (book). Section
2 predated UML - irrelevant. Updated version is:
Fundamentals of Object-Oriented Design in UML.
Locality matters when looking at connascence. As the distance between pieces increases,
you want weaker connascence.
Connascence of Name (CoN)
- Names (type, etc.) must agree
Connascence of Position (CoP)
- Ordering matters
- Number of elements is relevant (more than 2-3)
- CoP -> CoN
- CoN < CoP (matter of degree)
- Basic OO - named properties OK, long method signatures not so good, omittable keywords
Connascence of Meaning (CoM)
- Enums, constants take CoM -> CoN (good)
Things can't conflict with each other.
- Naming conflicts (namespaces)
- Two enums with same value
- Extension methods with same name
Connascence of Algorithm (CoA)
- Checksum generation code and checksum checking code
- Move to common method; share code (when possible)
Connascence of Timing (CoT)
- Race conditions
- Convert to atomic operations
Connascence of Execution (CoE)
- Ordering of steps in algorithm relevant
Connascence of Identity (CoI)
- Objects must be same object (uniquing)
Connascence of Value (CoV)
- Values are related; constraints
Your Host: firstname.lastname@example.org
Copyright © 2009 by William Sorensen. All rights reserved.