83
1 AntiPatterns AntiPatterns Hausi A. Müller Hausi A. Müller University of Victoria University of Victoria Software Architecture Course Software Architecture Course Spring 2000 Spring 2000

antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

11

AntiPatternsAntiPatterns

Hausi A. MüllerHausi A. MüllerUniversity of VictoriaUniversity of Victoria

Software Architecture CourseSoftware Architecture CourseSpring 2000Spring 2000

Page 2: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 22

OverviewOverview

nn MotivationMotivationnn Reference modelReference modelnn Software Development AntiPatternsSoftware Development AntiPatternsnn Software Architecture AntiPatternsSoftware Architecture AntiPatternsnn Software Management AntiPatternsSoftware Management AntiPatternsnn SummarySummary

Page 3: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 33

ReferenceReference

nn Brown, Brown, MalveauMalveau, McCormick III, , McCormick III, MowbrayMowbrayAntiPatterns: AntiPatterns: Refactoring Refactoring Software, Software, Architectures, and Projects in CrisisArchitectures, and Projects in CrisisJohn Wiley & Sons, 1998John Wiley & Sons, 1998

Page 4: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 44

Origins of AntiPatternsOrigins of AntiPatterns

nn The majority of published works in The majority of published works in software sciences have focused on software sciences have focused on positive and constructive solutionspositive and constructive solutions

nn AntiPatterns are derived by looking at AntiPatterns are derived by looking at the negative solutionsthe negative solutions

nn Def. An AntiPattern describes a Def. An AntiPattern describes a commonly occurring solution to a commonly occurring solution to a problem that generates decidedly problem that generates decidedly negative consequences.negative consequences.

Page 5: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 55

Origins of AntiPatternsOrigins of AntiPatterns

nn A manager or developerA manager or developer•• does not know any betterdoes not know any better•• does not have sufficient knowledge or does not have sufficient knowledge or

experience solving a particular problemexperience solving a particular problem•• applied a perfectly good design pattern in applied a perfectly good design pattern in

the wrong contextthe wrong context

Page 6: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 66

AntiPatterns and Software AntiPatterns and Software EvolutionEvolution

nn AntiPatterns are particularly prevalent AntiPatterns are particularly prevalent during longduring long--term software maintenance term software maintenance and evolutionand evolution

nn A software reengineer needs to assess A software reengineer needs to assess the presence or absence of AntiPatterns the presence or absence of AntiPatterns in a legacy system to be able to in a legacy system to be able to implement the best reengineering implement the best reengineering strategystrategy

nn Refacturing Refacturing present AntiPatterns present AntiPatterns wiwi

Page 7: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 77

AntiPatterns and Software AntiPatterns and Software Evolution ...Evolution ...

nn PremisePremise•• Recognition of AntiPatterns will make you Recognition of AntiPatterns will make you

a better software engineera better software engineer•• RefacturingRefacturing AntiPatterns present in a AntiPatterns present in a

legacy system’s project will result in a legacy system’s project will result in a better, more successful, less risky software better, more successful, less risky software reengineering projectreengineering project

Page 8: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 88

State of AffairsState of Affairs

nn Five out of six software projects are Five out of six software projects are considered unsuccessfulconsidered unsuccessful

nn One third of all software projects are One third of all software projects are canceledcanceled

nn For delivered systems the actual budget For delivered systems the actual budget and time is double than expectedand time is double than expected

nn Silver bullets ...Silver bullets ...

Page 9: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 99

Old Silver BulletsOld Silver Bullets

nn Structured programmingStructured programmingnn TopTop--down designdown designnn Open systemsOpen systemsnn Client/server architecturesClient/server architecturesnn Quality code generation from models Quality code generation from models nn Object orientationObject orientationnn GUI buildersGUI buildersnn FrameworksFrameworks

Page 10: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 1010

New Silver BulletsNew Silver Bullets

nn Component technologiesComponent technologiesnn Distributed objectsDistributed objectsnn Business objectsBusiness objectsnn PatternsPatternsnn Software reuseSoftware reusenn Scripting languagesScripting languagesnn Software agentsSoftware agentsnn NetworkNetwork--centric computingcentric computingnn Web interfaceWeb interface

Page 11: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 1111

AntiPattern StructureAntiPattern Structure

nn Description of the general formDescription of the general formnn Symptoms on how to recognize the Symptoms on how to recognize the

general formgeneral formnn Causes that led to the general formCauses that led to the general formnn Consequences of the general formConsequences of the general formnn Refactored solution on how to change Refactored solution on how to change

the AntiPattern into a healthier situationthe AntiPattern into a healthier situation

Page 12: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 1212

