hunting for antipatterns · autogenerated stovepipe stovepipe enterprise jumble stovepipe system...

23
OXFORD SOFTWARE ENGINEERING Consulting Software Engineers © OSEL 2012 Page 1 of 21 Hunting for Antipatterns June 2012 C. C. Shelley OXFORD SOFTWARE ENGINEERING Ltd 9 Spinners Court, 53 West End, Witney, Oxfordshire OX28 1NH www.osel.co.uk [email protected] Tel. +44 (0) 1993 700878

Upload: others

Post on 03-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 1 of 21

Hunting for Antipatterns

June 2012

C. C. ShelleyOXFORD SOFTWARE ENGINEERING Ltd9 Spinners Court, 53 West End,Witney,OxfordshireOX28 [email protected]. +44 (0) 1993 700878

Page 2: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 2 of 21

Objective

• To persuade you to hunt for antipatterns

– it is a productive, fun way of better understanding and improving software and ways of working

Page 3: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 3 of 21

Objective

• To persuade you to hunt for antipatterns

– it is a productive, fun way of better understanding and improving software and ways of working

( but (0) can be dangerous )

Page 4: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 4 of 21

What are they?....

• Antipatterns are mutant offspring of patterns...

• ...which were invented by Christopher Alexander (1977) as: ”solutions to [design] problems [described] in such a way that you can use the solution a million times over without ever doing it the same way twice.”

• In the s/w world patterns became hopelessly trendy after the GOF 'Design Patterns' book (1995) was published

• Antipatterns are solutions that don't work

Page 5: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 5 of 21

So ?

• Antipatterns are a refreshing alternative – suggesting what not to do, amid the cacophony telling us what to do.

• They are more powerful than patterns:

– “There's no situation so bad that an anti-pattern can't make it worse.”

from http://c2.com/cgi/wiki?AntiPattern

– it only takes one to cause damage

• Technically, it is quicker to un/dis/reimplement (?) – stop doing bad things; it can be easier and cheaper than starting to do (even more) good things, but (1) ....

Page 6: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 6 of 21

....And

• Hunting for antipatterns provides the opportunity to identify chronic issues and problems before working on their solutions (the Study/Check of P D S/C A)

• Antipatterns provide an opportunity to validate improvement and transformation initiatives:

– Do these initiatives eliminate or fix antipatterns?– If not, what do they do?

• ....and finding them is fun

Page 7: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 7 of 21

”The point isn't as much to say 'don't do this' as it is to say 'you probably don't even realize that you're doing this, but it doesn't work”....

from http://c2.com/cgi/wiki?AntiPattern

Page 8: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 8 of 21

But (2) there is a problem....

• What does 'anti' mean?

– There are a number of types....

Page 9: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 9 of 21

opposite (not)

contrary(anti)

doublenegative

S - S

- S S

Based on Algirdas Greimas' 'semiotic square', which is adescendant of Aristotle's 'square of opposition'

Page 10: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 10 of 21

Some published s/w APs

Development:

The Blob Continuous obsolescence Lava Flow Ambiguous viewpoint Functional decomposition Poltergeists Boat Anchor Golden Hammer Dead End Spaghetti Code Input Kludge Walking through a Minefield Cut-and-Paste Programming Mushroom Management

Architecture:

Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies Design By Committee Kitchen Sink Reinvent the Wheel The Grand Old Duke of York

Management:

Blowhard Jamboree Analysis Paralysis Viewgraph Engineering Death By Planning Fear of Success Corncob Intellectual Violence Irrational Management Smoke and Mirrors Project Mismanagement Throw it over the Wall Fire Drill The Feud E-mail is dangerous

Page 11: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 11 of 21

Due to...

Haste Architectural Apathy Narrow-mindedness Sloth Architectural Avarice Ignorance Pride External Forces

(meta antipatterns ?)

....by another GOF

Page 12: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 12 of 21

But (3)....

