SlideShare a Scribd company logo
@PeterHilton
http://hilton.org.uk/
Documentation avoidance
for developers
How to get away with less documentation 

and spend more time writing code
#WriteTheDocs
The documentation
problem
What are the
causes of
software
documentation?
@PeterHilton • 3
Justin Ennis / CC BY 2.0
‘M&Ms, 

managers and meetings’
M&Ms generate demand for software documentation.
Meetings are failure demand.
http://www.happymelly.com/why-work-does-not-happen-at-work-the-mms/ @PeterHilton • 5
6@PeterHilton •
Michael Coghlan / CC BY-SA 2.0
Unfamiliar domains
7@PeterHilton •
James Whatley / CC BY 2.0
Shakespeare wrote 

what is now
Legacy Poetry.
Even good code gets old.
Developers 

look for
documentation
in legacy
system
Jean-François
Millet
1857
Oil on canvas
classicprogrammerpaintings.com
Rob Smallshire - http://sixty-north.com/blog/predictive-models-of-development-teams-and-the-systems-they-build
dev tenure half life 3.1 years
code half-life 13 years
The documentation problem :(
There are many different causes of docs
(caused by different kinds of people)
Some programmers don’t love writing docs*
Programmers will leave your team
Writing good documentation is hard**
* but some do!
** but not as hard as programming, obviously 10@PeterHilton •
Tactics for avoiding the
need to write the docs
How far will you go?
You don’t have to write
docs if you leave your

mobile phone number 

in every source file. @PeterHilton • 12
@PeterHilton • 13
Constructive laziness
is when you’re lazy
about doing, but not
lazy about thinking.
@DenisHowlett
Documentation
avoidance applies
constructive laziness to
software documentation
@PeterHilton • 15
It’s on
the wiki!
Just-In-Time Documentation
1. Don’t write the docs.
2. Bluff, ‘it’s on the wiki’.
3. Still don’t write the docs.
4. If they come back, feign ignorance.
5. Then write it.
6. Later, casually mention that you ‘found it’.
17@PeterHilton •
goelshivi / PD
Alternatively, take time to
patiently explain your code
Reverse just-in-time (JIT) documentation
Instead of writing documentation in
advance, you can trick other people
into writing JIT documentation
by asking questions in a chat room
(and then pasting their answers into
the docs)
19@PeterHilton •
The handover delusion
A common management fallacy is
to assume that a developer who
never writes documentation can
somehow ‘write everything down’
before leaving the team.
20@PeterHilton •
Pair programming
Pair programming is far cheaper and
more effective than documentation
… but only if the other programmer is
(still) available.
21@PeterHilton •
‘A common fallacy is to assume authors
of incomprehensible code will somehow
be able to express themselves lucidly
and clearly in comments.’
@KevlinHenney
23@PeterHilton •
Acknowledge that writing docs is a specialist skill
On a cross-functional development team,
not everyone is good at visual design.
The same goes for writing about code.
Work out who is a better writer
… then get him or her to write the docs.
Maybe even hire a technical writer.
24@PeterHilton •
jameswragg / CC
// Calculates kitten cuteness.
Integer getCuteness()
// Returns a kitten ID.
String findKitten(String name)
// Check if kitten is alive.
if (airway && breathing &&
circulation)
/**
* @author Peter Hilton
*/
public class Kittens


Integer calculateCuteness()



KittenId findKitten(String name)

boolean alive = airway && 

breathing && circulation;

if (alive)



// Use version control!
/**
* Calculates cuteness in the range 0-10.
*
* Idempotent; does not modify the kittens.
*
* Reference Kitten (previous slide) defines cuteness score 10.
*
* Returns 0 for dead kittens (not cute).
*
* Throws NullKittenException if list contains a null kitten.
*
* Throws IllegalKittenException if list contains a non-kitten.
*/
Integer calculateAverageCuteness(List<Kitten> kittens)
Documentation avoidance
Constructive laziness
Just-in-time documentation
Pair programming
Getting someone else to write the docs
Code refactoring - especially better naming
Type safe programming
Unit tests - API usage example tests
28@PeterHilton •
Failing to get away with
documentation-avoidance
30@PeterHilton •
smlp.co.uk / CC BY 2.0
‘Just read the code’
‘It’s self-documenting’
What we talk about when we talk about code
Write the introduction:
purpose, scope, summary
Explain the design:
constraints, limitations, alternatives
Give examples
Add explanations for new team members
31@PeterHilton •
@PeterHilton •
Lesley Mair / CC BY 2.0
Why?
Even perfect code
cannot explain
why it exists
Explain the why
@PeterHilton • 33
Compromising on documentation-avoidance
Part of documentation avoidance is knowing
when you’re going to have to write docs anyway.
Then it’s about writing as little as possible…
35@PeterHilton •
Writing docs that aren’t
‘documentation’
There’s more than one kind of documentation
You can describe software in many ways:
more code, diagrams, chat, commits, docs.
Text isn’t necessary the hardest or most effort,
but keep it close to the code,
and don’t forget maintenance.
37@PeterHilton •
Code comments
Programmers get weird about code comments…
Comments are often a taboo subject
… but a feature of every programming language
Comments are just another documentation tool
… and not the worst way to write documentation
Comments are closer to the code than other docs.
38@PeterHilton •
Capitalized, short (50 chars or less) summary
More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of an email and the rest of the text as the body. The blank
line separating the summary from the body is critical (unless you omit
the body entirely); tools like rebase can get confused if you run the
two together.
Write your commit message in the imperative: "Fix bug" and not "Fixed bug"
or "Fixes bug." This convention matches up with commit messages generated
by commands like git merge and git revert.
Further paragraphs come after blank lines.
- Bullet points are okay, too
- Typically a hyphen or asterisk is used for the bullet, followed by a
single space, with blank lines in between, but conventions vary here
http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
Commit messages (instead of comments)
Write a short subject line.
Add additional paragraphs to explain:
why a change was necessary,
how the change addresses the issue,
what changed,
why you made the change the way you did,
consequences of the change
40@PeterHilton •
README-Driven Development
‘… we have projects with short, badly written,
or entirely missing documentation…
There must be some middle ground between
reams of technical specifications and no
specifications at all. And in fact there is.
That middle ground is the humble Readme.’
http://tom.preston-werner.com/2010/08/23/readme-driven-development.html 41@PeterHilton •
Today I Learned
(TIL)
Short independent
articles that each
document one thing.
Markdown files in a
GitHub repository.
Tutorials, instructions & other written forms
44@PeterHilton •
Something you’re working on doesn’t have docs.
A solution to a specific problem is useful for someone.
The only tutorial on a topic can get a lot of page views.
You might even get a little bit famous in a community.
Publish on a blog, on Stack Overflow or in a TIL repository.
45@PeterHilton •
Public API docs
The best API docs are written by hand (tools are for layout).
Structure and consistency are crucial.
API docs generators solve structure and layout - 

a less interesting problem - and don’t write docs for you
Java/Scaladoc, Swagger, Silk, Spring REST Docs
47@PeterHilton •
Chat rooms
Team chat is essential for development teams
… and we’ve come a long way since IRC
Chat can replace some documentation if search is good
(search is why it’s worth paying for Slack)
Cheaper alternatives include:
HipChat, Gitter
Lack of search is why you don’t use Skype for group chat
48@PeterHilton •
Wikis & other tools for talking code
Despite the alternatives, you usually still need a document-
based system for internal software documentation.
:) Wikis replaced Microsoft Word docs on shared drives.
:( Wiki software has been stagnant for a decade.
Confluence turned into something else.
Modern alternatives are closed platforms.
GitHub Wiki might be as good as it gets.
49@PeterHilton •
/**
* Calculates cuteness in the range 0-10.
*
* Idempotent; does not modify the kittens.
*
* Reference Kitten (previous slide) defines cuteness score 10.
*
* Returns 0 for dead kittens (not cute).
*
* Throws NullKittenException if list contains a null kitten.
*
* Throws IllegalKittenException if list contains a non-kitten.
*/
Integer calculateAverageCuteness(List<Kitten> kitten)
Enrico / CC BY 2.0
52@PeterHilton •
Erich Ferdinand / CC BY 2.0
http://www.j-paine.org/dobbs/prolog_lightbulb.html
?- How many Prolog programmers does it take 

to change a lightbulb?

false
Take-aways: tools, tips &
practical techniques
Write a project/project introduction
Write an introduction (README) for your software:
Explain the purpose and scope
Summarise what it does.
Write installation and development instructions.
Publish tutorials online.
Don’t forget to write (good) code comments.
56@PeterHilton •
Write good code comments
Try to write good code first (and tests!).
Try to write a one-sentence comment.
Refactor the code (make it easier).
Delete unnecessary comments (just like unused code).
Rewrite bad comments
(all good writing requires rewriting)
Add detail where needed.
57@PeterHilton •
Comments
are not the enemy.
Meetings
are the enemy!
@PeterHilton • 58
Write detailed installation/test instructions
Detailed instructions make every keystroke/click explicit.
‘On the process start form, in the Answer field, enter 42.’
Surprisingly easy to write.
Surprisingly valuable (in time that readers save).
Automate installation/testing where you can
… and write procedures for what’s left.
59@PeterHilton •
Understand who and what the docs are for
‘There should be documentation’ isn’t enough.
Work out who needs the docs:
your future self, other developers, users, 

managers & other stakeholders.
Use documentation to reduce costs,
e.g. installation effort or team handover.
60@PeterHilton •
Aim to write the
Minimum Viable
Documentation.
The rest is waste.
@PeterHilton • 61
Specifications
Some complex systems require documentation for a
specific area that is hard to understand
Architecture diagram
UML diagram
Data dictionary
Process model
Business rules
62@PeterHilton •
Choose the right kind of docs
README
Installation instructions (step-by-step)
Code comments
TIL (Today I Learned)
Tutorials
API documentation
Specifications (rarely)
Presentations :) 63@PeterHilton •
Use Markdown or similar
Things that seemed like a good idea at the time:
troff, SGML, RTF, DocBook, XHTML, XSL-FO
Things that seem like a better idea now:
Markdown, reStructuredText, AsciiDoc
The ultimate text markup language is still:
HTML
64@PeterHilton •
Use humour
There’s no rule that says that jokes aren’t allowed.
Insufficiently serious documentation is probably
not your biggest problem. Staying awake might be.
Humour isn’t magic.
There are several practical theories of what’s funny.
65@PeterHilton •
Choose an appropriate tool that you like
GitHub repo - plain Markdown files
GitHub Pages - Jekyll site builder
GitHub Wiki - Gollum wiki
Read the Docs - Sphinx docs builder
Asciidoctor - asciidoc to many formats
Swagger - API docs structure and layout
Silk - API docs
66@PeterHilton •
M A N N I N G
Peter Hilton
Erik Bakker
Francisco Canedo
FOREWORD BY James Ward
Covers Play 2
Play for Scala