AntiPatternsAntiPatterns

nn A method for efficiently mapping a A method for efficiently mapping a general situation to a specific class of general situation to a specific class of solutionssolutions

nn Provide realProvide real--world experience in world experience in recognizing recurring problems in the recognizing recurring problems in the software industry and provide a detailed software industry and provide a detailed remedy for the most common remedy for the most common predicamentspredicaments

nn Provide a common vocabularyProvide a common vocabularyfor identifying problems andfor identifying problems anddiscussing solutionsdiscussing solutions

Page 13: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 1313

AntiPattern CategoriesAntiPattern Categories

nn Development AntiPatternsDevelopment AntiPatternsnn Architectural AntiPatternsArchitectural AntiPatternsnn Managerial AntiPatternsManagerial AntiPatternsnn AntiPatterns apply to software AntiPatterns apply to software

construction as well as software construction as well as software evolutionevolution

Page 14: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 1414

Lava FlowLava Flow

nn ProblemProblem•• DeadDead--code and forgotten design code and forgotten design

information is frozen in an everinformation is frozen in an ever--changing changing designdesign

•• Oh that! Well Ray and Emil (they’re no Oh that! Well Ray and Emil (they’re no longer with the company) wrote that routine longer with the company) wrote that routine back when Jim (who left last month) was back when Jim (who left last month) was trying a workaround for Irene’s input trying a workaround for Irene’s input processing code (she’s in another processing code (she’s in another department now).department now).

Page 15: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 1515

Lava Flow ...Lava Flow ...

nn ProblemProblem•• Lead engineer leftLead engineer left•• New lead had better approach but was New lead had better approach but was

nervous about deleting stuff until he was nervous about deleting stuff until he was more familiar with the codemore familiar with the code

•• Each volcanic eruption leaves lava streamsEach volcanic eruption leaves lava streams–– DDE leveragedDDE leveraged–– OLE1, OLE2OLE1, OLE2–– Support for Java 1.1Support for Java 1.1–– Support for Support for JavaBeansJavaBeans

Page 16: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 1616

Lava Flow ...Lava Flow ...

nn CausesCauses•• R&D code moved to production with CMR&D code moved to production with CM•• Uncontrolled distribution of unfinished or Uncontrolled distribution of unfinished or

unpolished codeunpolished code•• Trial approaches have not been eliminated Trial approaches have not been eliminated

from the codefrom the code•• Architectural scars due to old middlewareArchitectural scars due to old middleware

Page 17: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 1717

Lava Flow ...Lava Flow ...

nn SolutionSolution•• Configuration management system which Configuration management system which

identifies and eliminates dead codeidentifies and eliminates dead code•• Evolve or refactor designEvolve or refactor design•• Sound architecture must proceed Sound architecture must proceed

production code developmentproduction code development•• Establish stable system level interfacesEstablish stable system level interfaces

Page 18: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 1818

Swiss Army Knife or Swiss Army Knife or Kitchen SinkKitchen Sink

nn ProblemProblem•• Excessively complex class interfaceExcessively complex class interface•• Designer attempts to provide for all possible Designer attempts to provide for all possible

uses of the classuses of the class•• Complicated interfaceComplicated interface•• Many overloaded namesMany overloaded names•• Excessive regression test suitesExcessive regression test suites•• Several Swiss Army Knifes in a single Several Swiss Army Knifes in a single

designdesign

Page 19: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 1919

Swiss Army Knife or Swiss Army Knife or Kitchen Sink ...Kitchen Sink ...

nn Refactored solutionRefactored solution•• Provide guidelines for using complicated Provide guidelines for using complicated

standards or interfacesstandards or interfaces•• Provide a template for exception handlingProvide a template for exception handling•• Contract interfacesContract interfaces

Page 20: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 2020

Design PatternDesign Pattern

nn ProblemProblem•• ContextContext•• Applicable design forcesApplicable design forces

nn The role of the solutionThe role of the solution•• To resolve the design forces to generate To resolve the design forces to generate

some benefits, consequences, and followsome benefits, consequences, and follow--on problemson problems

nn Must occur at least three timesMust occur at least three times

Page 21: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 2121

TemplateTemplate

nn A consistent outline for the pattern A consistent outline for the pattern documentation that ensures consistent documentation that ensures consistent and adequate coverage of the solution, and adequate coverage of the solution, design forces, and other consequencesdesign forces, and other consequences

nn Justification of the pattern and Justification of the pattern and prediction of its consequencesprediction of its consequences

Page 22: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 2222

Essence of an AntiPatternEssence of an AntiPattern