• Don't accept others' antipatterns uncritically, because:

– 'COTS' APs (like patterns)• come with their own baggage and tend to polarize opinion• can be facile / common sense / bleedin' obvious....• can be inappropriate to your organizational context, culture,

business drivers, philosophy– need not do damage,– they are context sensitive

– By finding your own you give yourself the opportunity to look critically at:

• what and why we do things this way• w.r.t. 'not' or 'anti'• and act

Page 13: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 13 of 21

How to find them....

• AP Recognition– Not easy, APs aren't,

simply:• mistakes• 'don't likes'• 'doesn't works'

– They are established solutions to problems – that don't work

– Often hidden 'in plain view'– Or 'givens'– Usually owned by <the

organization>

– ...and revealing them can disturb the status quo

Page 14: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 14 of 21

....How to find them....

But (1 - again): “ It should be borne in mind that there is nothing more difficult to handle, more doubtful of success, and more dangerous to carry through than initiating changes in a state’s constitution. The innovator makes enemies of all those who prospered under the old order, and only lukewarm support is forthcoming from those that would prosper under the new. Their support is lukewarm partly from fear of their adversaries, who have the existing laws on their side, and partly because men are generally incredulous, never really trusting new things unless they have tested them by experience. In consequence, whenever those who oppose the changes can do so they attack vigorously, and the defence made by the others only lukewarm. So both the innovator and his friends come to grief. ”

Machiavelli: The Prince, Part VI

Page 15: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 15 of 21

....How to find them

• Allow people to find them:– 'officially'

• easier said than done– conservative organizations– prudent individuals– most can't/won't (but some will - and have already)

• awareness - that there are antipatterns• permission - to recognize/propose/discuss/acknowledge• action - to deal with them

• Retrospectives are one good (partial) mechanism for this– Legitimate, more or less safe, reflective forum providing i/p to

change activity....– ....but (4) difficult to sustain

Page 16: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 16 of 21

Your AP candidates ?

( and how do you detect them ? )

Page 17: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 17 of 21

Some of mine:

Projects

Transparency / Visibility

Open Communications

Good people

Testing

Rewards

aTeams

Acceptable amnesia

Production as design

Design as production

Pragmatism

Complete models

Faith

Lost in code

Page 18: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 18 of 21

Nearly finally....

• Do consider looking for Anti Patterns....

....”but you must be careful; for, if your Snark is a Boojum, then you will softly and suddenly vanish away, and never be met with again.”

Page 19: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 19 of 21

....Finally finally

• ....and hunt for 'Ante Patterns' too:– wot

• they are pattern precursors – emerging patterns• aka profects* (anti defects, undefects)• trigger emotional response – pleasure, bafflement, envy,

irritation....• some reveal as 'elegance', 'cool hack'....• some show up in tech reviews/inspections/walkthroughs –

and disrupt them• usually missed or lost by <org>• they are rare, but worth hunting too – they are valuable• 'cool hunter' role

* see www.osel.co.uk/papers/profects.pdf

Page 20: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 20 of 21

Page 21: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 21 of 21

O X F O R DS O F T W A R E E N G I N E E R I N G

L I M I T E D

9 Spinners Court, 53 West End,Witney,

OxfordshireOX28 1NH

[email protected]. +44 (0) 1993 700878

Page 22: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 22 of 21

Page 23: Hunting for Antipatterns · Autogenerated Stovepipe Stovepipe Enterprise Jumble Stovepipe System Cover Your Assets Vendor Lock-in Wolf Ticket Architecture By Implication Warm Bodies

OXFORD SOFTWARE ENGINEERINGConsulting Software Engineers

© OSEL 2012 Page 23 of 21

Pattern format:

from Alexander...

– a brief statement of context to which pattern applies

– then a description of the problem to which the pattern applies

– followed by a Pattern description that elaborates the problem

– then the solution is described – ”Therefore....”

– ...and the rationale