(Manning, 2014)


Peter Hilton

Erik Bakker

Francisco Canedo
http://bit.ly/playscala2p
Summary
Summary
Writing documentation sucks;
… but has value and isn’t going away
You need documentation,
… but not very much of it
Many developers hate writing it,
… but not all of them
You hardly have to write any;
… you might find someone else to write the rest 69@PeterHilton •
@PeterHilton
http://hilton.org.uk/ #WriteTheDocs

More Related Content

What's hot

Migrating to Microservices Patterns and Technologies (edition 2023)
 Migrating to Microservices Patterns and Technologies (edition 2023) Migrating to Microservices Patterns and Technologies (edition 2023)
Migrating to Microservices Patterns and Technologies (edition 2023)
Ahmed Misbah
 
Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...
Chris Richardson
 
DCSF19 Container Security: Theory & Practice at Netflix
DCSF19 Container Security: Theory & Practice at NetflixDCSF19 Container Security: Theory & Practice at Netflix
DCSF19 Container Security: Theory & Practice at Netflix
Docker, Inc.
 
Microservices
MicroservicesMicroservices
Microservices
SmartBear
 
Multi-tenant Database Design for SaaS
Multi-tenant Database Design for SaaSMulti-tenant Database Design for SaaS
Multi-tenant Database Design for SaaS
Võ Duy Tuấn
 