nn Two solutions instead of a problem and Two solutions instead of a problem and a solutiona solution•• Problematic solution which generates Problematic solution which generates

negative consequencesnegative consequences•• Refactored solution, a method to resolve Refactored solution, a method to resolve

and reengineer the AntiPatternand reengineer the AntiPattern

nn A pattern in an inappropriate contextA pattern in an inappropriate context

Page 23: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 2323

Relation between Patterns Relation between Patterns & AntiPatterns& AntiPatterns

nn Design patterns often evolve into an Design patterns often evolve into an AntiPatternAntiPattern

nn Procedural programming was a great Procedural programming was a great design pattern in the 60’s and 70’sdesign pattern in the 60’s and 70’s

nn Today it is an AntiPatternToday it is an AntiPatternnn ObjectObject--oriented programming is today a oriented programming is today a

practiced pattern ...practiced pattern ...

Page 24: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 2424

Relation between Patterns Relation between Patterns & AntiPatterns& AntiPatterns

Context & ForcesContext & Forces

ProblemProblem

SolutionSolution

BenefitsBenefits

RelatedRelatedSolutionsSolutionsConsequencesConsequences

RefactoredRefactoredSolutionSolution

SymptomsSymptomsConsequencesConsequences

AntiPatternAntiPatternSolutionSolution

Context & CausesContext & Causes

BenefitsBenefitsRelatedRelatedSolutionsSolutions

ConsequencesConsequences

[AP99][AP99]

Page 25: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 2525

RefactoringRefactoringA Useful AntiPatternA Useful AntiPattern

nn An approach for evolving the solution An approach for evolving the solution into a better oneinto a better one

nn This process of change, migration, or This process of change, migration, or evolution is called refactoring in the evolution is called refactoring in the AntiPattern communityAntiPattern community

Page 26: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 2626

AntiPattern ViewpointsAntiPattern Viewpoints

nn DeveloperDeveloper•• Situations encountered by programmersSituations encountered by programmers

nn ArchitectArchitect•• Common problems in system structureCommon problems in system structure

nn ManagerManager•• Affect people in all software rolesAffect people in all software roles

Page 27: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 2727

Reference ModelReference Model

nn Root causesRoot causes•• provide fundamental context for the provide fundamental context for the

AntiPatternAntiPattern

nn Primal forcesPrimal forces•• are the key motivators for decision makingare the key motivators for decision making

nn Software designSoftware design--level modellevel model•• define architectural scales; each pattern define architectural scales; each pattern

has a most applicable scalehas a most applicable scale

Page 28: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 2828

Root CausesRoot Causes

nn HasteHaste•• hasty decisions compromise qualityhasty decisions compromise quality•• code that appears to work is acceptablecode that appears to work is acceptable•• testing is ignoredtesting is ignored

nn ApathyApathy•• lack of partitioninglack of partitioning•• ignoring the separation of concerns (e.g., ignoring the separation of concerns (e.g.,

stable vs. replaceable design)stable vs. replaceable design)

Page 29: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 2929

Root Causes (cont.)Root Causes (cont.)

nn NarrowNarrow--mindednessmindedness•• refusal of known or accepted solutionsrefusal of known or accepted solutions•• reluctance to use metadatareluctance to use metadata

nn SlothSloth•• poor decision based on an easy answerpoor decision based on an easy answer•• frequent interface changesfrequent interface changes•• lack of configuration controllack of configuration control•• reliance on generating stubs and skeletonsreliance on generating stubs and skeletons

Page 30: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 3030

Root Causes (cont.)Root Causes (cont.)

nn AvariceAvarice•• architectural avaricearchitectural avarice——modeling of modeling of

excessive detailsexcessive details•• excessive complexity due to insufficient excessive complexity due to insufficient

abstractionabstraction•• overly complex systems are difficult to overly complex systems are difficult to

develop, integrate, test, maintain, extenddevelop, integrate, test, maintain, extend

Page 31: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 3131

Root Causes (cont.)Root Causes (cont.)

nn IgnoranceIgnorance•• failing to seek understandingfailing to seek understanding•• antonym of analysis paralysisantonym of analysis paralysis•• focussing on code interfaces rather than focussing on code interfaces rather than

system interfacessystem interfaces•• no layeringno layering•• no wrapping to isolate detailsno wrapping to isolate details

Page 32: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 3232

Root Causes (cont.)Root Causes (cont.)

nn PridePride•• notnot--inventedinvented--here syndromehere syndrome•• unnecessary invention of new designsunnecessary invention of new designs•• reinventing the wheelreinventing the wheel•• rewrite from scratchrewrite from scratch•• ignoring requirementsignoring requirements•• ignoring COTS, freeware, existing legacy ignoring COTS, freeware, existing legacy

