http://tr.im/nf_ead_all
Agile vs Waterfall is not binary - spectrum
e.g. Pure Waterfall -> BDUF -> Some DUF -> Agile/Emergent Design -> Cowboy Hacking
BDUF is a lossy compression algorithm
486DX: FPU
486SX: broken FPU - not designed, emerged
iPod - have to buy new design - hardware can't be refactored
Software Design
finding abstractions & patterns
idiomatic patterns
- nomenclature - give it a name
- technical patterns - e.g. transactions handling
- domain patterns
patterns describe abstractions
Abstracting too early
- speculation w/- facts
- YAGNI
- Business processes change
- how do you know when to abstract?
-- experience helps
-- spike solutions
Emergent Design
What is software design
Jack C. Reeves = C++ Journal 1992
Software "engineering"
final goal of engineering is documentation, given to manufacturing team
what is design do in s/w?
- complete source code
source == design
software is cheap to build
manufacturing team == build process
cheapness leads to complex design
Emergent Design
discovering design in code
finding effective abstractions - techincal/domain
ability to harvest idiomatic patterns
Things that obscure emergent design
Complexity
- essential complexity (inherent) vs accidental complexity (externally imposed)
-- e.g. complexity spectrum: Hunting season -> field-level security -> EJB/Biztalk
-- accidental: "just in case"
Technical Debt
- Can't avoid debt but can negotiate repayment
- must convince it exists
- start conversation
- use demonstration, trumps discussion
- e.g. cyclo complexity chart
Rampant Genericness
Helpers
Test Driven Design
- more about design than testing
- design emerges from tests
- atomic understanding of intent
- better abstractions
- less accidental complexity
- test after doesn't expose design flaws as easily
Refactoring
- collective code ownership
- fix broken windows
- fix obsolescent abstracting
- prudently refactor aggressively
-- Tech Debt backlog if > 15 mins to fix
-- Pair just doing tech debt backlog
- code should get stronger with age
Cyclomatic Complexity
- e - n + 2
Afferent Coupling
- incoming references to class
- CKJM
- e.g. Struts param - couldn't predict complexity
Expressiveness
- complex languages hurt readability
- comments not executable, out-of-date
- idiomatic "unit of work" pattern
- Java - comand pattern vs Groovy - closure
Abstraction Styles
- imperative: structured/modular OO
- functional
- anti-objects: collaborative diffusion
-- The metaphor of objects can go too far by making us try to create objects that are too much inspired by the real world
-- e.g. "PacMan smell" - put the main computation into the maze
Application Architecture
- course-grained
Framework Level Architecture
- library
- JSR 277: abandonware
- JSR 294: superpackage, jigsaw, Java 7
Enterprise Architecture
- city planning
Application Architecture
- Building planning
Extant Definitions
- Architecture = stuff hard to change later - should be as little as possible
Architecture Considerations
- Politics
- Build or buy (myth)
- Most Business process are not commotitisable
- software = strategic competitive advantage
build/buy
- strategic/overhead?
- strategic - build
- overhead - functional/extensible? buy
Dietzler's Law
- 80% fast/easy
- 10% difficult
- 10% impossible
- user wants 100%
Standards-based vs standardization
- e.g. J2EE: good for devs, bad for vendors
- SQL standard very weak - good for vendors
- ESB not standardised - vendors don't want it to be
Irrational Artifact Attachment
- longer it takes to create an artifact (e.g. Visio diagram) more attached people become, less likely to change
Last Responsible Moment
- Do we have to make decision now?
- How can we make it reversible?
- How can we defer decision?