Scrum + bdd + ddd
Scrum + bdd + dddScrum + bdd + ddd
Scrum + bdd + ddd
Helder De Oliveira
 
Containers Docker Kind Kubernetes Istio
Containers Docker Kind Kubernetes IstioContainers Docker Kind Kubernetes Istio
Containers Docker Kind Kubernetes Istio
Araf Karsh Hamid
 
Data Center 101: What to Look for in a Colocation Provider
Data Center 101: What to Look for in a Colocation ProviderData Center 101: What to Look for in a Colocation Provider
Data Center 101: What to Look for in a Colocation Provider
Hostway|HOSTING
 
AWS Customer Presentation - WeoGeo
AWS Customer Presentation - WeoGeo AWS Customer Presentation - WeoGeo
AWS Customer Presentation - WeoGeo
Amazon Web Services
 
Cloud migration slides
Cloud migration slidesCloud migration slides
Cloud migration slides
Erika Barron
 
QConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
QConPlus 2021: Minimizing Design Time Coupling in a Microservice ArchitectureQConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
QConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
Chris Richardson
 
From Monolith to Microservices
From Monolith to MicroservicesFrom Monolith to Microservices
From Monolith to Microservices
Amazon Web Services
 
Avoid the Distributed Monolith!!
Avoid the Distributed Monolith!!Avoid the Distributed Monolith!!
Avoid the Distributed Monolith!!
DevOpsDays DFW
 
Microservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, KanbanMicroservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, Kanban
Araf Karsh Hamid
 
AWS 클라우드 기반 확장성 높은 천만 사용자 웹 서비스 만들기 - 윤석찬
AWS 클라우드 기반 확장성 높은 천만 사용자 웹 서비스 만들기 - 윤석찬AWS 클라우드 기반 확장성 높은 천만 사용자 웹 서비스 만들기 - 윤석찬
AWS 클라우드 기반 확장성 높은 천만 사용자 웹 서비스 만들기 - 윤석찬
Amazon Web Services Korea
 
Dark Energy, Dark Matter and the Microservices Patterns?!
Dark Energy, Dark Matter and the Microservices Patterns?!Dark Energy, Dark Matter and the Microservices Patterns?!
Dark Energy, Dark Matter and the Microservices Patterns?!
Chris Richardson
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
tyrantbrian
 
Why to Cloud Native
Why to Cloud NativeWhy to Cloud Native
Why to Cloud Native
Karthik Gaekwad
 
Domain Driven Design and Hexagonal Architecture
Domain Driven Design and Hexagonal ArchitectureDomain Driven Design and Hexagonal Architecture
Domain Driven Design and Hexagonal Architecture
Crishantha Nanayakkara
 
Microservices Decomposition Patterns
Microservices Decomposition PatternsMicroservices Decomposition Patterns
Microservices Decomposition Patterns
Firmansyah, SCJP, OCEWCD, OCEWSD, TOGAF, OCMJEA, CEH
 

What's hot (20)

Migrating to Microservices Patterns and Technologies (edition 2023)
 Migrating to Microservices Patterns and Technologies (edition 2023) Migrating to Microservices Patterns and Technologies (edition 2023)
Migrating to Microservices Patterns and Technologies (edition 2023)
 
Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...
 
DCSF19 Container Security: Theory & Practice at Netflix
DCSF19 Container Security: Theory & Practice at NetflixDCSF19 Container Security: Theory & Practice at Netflix
DCSF19 Container Security: Theory & Practice at Netflix
 
Microservices
MicroservicesMicroservices
Microservices
 
Multi-tenant Database Design for SaaS
Multi-tenant Database Design for SaaSMulti-tenant Database Design for SaaS
Multi-tenant Database Design for SaaS
 
Scrum + bdd + ddd
Scrum + bdd + dddScrum + bdd + ddd
Scrum + bdd + ddd
 
Containers Docker Kind Kubernetes Istio
Containers Docker Kind Kubernetes IstioContainers Docker Kind Kubernetes Istio
Containers Docker Kind Kubernetes Istio
 
Data Center 101: What to Look for in a Colocation Provider
Data Center 101: What to Look for in a Colocation ProviderData Center 101: What to Look for in a Colocation Provider
Data Center 101: What to Look for in a Colocation Provider
 
AWS Customer Presentation - WeoGeo
AWS Customer Presentation - WeoGeo AWS Customer Presentation - WeoGeo
AWS Customer Presentation - WeoGeo
 
Cloud migration slides
Cloud migration slidesCloud migration slides
Cloud migration slides
 
QConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
QConPlus 2021: Minimizing Design Time Coupling in a Microservice ArchitectureQConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
QConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
 
From Monolith to Microservices
From Monolith to MicroservicesFrom Monolith to Microservices
From Monolith to Microservices
 
Avoid the Distributed Monolith!!
Avoid the Distributed Monolith!!Avoid the Distributed Monolith!!
Avoid the Distributed Monolith!!
 
Microservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, KanbanMicroservices, Containers, Kubernetes, Kafka, Kanban
Microservices, Containers, Kubernetes, Kafka, Kanban
 
