Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

212
Living Documentation cyrille martraire @cyriux

Transcript of Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Page 1: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Living Documentation

cyrille martraire!@cyriux

Page 2: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 3: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

And could improve your code too?

Page 4: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

a source of frustration

Page 5: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

not enough outdated

CONSUMING DOC

Page 6: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

boring task prefer coding

PRODUCING DOC

Page 7: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

we can do better…

Page 8: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

much betterGood Documentation also

leads to better Design

Page 9: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Passionate developer

PARIS Since 1999

!

@cyriuxCyrille Martraire

Page 10: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Paris Software Craftsmanship Community

http://www.meetup.com/paris-software-craftsmanship/

Page 11: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

TDDBDDDDDLegacy

Page 12: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Documentation

Page 13: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Documentation(sorry)

Page 14: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 15: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

USING MS OFFICE

Page 16: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

*NOT* CODING

Page 17: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

We love executable stuff

Page 18: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Documentation, usually.

Page 19: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Obsolete & Misleading

Page 20: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Not Agile

Page 21: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Documentation Sucks

Page 22: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

22

SO  WHY  U  TALK  OF  DOC?

Page 23: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

I’m happy with my life

I love my job

Back from nice vacations

Page 24: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

I’m happy with my life

I love my family

We’ve happy with our little boy

And recently back from nice vacations

WHY MAKE LIFE MISERABLE?

WHY RUIN THIS CONFERENCE WITH THIS TOPIC?

Page 25: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 26: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

If we adopt a new mindset

Page 27: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

What is documentation?

Question:

Page 28: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

What is documentation?

Page 29: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

What is documentation?the purpose of

Page 30: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Not just Javadoc Code Comments

MS Office

Page 31: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Passing Knowledge

to other peopleTransmission

Page 32: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Passing Knowledge

to other peopleMaking Accessible

Page 33: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Passing Knowledge

for the futureMemory

Page 34: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Passing Knowledge

for the futureCompliance

Page 35: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

KNOWLEDGE KNOWLEDGE KNOWLEDGE KNOWLEDGE

Page 36: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

DOCUMENTATION NEEDED

Long-run

Critical

Large Audience

Page 37: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

DOCUMENTATION NEEDED

No Waste

Page 38: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Imagine

Page 39: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 40: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 41: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

WHAT  FOR?

Page 42: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

For Sarah

She’s joining next week

Page 43: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Do  

you  really  need  

it  written?

Page 44: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

What  about  

talking  &  answering  

questions?

Page 45: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

CONVERSATIONS

High-Bandwidth

Just-In-Time

Interactive

Page 46: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

CONVERSATIONS OVER

DOCUMENTATION

Page 47: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

This does not

Sound like working

Page 48: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

MISSING Trust

Page 49: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

What about solving these issues instead?

Documentation is only a symptom

Page 50: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Perhaps we could pair-program?

or do mob-programming?

Page 51: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

!

!

Working Collectively

Page 52: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

!

!

DOCUMENTATION

CODEis

Page 53: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 54: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

DDD!Investing in

domain knowledge

Page 55: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

55

Where  do  I  put  that  stuff?

Page 56: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

56

DDD  is  abstract!

Page 57: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Bounded ContextsExplicitly define the context within which a model applies. Explicitly set boundaries in terms of team organization, usage within specific parts of the application, and physical manifestations such as code bases and database schemas. Keep the model strictly consistent within these bounds, but don’t be distracted or confused by issues outside.

How do I make it real?

Page 58: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Ubiquitous Language

A language structured around the domain model and used by all team members to connect all the activities of the team with the software.

How do I make it real?

Page 59: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Domain Model

A system of abstractions that describes selected aspects of a domain and can be used to solve problems related to that domain.

How do I make it real?

Page 60: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

60

Where  do  I  put  that  stuff?

Page 61: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Where  do  I  put  that  stuff?

For  realz?!

Page 62: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Documentation!

Page 63: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

How do we get all thisknowledge about the domain?

Page 64: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Event Storming workshops

Page 65: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

DOMAIN IMMERSION

Page 66: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Fleet Management for Parcel Delivery

Page 67: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Visit on the field

Page 68: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Conversations

Page 69: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

”Live my life”

Page 70: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

For new joiners