systemsystem

Page 33: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 3333

ForcesForces

nn Forces or concerns that exist within a Forces or concerns that exist within a decisiondecision--making processmaking process

nn Forces that are addressed lead to Forces that are addressed lead to benefitsbenefits

nn Forces that remain unresolved lead to Forces that remain unresolved lead to consequencesconsequences

nn For any given software problem there For any given software problem there are a number of forces that can are a number of forces that can influence a given solutioninfluence a given solution

Page 34: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 3434

Forces ...Forces ...

nn Vertical forcesVertical forces•• Domain specificDomain specific•• Unique to a particular Unique to a particular situtationsitutation

nn Horizontal forcesHorizontal forces•• Applicable across multiple domainsApplicable across multiple domains•• Influence design and reengineering choice Influence design and reengineering choice

across several software modules and across several software modules and componentscomponents

•• Choices made elsewhere may impact local Choices made elsewhere may impact local choiceschoices

Page 35: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 3535

Primal Forces ...Primal Forces ...

nn Horizontal forces are called primal Horizontal forces are called primal forcesforces

nn Present in nearly all design or Present in nearly all design or reengineering situationsreengineering situations

nn Keep architecture and development on Keep architecture and development on track or synchronizedtrack or synchronized

nn A fundamental value system for A fundamental value system for software architectssoftware architects

Page 36: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 3636

Primal Forces ...Primal Forces ...

nn Management of functionalityManagement of functionality•• Meeting the requirementsMeeting the requirements

nn Management of performanceManagement of performance•• Meeting required speed and operationMeeting required speed and operation

nn Management of complexityManagement of complexity•• Defining abstractionsDefining abstractions

nn Management of changeManagement of change•• Controlling the evolution of the softwareControlling the evolution of the software

Page 37: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 3737

Primal Forces ...Primal Forces ...

nn Management of IT resourcesManagement of IT resources•• People and IT artifactsPeople and IT artifacts

nn Management of technologyManagement of technology•• Controlling technology evolutionControlling technology evolution

Page 38: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 3838

Primal Forces ...Primal Forces ...

nn Management of IT resourcesManagement of IT resources•• People and IT artifactsPeople and IT artifacts

nn Management of technologyManagement of technology•• Controlling technology evolutionControlling technology evolution•• Wayne GretzkyWayne Gretzky

Page 39: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 3939

Software DevelopmentSoftware DevelopmentAntiPatternsAntiPatterns

nn The BlobThe Blobnn Continuous obsolescenceContinuous obsolescencenn Lava FlowLava Flownn Ambiguous viewpointAmbiguous viewpointnn Functional decompositionFunctional decompositionnn PoltergeistsPoltergeistsnn Boat AnchorBoat Anchor

Page 40: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 4040

Software DevelopmentSoftware DevelopmentAntiPatterns (cont.)AntiPatterns (cont.)

nn Golden HammerGolden Hammernn Dead EndDead Endnn Spaghetti CodeSpaghetti Codenn Input KludgeInput Kludgenn Walking through a MinefieldWalking through a Minefieldnn CutCut--andand--Paste ProgrammingPaste Programmingnn Mushroom ManagementMushroom Management

Page 41: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 4141

The BlobThe Blob

nn ProblemProblem•• Procedural style design leads to one object Procedural style design leads to one object

with a lion’s share of the responsibilitieswith a lion’s share of the responsibilities•• Most other objects only hold dataMost other objects only hold data•• This is the class that is really the heart of This is the class that is really the heart of

our architectureour architecture•• One class monopolizes the processing and One class monopolizes the processing and

the others encapsulate datathe others encapsulate data

Page 42: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 4242

The Blob ...The Blob ...

nn CausesCauses•• Lack of an objectLack of an object--oriented architectureoriented architecture•• Lack of architecture enforcementLack of architecture enforcement•• Procedural design expert are chief Procedural design expert are chief

architectsarchitects•• Wrapping a legacy system resultsWrapping a legacy system results

in a Blob … acceptablein a Blob … acceptable

Page 43: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 4343

The Blob ...The Blob ...

nn SolutionSolution•• Distribute responsibilities more uniformlyDistribute responsibilities more uniformly•• Isolate the effect of changesIsolate the effect of changes•• Identify or categorize attributes and Identify or categorize attributes and

operationsoperations•• Find “natural homes” for the identified Find “natural homes” for the identified

classesclasses•• Remove outliersRemove outliers

Page 44: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 4444

Continuous ObsolescenceContinuous Obsolescence