AWS 클라우드 기반 확장성 높은 천만 사용자 웹 서비스 만들기 - 윤석찬
AWS 클라우드 기반 확장성 높은 천만 사용자 웹 서비스 만들기 - 윤석찬AWS 클라우드 기반 확장성 높은 천만 사용자 웹 서비스 만들기 - 윤석찬
AWS 클라우드 기반 확장성 높은 천만 사용자 웹 서비스 만들기 - 윤석찬
 
Dark Energy, Dark Matter and the Microservices Patterns?!
Dark Energy, Dark Matter and the Microservices Patterns?!Dark Energy, Dark Matter and the Microservices Patterns?!
Dark Energy, Dark Matter and the Microservices Patterns?!
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Why to Cloud Native
Why to Cloud NativeWhy to Cloud Native
Why to Cloud Native
 
Domain Driven Design and Hexagonal Architecture
Domain Driven Design and Hexagonal ArchitectureDomain Driven Design and Hexagonal Architecture
Domain Driven Design and Hexagonal Architecture
 
Microservices Decomposition Patterns
Microservices Decomposition PatternsMicroservices Decomposition Patterns
Microservices Decomposition Patterns
 

Viewers also liked

How to name things: the hardest problem in programming
How to name things: the hardest problem in programmingHow to name things: the hardest problem in programming
How to name things: the hardest problem in programming
Peter Hilton
 
How to write good comments
How to write good commentsHow to write good comments
How to write good comments
Peter Hilton
 
DDD patterns that were not in the book
DDD patterns that were not in the bookDDD patterns that were not in the book
DDD patterns that were not in the book
Cyrille Martraire
 
Lean collaborative test plans
Lean collaborative test plansLean collaborative test plans
Lean collaborative test plans
Dani Nordin
 
Documenting design patterns
Documenting design patternsDocumenting design patterns
Documenting design patterns
Dani Nordin
 
Instrumentation as a Living Documentation: Teaching Humans About Complex Systems
Instrumentation as a Living Documentation: Teaching Humans About Complex SystemsInstrumentation as a Living Documentation: Teaching Humans About Complex Systems
Instrumentation as a Living Documentation: Teaching Humans About Complex Systems
Brian Troutwine
 
HTTP demystified for web developers
HTTP demystified for web developersHTTP demystified for web developers
HTTP demystified for web developers
Peter Hilton
 
Writing the docs
Writing the docsWriting the docs
Writing the docs
Mikko Ohtamaa
 
About "Apache Cassandra"
About "Apache Cassandra"About "Apache Cassandra"
About "Apache Cassandra"
Jihyun Ahn
 
From legacy to DDD - 5 starting steps
From legacy to DDD - 5 starting stepsFrom legacy to DDD - 5 starting steps
From legacy to DDD - 5 starting steps
Andrzej Krzywda
 
Tom and jef’s awesome modellathon
Tom and jef’s awesome modellathonTom and jef’s awesome modellathon
Tom and jef’s awesome modellathon
Tom Janssens
 
Selling ddd
Selling dddSelling ddd
Selling ddd
Tom Janssens
 
How to write maintainable code
How to write maintainable codeHow to write maintainable code
How to write maintainable code
Peter Hilton
 
Death to project documentation with eXtreme Programming
Death to project documentation with eXtreme ProgrammingDeath to project documentation with eXtreme Programming
Death to project documentation with eXtreme Programming
Alex Fernandez
 
Domain-Driven Design in legacy application
Domain-Driven Design in legacy applicationDomain-Driven Design in legacy application
Domain-Driven Design in legacy application
Cyrille Martraire
 
From legacy to DDD (slides for the screencast)
From legacy to DDD (slides for the screencast)From legacy to DDD (slides for the screencast)
From legacy to DDD (slides for the screencast)
Andrzej Krzywda
 
Simplifying your design with higher-order functions
Simplifying your design with higher-order functionsSimplifying your design with higher-order functions
Simplifying your design with higher-order functionsSamir Talwar
 
Evolving legacy to microservices and ddd
Evolving legacy to microservices and dddEvolving legacy to microservices and ddd
Evolving legacy to microservices and ddd
Marcos Vinícius
 
I T.A.K.E. talk: "When DDD meets FP, good things happen"
I T.A.K.E. talk: "When DDD meets FP, good things happen"I T.A.K.E. talk: "When DDD meets FP, good things happen"
I T.A.K.E. talk: "When DDD meets FP, good things happen"
Cyrille Martraire
 
DDD session BrownBagLunch (FR)
DDD session BrownBagLunch (FR)DDD session BrownBagLunch (FR)
DDD session BrownBagLunch (FR)
Cyrille Martraire
 

Viewers also liked (20)

How to name things: the hardest problem in programming
How to name things: the hardest problem in programmingHow to name things: the hardest problem in programming
How to name things: the hardest problem in programming
 
How to write good comments
How to write good commentsHow to write good comments
How to write good comments
 
DDD patterns that were not in the book
DDD patterns that were not in the bookDDD patterns that were not in the book
DDD patterns that were not in the book
 
Lean collaborative test plans
Lean collaborative test plansLean collaborative test plans
Lean collaborative test plans
 
Documenting design patterns
Documenting design patternsDocumenting design patterns
Documenting design patterns
 
Instrumentation as a Living Documentation: Teaching Humans About Complex Systems
Instrumentation as a Living Documentation: Teaching Humans About Complex SystemsInstrumentation as a Living Documentation: Teaching Humans About Complex Systems
Instrumentation as a Living Documentation: Teaching Humans About Complex Systems
 
HTTP demystified for web developers
HTTP demystified for web developersHTTP demystified for web developers
HTTP demystified for web developers
 
Writing the docs
Writing the docsWriting the docs
Writing the docs
 