Page 71: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Domain Immersionas part of the on-boarding process

Page 72: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

DOCUMENTATIONBecause we can often do better than

documentation

NO

Page 73: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 74: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

How do I documentmy understanding of the domain?

Page 75: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Investigation Wall (aka Obsession Wall)

Page 76: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Fleet Management for Parcel Delivery

1M km/yr

Page 77: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

What about competitors?

Commercial Leaflet

Website

Found docs

Online templates

Page 78: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Stable knowledge? Easy.

Page 79: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

EVERGREEN DOCUMENT

Page 80: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

What about documenting the

behaviors?

Page 81: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

What about documenting the

behaviors?Because business people

never change their mind

Page 82: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

BDD

Page 83: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Scenarios

Intent

Page 84: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Scenarios

Concrete examples

Page 85: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Redundancy!

Page 86: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Redundancy!What if one changes and not the other?

Page 87: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 88: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Living Documentation

Page 89: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Living documentationFree comments

Page 90: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Living documentationAnother example

@acceptance-criteria @specs @wip @fixedincome @interests

Page 91: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Living documentation

tags@acceptance-criteria @specs @wip @fixedincome @interests

Page 92: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Living documentation

tags@acceptance-criteria @specs @wip @fixedincome @interests

Carefully crafted business knowledge too

Page 93: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Interactive websitesearch by feature or tag

navigate by tag

navigate by feature / chapter

Page 94: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Living documentation

+ collocated markdown files

thx @aloyer

Page 95: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

back to work now

Page 96: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Fraud detection mechanism

Page 97: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

NAPKIN SKETCH

Throw-Away

Page 98: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

FueldCardTransaction received into FuelCardMonitoring FuelCardMonitoring queries Geocoding FuelCardMonitoring queries GPSTracking Geocoding converts address into AddressCoordinates GPSTracking provides VehicleCoordinates VehicleCoordinates between GeoDistance AddressCoordinates between GeoDistance GeoDistance compared to DistanceThreshold DistanceThreshold delivers AnomalyReport

diagrammr.com

Page 99: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

FueldCardTransaction received into FuelCardMonitoring FuelCardMonitoring queries Geocoding FuelCardMonitoring queries GPSTracking Geocoding converts address into AddressCoordinates GPSTracking provides VehicleCoordinates VehicleCoordinates between GeoDistance AddressCoordinates between GeoDistance GeoDistance compared to DistanceThreshold DistanceThreshold delivers AnomalyReport

Page 100: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

PLAIN-TEXT DIAGRAM

Page 101: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

In Source Control Edit in any tool

Easy to diff Easy to maintain

Page 102: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

so what about the code?

Page 103: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 104: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Any Shameful Comments? Refactor!

Page 105: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

!

!

DOCUMENTATION

CODEis

Page 106: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 107: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Code

Page 108: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

WHY U NOT

TALK OF DDD?

Page 109: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

How do I materializeThe Bounded Contexts

in my code?

Page 110: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Bounded Contexts are there

Page 111: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Bounded Contexts are there

Implicitly

Page 112: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

KNOWLEDGE AUGMENTATION

Page 113: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Annotations

Page 114: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Bounded Contexts

Page 115: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Embedded Learning

Page 116: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Embedded Learning

Page 117: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Embedded Learning

Page 118: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Embedded LearningLearn on the job

Page 119: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Carefully crafted Ubiquitous Language

Page 120: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 121: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

How do I representthe Ubiquitous Language

in practice?

Page 122: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Ubiquitous Language is there

Page 123: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Annotate domain-relevant classesSource code as reference

Page 124: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

LIVING GLOSSARY

Page 125: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Living Glossary

Living Glossary Processor

Source Code & Annotations

Living Glossary always up-to-date

Page 126: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Custom Doclet to export Living Glossary

Page 127: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Bounded Context comment

Page 128: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Core Concepts

Page 129: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Class comment

Page 130: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

ANOTHER EXAMPLESent directly to end customers every week

Page 131: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Design

Page 132: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Example: Hexagonal Architecture

Page 133: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Domain Model inside Infrastructure Outside

Page 134: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

How do I documentthe Design?

Page 135: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Well…

Page 136: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Literature is already there

Page 137: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Alistair Cockburn

137

