complex is easy -...

56
COMPLEX IS EASY, IT’S SIMPLE WHICH IS HARD

Upload: others

Post on 31-Dec-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

COMPLEX IS EASY, IT’S SIMPLE WHICH IS HARD

Page 2: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

SARAH TARAPOREWALLA

TECH PRINCIPAL @sarahtarap

Page 3: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

3

Let’s Explore

1 Complexity in the Real World

2 How does it happen?

3 The One About The Checkbox

4 The One About The Fortress

5 The One About The Article

6 The One about the Pricing Rules

@sarahtarap

Page 4: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

Complexity in the Real World

Page 5: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

Phot

o co

urte

sy o

f htt

ps://

ww

w.fl

ickr

.com

/pho

tos/

chiro

prac

tic/3

7324

9773

1/

Page 6: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap Phot

o co

urte

sy o

f htt

ps://

ww

w.la

may

or.o

rg/m

ayor

-gar

cett

i-unv

eils

-new

-eas

y-re

ad-p

arki

ng-s

igns

Page 7: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap Phot

o co

urte

sy o

f hht

tps:

//w

ww

.rd.c

om/a

dvic

e/sa

ving

-mon

ey/g

roce

ry-s

hopp

ing-

mis

take

s-th

at-a

re-w

astin

g-m

oney

/

Page 8: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

Phot

o co

urte

sy o

f htt

ps://

com

mon

s.w

ikim

edia

.org

/wik

i/File

:Vei

n_ar

t_ne

ar.p

ng

Page 9: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

Phot

o co

urte

sy o

f htt

p://

ww

w.s

tjohn

nsw

.com

.au/

Page 10: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

Phot

o co

urte

sy o

f htt

ps://

ww

w.c

row

dris

e.co

m/h

ands

only

cpr

Page 11: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

CYNEFIN FRAMEWORK

11

Phot

o co

urte

sy o

fhtt

ps://

en.w

ikip

edia

.org

/wik

i/Cyn

efin_

fram

ewor

k#/m

edia

/File

:Cyn

efin_

fram

ewor

k,_F

ebru

ary_

2011

_(2)

.jpeg

Page 12: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

How does it happen?

Page 13: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

2 6 8

Page 14: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

2 6 81 3 4

Page 15: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

2 6 81 3 42 5 7

Page 16: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

2 6 81 3 42 5 75 8 11

Page 17: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

2 6 81 3 42 5 75 8 11

x < y < z

Page 18: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

Phot

o co

urte

sy o

f htt

ps://

cdn.

pixa

bay.c

om/p

hoto

/201

4/03

/24/

17/1

6/br

ain-

2952

91_9

60_7

20.p

ng

Page 19: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap Phot

o co

urte

sy o

f htt

ps://

bett

erhu

man

s.co

ach.

me/

cogn

itive

-bia

s-ch

eat-s

heet

-55a

4724

76b1

8

Page 20: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

Page 21: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

Page 22: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

The One About The Checkbox

Page 23: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

SIMPLE CODE MANIFESTO

23

Composition Matchers

Tiny Types SRP

Decorators

Inheritance If-Then-Else Primitives Fat Objects Mixed Concerns

over over over over over

Page 24: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap starapor

Page 25: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

BOY SCOUT RULE

Phot

o co

urte

sy o

f htt

p://

disn

ey.w

ikia

.com

/wik

i/Rus

sell

Page 26: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

RED GREEN

REFACTOR

REFACTOR

26

Page 27: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

RED GREEN

REFACTOR

REFACTOR

27

REFACTOR REVERT

REFACTOR COMMIT

Page 28: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

Trailing commas in lists _matcher = new Matcher<Player> { { p => p.InPenaltyBox(), ReducePenaltyTime }, { p => p.WearingAHat(), RemoveTheHat }, { p => true, PlayARound }, };Brackets { } around conditionals

public void TakeTurn(Player player) { if (player.InPenaltyBox()) { ReducePenaltyTime(); }}

GOOD CITIZEN

28

Page 29: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

INTENTION REVEALING INTERFACES

29

IFooHandler => IHandleLotsOfFoos IGameRepository => ICanFindTheGame

Page 30: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

SIDE-EFFECT FREE CODE

30

Phot

o co

urte

sy o

f htt

ps://

xkcd

.com

/326

/

Page 31: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

SQUINT TEST

Phot

o co

urte

sy o

f htt

ps://

uplo

ad.w

ikim

edia

.org

/wik

iped

ia/e

n/7/

7b/S

nelle

n-m

yopi

a.pn

g

Page 32: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

SSimple Code

Manifesto

Page 33: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

The One About The Fortress

Page 34: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

JOB SECURITY

34

Phot

o co

urte

sy o

f htt

ps://

imgu

r.com

/gal

lery

/08Z

xbv0

Page 35: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

OPENNESS & COLLABORATION

35

Page 36: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

OOpenness

and Collaboration

Page 37: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

The One About The Article

Page 38: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

DOMAIN DRIVEN DESIGN

38

Page 39: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

UBIQUITOUS LANGUAGE

39

Phot

o co

urte

sy o

f htt

p://

pngi

mg.

com

/dow

nloa

d/51

770

Page 40: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

BOUNDED CONTEXTS

40

Phot

o co

urte

sy o

f htt

ps://

mar

tinfo

wle

r.com

/blik

i/Bou

nded

Cont

ext.h

tml

Page 41: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

DOMAIN DRIVEN DESIGN

41

Page 42: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

DOMAIN DRIVEN DESIGN

42

Page 43: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

UUbiquitous Language &

DDD

Page 44: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

The One About The Legacy

Page 45: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

EXPLAIN YOUR SYSTEM

Phot

o co

urte

sy o

f htt

p://

evan

.bot

tch.

com

/wp-

cont

ent/

uplo

ads/

2010

/06/

whi

tebo

ard.

jpg

Page 46: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

SIMON BROWN’S C4 MODEL

Page 47: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

DESIGN-ON-A-POST-IT

Phot

o co

urte

sy o

f htt

p://

evan

.bot

tch.

com

/wp-

cont

ent/

uplo

ads/

2010

/06/

whi

tebo

ard.

jpg

Page 48: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

PPost-it Design

Page 49: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

The One About The Pricing Rules

Page 50: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

GENERALISE

SPECIALISE

Page 51: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

SSpecialise to Generalise

Page 52: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

To Recap

Page 53: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

SSimple Code

Manifesto

OOpenness

and Collaboration

UUbiquitous Language &

DDD

PPost-it Design

SSpecialise to Generalise

Page 54: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

SARAH TARAPOREWALLA

@sarahtarap

SSimple Code

Manifesto

OOpenness

and Collaboration

UUbiquitous Language &

DDD

PPost-it Design

SSpecialise to Generalise

Page 55: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

@sarahtarap

Q&A

Page 56: COMPLEX IS EASY - AgileAus20agileaustralia.com.au/2019/slides/agileaus-2019-sarah-taraporewalla.… · 3 Let’s Explore 1 Complexity in the Real World 2 How does it happen? 3 The

THANKS FOR LISTENING @sarahtarap | [email protected]