About "Apache Cassandra"
About "Apache Cassandra"About "Apache Cassandra"
About "Apache Cassandra"
 
From legacy to DDD - 5 starting steps
From legacy to DDD - 5 starting stepsFrom legacy to DDD - 5 starting steps
From legacy to DDD - 5 starting steps
 
Tom and jef’s awesome modellathon
Tom and jef’s awesome modellathonTom and jef’s awesome modellathon
Tom and jef’s awesome modellathon
 
Selling ddd
Selling dddSelling ddd
Selling ddd
 
How to write maintainable code
How to write maintainable codeHow to write maintainable code
How to write maintainable code
 
Death to project documentation with eXtreme Programming
Death to project documentation with eXtreme ProgrammingDeath to project documentation with eXtreme Programming
Death to project documentation with eXtreme Programming
 
Domain-Driven Design in legacy application
Domain-Driven Design in legacy applicationDomain-Driven Design in legacy application
Domain-Driven Design in legacy application
 
From legacy to DDD (slides for the screencast)
From legacy to DDD (slides for the screencast)From legacy to DDD (slides for the screencast)
From legacy to DDD (slides for the screencast)
 
Simplifying your design with higher-order functions
Simplifying your design with higher-order functionsSimplifying your design with higher-order functions
Simplifying your design with higher-order functions
 
Evolving legacy to microservices and ddd
Evolving legacy to microservices and dddEvolving legacy to microservices and ddd
Evolving legacy to microservices and ddd
 
I T.A.K.E. talk: "When DDD meets FP, good things happen"
I T.A.K.E. talk: "When DDD meets FP, good things happen"I T.A.K.E. talk: "When DDD meets FP, good things happen"
I T.A.K.E. talk: "When DDD meets FP, good things happen"
 
DDD session BrownBagLunch (FR)
DDD session BrownBagLunch (FR)DDD session BrownBagLunch (FR)
DDD session BrownBagLunch (FR)
 

Similar to Documentation avoidance for developers

Voxxed Days Thessaloniki 2016 - Documentation Avoidance
Voxxed Days Thessaloniki 2016 - Documentation AvoidanceVoxxed Days Thessaloniki 2016 - Documentation Avoidance
Voxxed Days Thessaloniki 2016 - Documentation Avoidance
Voxxed Days Thessaloniki
 
How to write maintainable code - Peter Hilton - Codemotion Amsterdam 2017
How to write maintainable code - Peter Hilton - Codemotion Amsterdam 2017How to write maintainable code - Peter Hilton - Codemotion Amsterdam 2017
How to write maintainable code - Peter Hilton - Codemotion Amsterdam 2017
Codemotion
 
Bitcoin Development 2019 Starter Guide - No Skill | ProvenCrypto
Bitcoin Development 2019 Starter Guide - No Skill | ProvenCryptoBitcoin Development 2019 Starter Guide - No Skill | ProvenCrypto
Bitcoin Development 2019 Starter Guide - No Skill | ProvenCrypto
Opti Network
 
Git hub party-20151008
Git hub party-20151008Git hub party-20151008
Git hub party-20151008
Blanca Mancilla
 
InftyReader and ChattyInfty Overview
InftyReader and ChattyInfty OverviewInftyReader and ChattyInfty Overview
InftyReader and ChattyInfty Overview
steveapps4android
 
Excavating the knowledge of our ancestors
Excavating the knowledge of our ancestorsExcavating the knowledge of our ancestors
Excavating the knowledge of our ancestors
Uwe Friedrichsen
 
Kubernetes 101: DIY Workshop
Kubernetes 101: DIY WorkshopKubernetes 101: DIY Workshop
Kubernetes 101: DIY Workshop
bridgetkromhout
 
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
Maxim Salnikov
 
Git best practices 2016
Git best practices 2016Git best practices 2016
Git best practices 2016
Otto Kekäläinen
 
Play framework: lessons learned
Play framework: lessons learnedPlay framework: lessons learned
Play framework: lessons learnedPeter Hilton
 
Intro to Git & GitHub
Intro to Git & GitHubIntro to Git & GitHub
Intro to Git & GitHub
GoogleDevelopersStud
 
Wonderful World of Content Types
Wonderful World of Content TypesWonderful World of Content Types
Wonderful World of Content Types
Nikkia Carter
 
GerritHub.io - present, past, future
GerritHub.io - present, past, futureGerritHub.io - present, past, future
GerritHub.io - present, past, future
Luca Milanesio
 
Contributing to the AtoM documentation
Contributing to the AtoM documentationContributing to the AtoM documentation
Contributing to the AtoM documentation
Artefactual Systems - AtoM
 
orlando-codecamp-meet-copilot-24-Feb-2024_pub.pptx
orlando-codecamp-meet-copilot-24-Feb-2024_pub.pptxorlando-codecamp-meet-copilot-24-Feb-2024_pub.pptx
orlando-codecamp-meet-copilot-24-Feb-2024_pub.pptx
Bill Wilder
 