nn ProblemProblem•• Technology is changing rapidlyTechnology is changing rapidly•• Developers have difficulty keeping upDevelopers have difficulty keeping up•• Product releases don’t work togetherProduct releases don’t work together

nn SolutionSolution•• Open systems standardsOpen systems standards•• Use consortium standards since they Use consortium standards since they

represent industry consensusrepresent industry consensus•• Stable system interfaces to separate Stable system interfaces to separate

concernsconcerns

Page 45: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 4545

Ambiguous ViewpointAmbiguous Viewpoint

nn ProblemProblem•• OOA&D models often do not explain their OOA&D models often do not explain their

viewpointviewpoint•• Often implementation viewOften implementation view——least usefulleast useful

nn SolutionSolution•• Provide different viewpointsProvide different viewpoints•• Separation of concernsSeparation of concerns•• Interfaces, db, application codeInterfaces, db, application code

Page 46: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 4646

Functional DecompositionFunctional Decomposition

nn ProblemProblem•• Result of experienced, nonResult of experienced, non--oo developersoo developers•• Procedural design in an oo languageProcedural design in an oo language•• ClassClass--based versus objectbased versus object--oriented codeoriented code•• Complex and clever codeComplex and clever code

nn SolutionSolution•• ObjectObject--oriented redesignoriented redesign•• Package data and methodsPackage data and methods•• Separation of concernsSeparation of concerns

Page 47: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 4747

PoltergeistsPoltergeists

nn ProblemProblem•• Classes with limited roles or life cyclesClasses with limited roles or life cycles•• Start a process for another objectStart a process for another object

nn SolutionSolution•• Refactor into longerRefactor into longer--lived objectslived objects•• Package data and methodsPackage data and methods

Page 48: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 4848

Boat AnchorBoat Anchor

nn ProblemProblem•• A piece of software that does not serve a A piece of software that does not serve a

useful purpose on the current projectuseful purpose on the current project•• A costly acquisition which management is A costly acquisition which management is

reluctant to let goreluctant to let go

nn SolutionSolution•• Ditch the anchorDitch the anchor

Page 49: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 4949

Golden HammerGolden Hammer

nn ProblemProblem•• A familiar and proven technology or A familiar and proven technology or

concept that is applied obsessively to concept that is applied obsessively to many software problemsmany software problems

nn SolutionSolution•• Expand the knowledge of developers Expand the knowledge of developers

through courses, training, booksthrough courses, training, books•• Expose developers to alternative Expose developers to alternative

technologies and approachestechnologies and approaches

Page 50: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 5050

Dead EndDead End

nn ProblemProblem•• Modifying a reusable component even if it Modifying a reusable component even if it

is no longer maintained or supported by is no longer maintained or supported by the supplierthe supplier

•• Amount of maintenance increases Amount of maintenance increases significantlysignificantly

nn SolutionSolution•• Outsource rather than import maintenanceOutsource rather than import maintenance

Page 51: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 5151

Spaghetti CodeSpaghetti Code

nn ProblemProblem•• Most famous AntiPatternMost famous AntiPattern•• Many complexity measure have been Many complexity measure have been

invented to assess itinvented to assess it•• Common for programmer who cannot Common for programmer who cannot

abstractabstract

nn SolutionSolution•• Many automatic tools availableMany automatic tools available

Page 52: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 5252

CutCut--and Paste Programmingand Paste Programming

nn ProblemProblem•• Software clonesSoftware clones•• “Hey, I thought you fixed that bug already, “Hey, I thought you fixed that bug already,

so why is it doing this again?”so why is it doing this again?”•• “Wow, you guys work fast. Over 400KLOC “Wow, you guys work fast. Over 400KLOC

in three weeks is amazing!”in three weeks is amazing!”•• Degenerate form of reuseDegenerate form of reuse•• Very common in COBOLVery common in COBOL

Page 53: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 5353

CutCut--and Paste Programming ...and Paste Programming ...

nn SolutionSolution•• Clone detectionClone detection•• Parameterize typesParameterize types•• Introduce an additional level of indirectionIntroduce an additional level of indirection•• Exploit polymorphismExploit polymorphism•• Dynamic schemasDynamic schemas

Page 54: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 5454

Software Architecture Software Architecture AntiPatternsAntiPatterns

nn Autogenerated StovepipeAutogenerated Stovepipenn Stovepipe EnterpriseStovepipe Enterprisenn JumbleJumblenn Stovepipe SystemStovepipe Systemnn Cover Your AssetsCover Your Assetsnn Vendor LockVendor Lock--ininnn Wolf TicketWolf Ticket

Page 55: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 5555

Software Architecture Software Architecture AntiPatterns (cont.)AntiPatterns (cont.)