Page 138: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Literature is already there

Ready-Made Documentation

Page 139: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Design is already there

Page 140: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Design is already thereImplicitly

Page 141: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Just rely on documented naming conventions

Page 142: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

*.domain!*.infra!NOT *Test

Page 143: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

LIVING DIAGRAM

Page 144: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Living Diagram

Living Diagram

Processor

Source Code

Living Diagram always up-to-date

Page 145: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

145

Page 146: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 147: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

CONTENT FILTERING (CURATION)

is KEY

Page 148: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 149: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

No Value

Page 150: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 151: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

1 Diagram 1 Purpose

Page 152: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

https://www.structurizr.com/ by Simon Brown

Page 153: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

https://www.structurizr.com/

Page 154: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Moar Living Documentation

Plz!

Page 155: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Runtime exports

Page 156: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Runtime exports

\sum_{i=0}^{n}\frac{ }{ }

1+rt (1+r)^{t}

(1+r)^{\frac{t_1 - t_0}{360}} 1+r.\frac{t_1 - t_0}{365}

Page 157: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Runtime exports

\sum_{i=0}^{n}\frac{ }{ }

1+rt (1+r)^{t}

(1+r)^{\frac{t_1 - t_0}{360}} 1+r.\frac{t_1 - t_0}{365}

Page 158: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

etc.

Page 159: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Make tools

Page 160: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

”DDD is primarily about tools”

Page 161: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 162: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 163: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Avoid Production Work!

Page 164: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

(Sounds like MDA)

Page 165: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 166: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 167: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

over-complicate documentation tools over

over-complicate the production code

Page 168: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

There’s more

Page 169: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Hard to do the Living Glossary?

Page 170: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Hard to do the Living Glossary?

A signal!

Page 171: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

What happens to your Ubiquitous Language

in the code?

Lost Translations Mixed

Page 172: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

You may be doing DDD wrong!

Page 173: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

LISTEN TO THE DOCUMENTATION

FRUSTRATIONS

Page 174: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Beyond Documentation

Listen to the frustrations

Focus on documentation

Improve the product

Page 175: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Reality Check

Page 176: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

176

My  code  is  good!

Page 177: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

You  do  it  wrong!

Page 178: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

These  comments  suck!

Page 179: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Any Shameful Comments? Refactor!

Page 180: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Extract a word cloud from your code BAD

Page 181: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Extract a word cloud from your code Better

Page 182: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Hard to do the Living Diagrams?

A signal!

Page 183: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Programming by

Coincidence

Page 184: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 185: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Deliberate Design

Page 186: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Know what you’re doing ->

Already half-documented

Page 187: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Example: Hexagonal Architecture

Page 188: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 189: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 190: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

OOPS!

Page 191: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Beyond Documentation

Ooops! This is not what I expected :(

1st generation

Fix the design

Page 192: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

ANYBODY CAN !APPRECIATE!IT’S A MESS

Page 193: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

PRESSURE TO !IMPROVE DESIGN

Page 194: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Simpler Design Less documentation needed

Page 195: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

More standard Less documentation needed

!fogus

@fogus

Page 196: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Fix your workflow

Write code Write tests Write doc

Write tests = write doc Write code = write doc

From Mikko Ohtamaa

Page 197: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

How does it work with TDD?

Refactor until it looks good

Page 198: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Documentation Skills ==

Design Skills

Page 199: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

COOL!

Page 200: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

In Closing

Page 201: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

https://leanpub.com/livingdocumentation

BUY MY BOOK!

Page 202: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 203: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

”The only hope, then, for producing good documentation is to convince the programmer that it will benefit him to do so.”

@JerryWeinberg

Page 204: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Knowledge is already there

It just wants to break free

Page 205: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 206: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 207: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Boring Documentation is dead

Long Live Living Documentation!

Page 208: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Not about particular techniques

!

Reconsider dealing with the knowledge

Page 209: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Share Your Ideas & Experiments

Page 210: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)
Page 211: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Follow me @cyriux !

Slides: slideshare.net/cyriux Blog: cyrille.martraire.com

!

In Paris? Join !

Page 212: Living Documentation (NCrafts Paris 2015, DDDx London 2015, BDX.io 2015, Codeurs en Seine 2015)

Merci