DevOps -- A 10 year retrospective (based on interviews conducted at DevOps Da...
DevOps -- A 10 year retrospective (based on interviews conducted at DevOps Da...DevOps -- A 10 year retrospective (based on interviews conducted at DevOps Da...
DevOps -- A 10 year retrospective (based on interviews conducted at DevOps Da...
Barton George
 
Rapid PowerShell Function Development
Rapid PowerShell Function DevelopmentRapid PowerShell Function Development
Rapid PowerShell Function Development
Frank Lesniak
 
Creating and Maintaining an Open Source Library
Creating and Maintaining an Open Source LibraryCreating and Maintaining an Open Source Library
Creating and Maintaining an Open Source Library
Nicholas Schweitzer
 
concordia hacktoberfest.pptx
concordia hacktoberfest.pptxconcordia hacktoberfest.pptx
concordia hacktoberfest.pptx
AnkurVerma95745
 

Similar to Documentation avoidance for developers (20)

Voxxed Days Thessaloniki 2016 - Documentation Avoidance
Voxxed Days Thessaloniki 2016 - Documentation AvoidanceVoxxed Days Thessaloniki 2016 - Documentation Avoidance
Voxxed Days Thessaloniki 2016 - Documentation Avoidance
 
How to write maintainable code - Peter Hilton - Codemotion Amsterdam 2017
How to write maintainable code - Peter Hilton - Codemotion Amsterdam 2017How to write maintainable code - Peter Hilton - Codemotion Amsterdam 2017
How to write maintainable code - Peter Hilton - Codemotion Amsterdam 2017
 
Bitcoin Development 2019 Starter Guide - No Skill | ProvenCrypto
Bitcoin Development 2019 Starter Guide - No Skill | ProvenCryptoBitcoin Development 2019 Starter Guide - No Skill | ProvenCrypto
Bitcoin Development 2019 Starter Guide - No Skill | ProvenCrypto
 
Git hub party-20151008
Git hub party-20151008Git hub party-20151008
Git hub party-20151008
 
InftyReader and ChattyInfty Overview
InftyReader and ChattyInfty OverviewInftyReader and ChattyInfty Overview
InftyReader and ChattyInfty Overview
 
Excavating the knowledge of our ancestors
Excavating the knowledge of our ancestorsExcavating the knowledge of our ancestors
Excavating the knowledge of our ancestors
 
Kubernetes 101: DIY Workshop
Kubernetes 101: DIY WorkshopKubernetes 101: DIY Workshop
Kubernetes 101: DIY Workshop
 
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
 
Git best practices 2016
Git best practices 2016Git best practices 2016
Git best practices 2016
 
Play framework: lessons learned
Play framework: lessons learnedPlay framework: lessons learned
Play framework: lessons learned
 
Intro to Git & GitHub
Intro to Git & GitHubIntro to Git & GitHub
Intro to Git & GitHub
 
Wonderful World of Content Types
Wonderful World of Content TypesWonderful World of Content Types
Wonderful World of Content Types
 
ChatGPT, Generative AI and Microsoft Copilot: Step Into the Future - Geoff Ab...
ChatGPT, Generative AI and Microsoft Copilot: Step Into the Future - Geoff Ab...ChatGPT, Generative AI and Microsoft Copilot: Step Into the Future - Geoff Ab...
ChatGPT, Generative AI and Microsoft Copilot: Step Into the Future - Geoff Ab...
 
GerritHub.io - present, past, future
GerritHub.io - present, past, futureGerritHub.io - present, past, future
GerritHub.io - present, past, future
 
Contributing to the AtoM documentation
Contributing to the AtoM documentationContributing to the AtoM documentation
Contributing to the AtoM documentation
 
orlando-codecamp-meet-copilot-24-Feb-2024_pub.pptx
orlando-codecamp-meet-copilot-24-Feb-2024_pub.pptxorlando-codecamp-meet-copilot-24-Feb-2024_pub.pptx
orlando-codecamp-meet-copilot-24-Feb-2024_pub.pptx
 
DevOps -- A 10 year retrospective (based on interviews conducted at DevOps Da...
DevOps -- A 10 year retrospective (based on interviews conducted at DevOps Da...DevOps -- A 10 year retrospective (based on interviews conducted at DevOps Da...
DevOps -- A 10 year retrospective (based on interviews conducted at DevOps Da...
 
Rapid PowerShell Function Development
Rapid PowerShell Function DevelopmentRapid PowerShell Function Development
Rapid PowerShell Function Development
 
Creating and Maintaining an Open Source Library
Creating and Maintaining an Open Source LibraryCreating and Maintaining an Open Source Library
Creating and Maintaining an Open Source Library
 
concordia hacktoberfest.pptx
concordia hacktoberfest.pptxconcordia hacktoberfest.pptx
concordia hacktoberfest.pptx
 

More from Peter Hilton

Naming guidelines for professional programmers
Naming guidelines for professional programmersNaming guidelines for professional programmers
Naming guidelines for professional programmers
Peter Hilton
 
Beautiful code
Beautiful codeBeautiful code
Beautiful code
Peter Hilton
 
E-Prime: English for scientific writing
E-Prime: English for scientific writing E-Prime: English for scientific writing
E-Prime: English for scientific writing
Peter Hilton
 
Process-oriented reactive service architecture
Process-oriented reactive service architectureProcess-oriented reactive service architecture
Process-oriented reactive service architecture
Peter Hilton
 
Meeting-avoidance for self-managing developers
Meeting-avoidance for self-managing developersMeeting-avoidance for self-managing developers
Meeting-avoidance for self-managing developers
Peter Hilton
 
Scaling business app development with Play and Scala
Scaling business app development with Play and ScalaScaling business app development with Play and Scala
Scaling business app development with Play and Scala
Peter Hilton
 

More from Peter Hilton (6)

Naming guidelines for professional programmers
Naming guidelines for professional programmersNaming guidelines for professional programmers
Naming guidelines for professional programmers
 
Beautiful code
Beautiful codeBeautiful code
Beautiful code
 
E-Prime: English for scientific writing
E-Prime: English for scientific writing E-Prime: English for scientific writing
E-Prime: English for scientific writing
 
Process-oriented reactive service architecture
Process-oriented reactive service architectureProcess-oriented reactive service architecture
Process-oriented reactive service architecture
 
Meeting-avoidance for self-managing developers
Meeting-avoidance for self-managing developersMeeting-avoidance for self-managing developers
Meeting-avoidance for self-managing developers
 
Scaling business app development with Play and Scala
Scaling business app development with Play and ScalaScaling business app development with Play and Scala
Scaling business app development with Play and Scala
 

Recently uploaded

Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 

Recently uploaded (20)

Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 

Documentation avoidance for developers

  • 1. @PeterHilton http://hilton.org.uk/ Documentation avoidance for developers How to get away with less documentation 
 and spend more time writing code #WriteTheDocs
  • 3. What are the causes of software documentation? @PeterHilton • 3
  • 4. Justin Ennis / CC BY 2.0
  • 5. ‘M&Ms, 
 managers and meetings’ M&Ms generate demand for software documentation. Meetings are failure demand. http://www.happymelly.com/why-work-does-not-happen-at-work-the-mms/ @PeterHilton • 5
  • 6. 6@PeterHilton • Michael Coghlan / CC BY-SA 2.0 Unfamiliar domains
  • 7. 7@PeterHilton • James Whatley / CC BY 2.0 Shakespeare wrote 
 what is now Legacy Poetry. Even good code gets old.
  • 8. Developers 
 look for documentation in legacy system Jean-François Millet 1857 Oil on canvas classicprogrammerpaintings.com
  • 9. Rob Smallshire - http://sixty-north.com/blog/predictive-models-of-development-teams-and-the-systems-they-build dev tenure half life 3.1 years code half-life 13 years
  • 10. The documentation problem :( There are many different causes of docs (caused by different kinds of people) Some programmers don’t love writing docs* Programmers will leave your team Writing good documentation is hard** * but some do! ** but not as hard as programming, obviously 10@PeterHilton •
  • 11. Tactics for avoiding the need to write the docs
  • 12. How far will you go? You don’t have to write docs if you leave your
 mobile phone number 
 in every source file. @PeterHilton • 12
  • 13. @PeterHilton • 13 Constructive laziness is when you’re lazy about doing, but not lazy about thinking. @DenisHowlett
  • 14.
  • 15. Documentation avoidance applies constructive laziness to software documentation @PeterHilton • 15
  • 17. Just-In-Time Documentation 1. Don’t write the docs. 2. Bluff, ‘it’s on the wiki’. 3. Still don’t write the docs. 4. If they come back, feign ignorance. 5. Then write it. 6. Later, casually mention that you ‘found it’. 17@PeterHilton •
  • 18. goelshivi / PD Alternatively, take time to patiently explain your code
  • 19. Reverse just-in-time (JIT) documentation Instead of writing documentation in advance, you can trick other people into writing JIT documentation by asking questions in a chat room (and then pasting their answers into the docs) 19@PeterHilton •
  • 20. The handover delusion A common management fallacy is to assume that a developer who never writes documentation can somehow ‘write everything down’ before leaving the team. 20@PeterHilton •
  • 21. Pair programming Pair programming is far cheaper and more effective than documentation … but only if the other programmer is (still) available. 21@PeterHilton •
  • 22.
  • 23. ‘A common fallacy is to assume authors of incomprehensible code will somehow be able to express themselves lucidly and clearly in comments.’ @KevlinHenney 23@PeterHilton •
  • 24. Acknowledge that writing docs is a specialist skill On a cross-functional development team, not everyone is good at visual design. The same goes for writing about code. Work out who is a better writer … then get him or her to write the docs. Maybe even hire a technical writer. 24@PeterHilton •
  • 26. // Calculates kitten cuteness. Integer getCuteness() // Returns a kitten ID. String findKitten(String name) // Check if kitten is alive. if (airway && breathing && circulation) /** * @author Peter Hilton */ public class Kittens 
 Integer calculateCuteness()
 
 KittenId findKitten(String name)
 boolean alive = airway && 
 breathing && circulation;
 if (alive)
 
 // Use version control!
  • 27. /** * Calculates cuteness in the range 0-10. * * Idempotent; does not modify the kittens. * * Reference Kitten (previous slide) defines cuteness score 10. * * Returns 0 for dead kittens (not cute). * * Throws NullKittenException if list contains a null kitten. * * Throws IllegalKittenException if list contains a non-kitten. */ Integer calculateAverageCuteness(List<Kitten> kittens)
  • 28. Documentation avoidance Constructive laziness Just-in-time documentation Pair programming Getting someone else to write the docs Code refactoring - especially better naming Type safe programming Unit tests - API usage example tests 28@PeterHilton •
  • 29. Failing to get away with documentation-avoidance
  • 30. 30@PeterHilton • smlp.co.uk / CC BY 2.0 ‘Just read the code’ ‘It’s self-documenting’
  • 31. What we talk about when we talk about code Write the introduction: purpose, scope, summary Explain the design: constraints, limitations, alternatives Give examples Add explanations for new team members 31@PeterHilton •
  • 32. @PeterHilton • Lesley Mair / CC BY 2.0 Why?
  • 33. Even perfect code cannot explain why it exists Explain the why @PeterHilton • 33
  • 34.
  • 35. Compromising on documentation-avoidance Part of documentation avoidance is knowing when you’re going to have to write docs anyway. Then it’s about writing as little as possible… 35@PeterHilton •
  • 36.
  • 37. Writing docs that aren’t ‘documentation’
  • 38. There’s more than one kind of documentation You can describe software in many ways: more code, diagrams, chat, commits, docs. Text isn’t necessary the hardest or most effort, but keep it close to the code, and don’t forget maintenance. 37@PeterHilton •
  • 39. Code comments Programmers get weird about code comments… Comments are often a taboo subject … but a feature of every programming language Comments are just another documentation tool … and not the worst way to write documentation Comments are closer to the code than other docs. 38@PeterHilton •
  • 40. Capitalized, short (50 chars or less) summary More detailed explanatory text, if necessary. Wrap it to about 72 characters or so. In some contexts, the first line is treated as the subject of an email and the rest of the text as the body. The blank line separating the summary from the body is critical (unless you omit the body entirely); tools like rebase can get confused if you run the two together. Write your commit message in the imperative: "Fix bug" and not "Fixed bug" or "Fixes bug." This convention matches up with commit messages generated by commands like git merge and git revert. Further paragraphs come after blank lines. - Bullet points are okay, too - Typically a hyphen or asterisk is used for the bullet, followed by a single space, with blank lines in between, but conventions vary here http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
  • 41. Commit messages (instead of comments) Write a short subject line. Add additional paragraphs to explain: why a change was necessary, how the change addresses the issue, what changed, why you made the change the way you did, consequences of the change 40@PeterHilton •
  • 42. README-Driven Development ‘… we have projects with short, badly written, or entirely missing documentation… There must be some middle ground between reams of technical specifications and no specifications at all. And in fact there is. That middle ground is the humble Readme.’ http://tom.preston-werner.com/2010/08/23/readme-driven-development.html 41@PeterHilton •
  • 43.
  • 44. Today I Learned (TIL) Short independent articles that each document one thing. Markdown files in a GitHub repository.
  • 45.
  • 46. Tutorials, instructions & other written forms 44@PeterHilton • Something you’re working on doesn’t have docs. A solution to a specific problem is useful for someone. The only tutorial on a topic can get a lot of page views. You might even get a little bit famous in a community. Publish on a blog, on Stack Overflow or in a TIL repository.
  • 48.
  • 49. Public API docs The best API docs are written by hand (tools are for layout). Structure and consistency are crucial. API docs generators solve structure and layout - 
 a less interesting problem - and don’t write docs for you Java/Scaladoc, Swagger, Silk, Spring REST Docs 47@PeterHilton •
  • 50. Chat rooms Team chat is essential for development teams … and we’ve come a long way since IRC Chat can replace some documentation if search is good (search is why it’s worth paying for Slack) Cheaper alternatives include: HipChat, Gitter Lack of search is why you don’t use Skype for group chat 48@PeterHilton •
  • 51. Wikis & other tools for talking code Despite the alternatives, you usually still need a document- based system for internal software documentation. :) Wikis replaced Microsoft Word docs on shared drives. :( Wiki software has been stagnant for a decade. Confluence turned into something else. Modern alternatives are closed platforms. GitHub Wiki might be as good as it gets. 49@PeterHilton •
  • 52. /** * Calculates cuteness in the range 0-10. * * Idempotent; does not modify the kittens. * * Reference Kitten (previous slide) defines cuteness score 10. * * Returns 0 for dead kittens (not cute). * * Throws NullKittenException if list contains a null kitten. * * Throws IllegalKittenException if list contains a non-kitten. */ Integer calculateAverageCuteness(List<Kitten> kitten)
  • 53. Enrico / CC BY 2.0
  • 56. ?- How many Prolog programmers does it take 
 to change a lightbulb?
 false
  • 57. Take-aways: tools, tips & practical techniques
  • 58. Write a project/project introduction Write an introduction (README) for your software: Explain the purpose and scope Summarise what it does. Write installation and development instructions. Publish tutorials online. Don’t forget to write (good) code comments. 56@PeterHilton •
  • 59. Write good code comments Try to write good code first (and tests!). Try to write a one-sentence comment. Refactor the code (make it easier). Delete unnecessary comments (just like unused code). Rewrite bad comments (all good writing requires rewriting) Add detail where needed. 57@PeterHilton •
  • 60. Comments are not the enemy. Meetings are the enemy! @PeterHilton • 58
  • 61. Write detailed installation/test instructions Detailed instructions make every keystroke/click explicit. ‘On the process start form, in the Answer field, enter 42.’ Surprisingly easy to write. Surprisingly valuable (in time that readers save). Automate installation/testing where you can … and write procedures for what’s left. 59@PeterHilton •
  • 62. Understand who and what the docs are for ‘There should be documentation’ isn’t enough. Work out who needs the docs: your future self, other developers, users, 
 managers & other stakeholders. Use documentation to reduce costs, e.g. installation effort or team handover. 60@PeterHilton •
  • 63. Aim to write the Minimum Viable Documentation. The rest is waste. @PeterHilton • 61
  • 64. Specifications Some complex systems require documentation for a specific area that is hard to understand Architecture diagram UML diagram Data dictionary Process model Business rules 62@PeterHilton •
  • 65. Choose the right kind of docs README Installation instructions (step-by-step) Code comments TIL (Today I Learned) Tutorials API documentation Specifications (rarely) Presentations :) 63@PeterHilton •
  • 66. Use Markdown or similar Things that seemed like a good idea at the time: troff, SGML, RTF, DocBook, XHTML, XSL-FO Things that seem like a better idea now: Markdown, reStructuredText, AsciiDoc The ultimate text markup language is still: HTML 64@PeterHilton •
  • 67. Use humour There’s no rule that says that jokes aren’t allowed. Insufficiently serious documentation is probably not your biggest problem. Staying awake might be. Humour isn’t magic. There are several practical theories of what’s funny. 65@PeterHilton •
  • 68. Choose an appropriate tool that you like GitHub repo - plain Markdown files GitHub Pages - Jekyll site builder GitHub Wiki - Gollum wiki Read the Docs - Sphinx docs builder Asciidoctor - asciidoc to many formats Swagger - API docs structure and layout Silk - API docs 66@PeterHilton •
  • 69. M A N N I N G Peter Hilton Erik Bakker Francisco Canedo FOREWORD BY James Ward Covers Play 2 Play for Scala
 (Manning, 2014) 
 Peter Hilton
 Erik Bakker
 Francisco Canedo http://bit.ly/playscala2p
  • 71. Summary Writing documentation sucks; … but has value and isn’t going away You need documentation, … but not very much of it Many developers hate writing it, … but not all of them You hardly have to write any; … you might find someone else to write the rest 69@PeterHilton •