nn Architecture By ImplicationArchitecture By Implicationnn Warm BodiesWarm Bodiesnn Design By CommitteeDesign By Committeenn Swiss Army KnifeSwiss Army Knifenn Reinvent the WheelReinvent the Wheelnn The Grand Old Duke of YorkThe Grand Old Duke of York

Page 56: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 5656

Autogenerated StovepipeAutogenerated Stovepipe

nn ProblemProblem•• Migrating an existing system to a Migrating an existing system to a

distributed systemdistributed system•• Converting existing software interfaces to Converting existing software interfaces to

distributed interfacesdistributed interfaces•• Existing interfaces use fineExisting interfaces use fine--grain datagrain data•• ImplementationImplementation--specific subsystem specific subsystem

interdependenciesinterdependencies

Page 57: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 5757

AutogeneratedAutogenerated Stovepipe ...Stovepipe ...

nn SolutionSolution•• Reengineer interfacesReengineer interfaces•• Define a separate, largerDefine a separate, larger--grain object grain object

modelmodel•• The interoperability among subsystems The interoperability among subsystems

constitutes the core of the new designconstitutes the core of the new design•• Aim for stable interfaces; even more Aim for stable interfaces; even more

important for distributed systems than for important for distributed systems than for standalone systemsstandalone systems

Page 58: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 5858

Stovepipe EnterpriseStovepipe Enterprise

nn ProblemProblem•• Islands of automationIslands of automation•• Stovepipe Enterprise is characterized by a Stovepipe Enterprise is characterized by a

software structure that inhibits changesoftware structure that inhibits change•• Must be constantly repairedMust be constantly repaired•• Changes are done one island at a timeChanges are done one island at a time•• Brittle, monolithic system architectures (usually Brittle, monolithic system architectures (usually

undocumented)undocumented)•• Inability of systems to interoperateInability of systems to interoperate

Page 59: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 5959

Stovepipe Enterprise ...Stovepipe Enterprise ...

nn SolutionSolution•• Product lines (SEI) Product lines (SEI) •• Identify requirements for the enterpriseIdentify requirements for the enterprise•• Identify specification documents for the enterpriseIdentify specification documents for the enterprise•• Coordination of technologies at several levelsCoordination of technologies at several levels•• Identify common standards and migration direction Identify common standards and migration direction

with a standard reference modelwith a standard reference model•• Usage conventions across systemsUsage conventions across systems•• Detailed interoperability conventions across Detailed interoperability conventions across

systemssystems

Page 60: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 6060

Design by CommitteeDesign by Committee

nn ProblemProblem•• Gold Plating, Standards Disease, Make Gold Plating, Standards Disease, Make

Everybody Happy, Political PartyEverybody Happy, Political Party•• Project team are egalitarian; everyone has Project team are egalitarian; everyone has

equal say; decisions are democraticequal say; decisions are democratic•• The majority rule leads to diffusion of The majority rule leads to diffusion of

abstraction and excess complexityabstraction and excess complexity•• “A camel is a horse designed by a “A camel is a horse designed by a

committee.”committee.”

Page 61: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 6161

Design by Committee ...Design by Committee ...

nn SymptomsSymptoms•• Design documentation is voluminousDesign documentation is voluminous•• The requirements do not converge and are The requirements do not converge and are

unstableunstable•• Design meetings are slow, concentrate on Design meetings are slow, concentrate on

details, and avoid big picture discussionsdetails, and avoid big picture discussions•• Decisions are only made in meetingsDecisions are only made in meetings•• No prioritization of design featuresNo prioritization of design features

Page 62: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 6262

Design by Committee ...Design by Committee ...

nn CausesCauses•• No designated project architectNo designated project architect•• Ineffective meeting facilitationIneffective meeting facilitation•• The suggestions of all committee members The suggestions of all committee members

are incorporated to keep everybody happyare incorporated to keep everybody happy•• No separation of concernsNo separation of concerns

Page 63: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 6363

Design by Committee ...Design by Committee ...

nn Refactored solutionRefactored solution•• Reform the meeting processReform the meeting process•• Why are we here?Why are we here?•• What outcomes do we want?What outcomes do we want?•• Assign explicit rolesAssign explicit roles

–– Owner, facilitator, architect, developer, tester, Owner, facilitator, architect, developer, tester, domain expertdomain expert

–– “My specialty is being right when other people “My specialty is being right when other people are being wrong.” are being wrong.” —— George Bernard ShawGeorge Bernard Shaw

Page 64: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 6464

Design by Committee ...Design by Committee ...

