Documentation === Code

About Me

Eddie Jaoude

Passionate for #opensource #remote #inclusion

  • youtube.com/eddiejaoude
  • github.com/eddiejaoude
  • twitter.com/eddiejaoude
  • instagram.com/eddiejaoude

Overview

  • Why is documentation forgotten
  • Documentation should be treated like code
  • Tools that can help us like Asciidocs & AsciiDoctor
  • Example project

Questions / Translations

Pleae ask as we go along

Problem

Why is documentation forgotten about?
Sounds just like automated testing 10 years ago
But we are Agile?
Just enough

						c = a + b // b is added to a
						
Whats worse than no documentation?
Out of date documentation
Binaries (images / diagrams)

Solution

How can we solve this?
TDD became popular
Why not DocDD?
Treat docs as code
Markdown / Asciidocs
Examples

							| Tables        | Are           | Cool  |
							| ------------- |:-------------:| -----:|
							| col 3 is      | right-aligned | $1600 |
							| col 2 is      | centered      |   $12 |
							| zebra stripes | are neat      |    $1 |
						

							.Table Title
							|===
							|Name of Column 1 |Name of Column 2 |Name of Column 3

							|Cell in column 1, row 1
							|Cell in column 2, row 1
							|Cell in column 3, row 1

							|Cell in column 1, row 2
							|Cell in column 2, row 2
							|Cell in column 3, row 2
							|===
						
Asciidoctor to generate website / pdf etc

							sequenceDiagram
								participant Alice
								participant Bob
								Alice->>John: Hello John, how are you?
								loop Healthcheck
									John->>John: Fight against hypochondria
								end
								Note right of John: Rational thoughts
prevail... John-->>Alice: Great! John->>Bob: How about you? Bob-->>John: Jolly good!
CI, run build, linters, tests, docs, deploy etc
Demo

Conclusion

Write just enough docs
Treat as code & keep as part of the story / feature
No binaries

https://github.com/eddiejaoude/documentation-as-code-presentation

  • youtube.com/eddiejaoude
  • github.com/eddiejaoude
  • twitter.com/eddiejaoude
  • instagram.com/eddiejaoude