nn Employ Spitwads meeting processEmploy Spitwads meeting process•• Ask questionAsk question——How can we improve performance?How can we improve performance?•• Write down answer silentlyWrite down answer silently•• Toss spitwads à la Michael JordanToss spitwads à la Michael Jordan•• Redistribute, read, and record spitwadsRedistribute, read, and record spitwads•• Reach common understandingReach common understanding•• Eliminate duplicatesEliminate duplicates•• Prioritize by votingPrioritize by voting•• Discuss highest priority selectionsDiscuss highest priority selections

Page 65: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 6565

Design by Committee …Design by Committee …

nn SQL exampleSQL example•• SQL89SQL89——115 pages115 pages•• SQL92SQL92——580 pages580 pages•• SQL3SQL3——still not complete; may never be fully still not complete; may never be fully

implemented; a dumping ground for implemented; a dumping ground for advanced database featuresadvanced database features

•• Better solutionsBetter solutions•• Open Database Connectivity (ODBC)Open Database Connectivity (ODBC)•• Java Database Connectivity (JDBC)Java Database Connectivity (JDBC)

Page 66: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 6666

Reinvent the WheelReinvent the Wheel

nn ProblemProblem•• Our problem is uniqueOur problem is unique•• Developers have minimal knowledge of Developers have minimal knowledge of

each other’s codeeach other’s code•• Building systems from the ground up even Building systems from the ground up even

though related legacy systems existthough related legacy systems exist•• The existence of legacy systems is the The existence of legacy systems is the

norm rather than the exceptionnorm rather than the exception•• Lack of program families or product linesLack of program families or product lines

Page 67: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 6767

Reinvent the Wheel ...Reinvent the Wheel ...

nn SymptomsSymptoms•• Closed system architecturesClosed system architectures——no provision no provision

of reuse, interoperability, or change of reuse, interoperability, or change managementmanagement

•• Replication of COTS componentsReplication of COTS components•• Inability to deliver desired features on time Inability to deliver desired features on time

and within budgetand within budget•• Corporate knowledge is not leveragedCorporate knowledge is not leveraged

Page 68: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 6868

Reinvent the Wheel ...Reinvent the Wheel ...

nn CausesCauses•• No communication and technology transfer No communication and technology transfer

among software development projectsamong software development projects•• Corporate knowledge is not leverageCorporate knowledge is not leverage•• No explicit architecture processNo explicit architecture process•• Lack of enterprise managementLack of enterprise management

Page 69: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 6969

Vendor LockVendor Lock--inin

nn SymptomsSymptoms•• “Our architecture is CORBA, Microsoft, “Our architecture is CORBA, Microsoft,

and Oracle.”and Oracle.”•• “We don’t have an architecture.”“We don’t have an architecture.”•• “We completely dependent on vendor X.”“We completely dependent on vendor X.”

Page 70: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 7070

Vendor LockVendor Lock--in …in …

nn ProblemProblem•• Loss of controlLoss of control

–– The product does not live up to expectationsThe product does not live up to expectations–– The features you need are always six months The features you need are always six months

awayaway–– The vendor changed the product and broke your The vendor changed the product and broke your

softwaresoftware

Page 71: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 7171

Vendor LockVendor Lock--in …in …

nn ProblemProblem•• Connector conspiracyConnector conspiracy

–– Vendors products hardly interoperateVendors products hardly interoperate–– Product versions proliferateProduct versions proliferate–– Only certain versions work together, but not the Only certain versions work together, but not the

ones you boughtones you bought

Page 72: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 7272

Vendor LockVendor Lock--in …in …

nn SolutionSolution•• Isolation layer or firewallIsolation layer or firewall

Isolation layerIsolation layer

Vendor softwareVendor software

App1App1 App4App4App3App3App2App2

Page 73: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 7373

Software Management Software Management AntiPatternsAntiPatterns

nn Blowhard JamboreeBlowhard Jamboreenn Analysis ParalysisAnalysis Paralysisnn Viewgraph EngineeringViewgraph Engineeringnn Death By PlanningDeath By Planningnn Fear of SuccessFear of Successnn CorncobCorncobnn Intellectual ViolenceIntellectual Violence

Page 74: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 7474

Software Management Software Management AntiPatterns (cont.)AntiPatterns (cont.)

nn Irrational ManagementIrrational Managementnn Smoke and MirrorsSmoke and Mirrorsnn Project MisManagementProject MisManagementnn Throw it over the WallThrow it over the Wallnn Fire DrillFire Drillnn The FeudThe Feudnn EE--mail is dangerousmail is dangerous

Page 75: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 7575

Analysis ParalysisAnalysis Paralysis

nn Classic AntiPatternClassic AntiPatternnn “We need to redo this analysis to make “We need to redo this analysis to make

it more objectit more object--oriented.”oriented.”nn “We need to complete OOA&D before “We need to complete OOA&D before

we can start coding.”we can start coding.”nn “The design is not sufficiently detailed.”“The design is not sufficiently detailed.”nn “I have to know a lot more about the “I have to know a lot more about the

system before I can change anything.”system before I can change anything.”

Page 76: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 7676

Analysis Paralysis ...Analysis Paralysis ...

nn SymptomsSymptoms•• “Above all, strive for consistency and “Above all, strive for consistency and

completeness”completeness”•• Multiple project restartsMultiple project restarts——now we know now we know

enough/more and can do it right this timeenough/more and can do it right this time•• Source code holds the truth and the designSource code holds the truth and the design•• Overly complex analysis modelsOverly complex analysis models•• Identify design patterns at all costIdentify design patterns at all cost•• Waterfall process model is followedWaterfall process model is followed

Page 77: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 7777

Analysis Paralysis ...Analysis Paralysis ...

nn CausesCauses•• Waterfall process model is followedWaterfall process model is followed•• Management has more confidence in Management has more confidence in

analysts than implementersanalysts than implementers•• The goals of the analysis phase are not well The goals of the analysis phase are not well

defineddefined•• MicromanagementMicromanagement

Page 78: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 7878

Analysis Paralysis ...Analysis Paralysis ...

nn Refactored solutionRefactored solution•• Incremental developmentIncremental development•• Use spiral process model instead of waterfall Use spiral process model instead of waterfall

modelmodel——design a little, build a little; risk design a little, build a little; risk managementmanagement

•• Internal (middleware) and external (userInternal (middleware) and external (user--visible functionality) incrementsvisible functionality) increments

Page 79: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 7979

CorncobCorncob

nn SymptomsSymptoms•• Frequently “difficult” people obstruct and Frequently “difficult” people obstruct and

divert the software development processdivert the software development process

Page 80: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 8080

Corncob …Corncob …

nn CausesCauses•• StressStress•• PersonalityPersonality•• Hidden agendasHidden agendas

–– On Wall Street 75% of programmer compensation is On Wall Street 75% of programmer compensation is incentive bonusincentive bonus

–– In most industries, senior IT managers are competing with In most industries, senior IT managers are competing with each othereach other

–– Negative training or backgroundNegative training or background

•• Defensiveness: fear of the unknownDefensiveness: fear of the unknown•• Intellectual arsenic: obsession with a pet ideaIntellectual arsenic: obsession with a pet idea

Page 81: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 8181

Corncob …Corncob …

nn Refactored Refactored solutionsolution•• Responsibility: you raised the issue, fix itResponsibility: you raised the issue, fix it•• Corrective interviewCorrective interview•• Pizza partyPizza party•• Stress reductionStress reduction•• Reform policies and proceduresReform policies and procedures•• ReorganizationReorganization•• TerminationTermination

Page 82: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 8282

SummarySummary

nn AntiPatterns are normalAntiPatterns are normalnn Some AntiPatterns must be toleratedSome AntiPatterns must be tolerated

•• Accept those things you cannot change, have the Accept those things you cannot change, have the courage to change those things you can, and the courage to change those things you can, and the wisdom to know the difference. wisdom to know the difference. ——Serenity PrayerSerenity Prayer

nn Avoid the use of the Golden HammerAvoid the use of the Golden Hammer•• excessive use of one patternexcessive use of one pattern•• there are at least 192 software patternsthere are at least 192 software patterns•• 23 23 GoFGoF, 17 , 17 BuschmannBuschmann, 72 analysis,, 72 analysis,

38 CORBA, 42 38 CORBA, 42 antipatternsantipatterns

nn Consider a range of solutionsConsider a range of solutions

Page 83: antipatterns - fmi.wdfiles.comfmi.wdfiles.com/local--files/sdp2011/10.AntiPatterns(Part 1).pdf · Software Architecture 12 AntiPatterns nA method for efficiently mapping a general

Software ArchitectureSoftware Architecture 8383

Summary …Summary …

nn During maintenance and evolution one During maintenance and evolution one should be particularly aware of the should be particularly aware of the potential presence of AntiPatternspotential presence of AntiPatterns

nn Awareness of AntiPatterns is critical for Awareness of AntiPatterns is critical for reengineering projectsreengineering projects

nn Consider AntiPatterns next time you Consider AntiPatterns next time you sign on to a new projectsign on to a new project

nn Invest in reading the AntiPatterns bookInvest in reading the AntiPatterns book