You shouldn’t need to reconstruct
entire chains of methods mentally.
Slide 27
Slide 27 text
inline
documentation
Slide 28
Slide 28 text
No content
Slide 29
Slide 29 text
TomDoc
Tom Preston-Werner, creator
Slide 30
Slide 30 text
def add_mustache(image)
end
Slide 31
Slide 31 text
# Public: This adds a mustache to an image.
#
# image - A String path to a local image on disk.
#
# Examples
#
# add_mustache(‘~/Desktop/zach.gif’)
# # => ‘/tmp/zach.mustache.gif’
#
# Returns the String path to the processed image.
def add_mustache(image)
end
Slide 32
Slide 32 text
# Public: This adds a mustache to an image.
#
# image - A String path to a local image on disk.
#
# Examples
#
# add_mustache(‘~/Desktop/zach.gif’)
# # => ‘/tmp/zach.mustache.gif’
#
# Returns the String path to the processed image.
def add_mustache(image)
end
Slide 33
Slide 33 text
# Public: This adds a mustache to an image.
#
# image - A String path to a local image on disk.
#
# Examples
#
# add_mustache(‘~/Desktop/zach.gif’)
# # => ‘/tmp/zach.mustache.gif’
#
# Returns the String path to the processed image.
def add_mustache(image)
end
Slide 34
Slide 34 text
# Public: This adds a mustache to an image.
#
# image - A String path to a local image on disk.
#
# Examples
#
# add_mustache(‘~/Desktop/zach.gif’)
# # => ‘/tmp/zach.mustache.gif’
#
# Returns the String path to the processed image.
def add_mustache(image)
end
Slide 35
Slide 35 text
# Public: This adds a mustache to an image.
#
# image - A String path to a local image on disk.
#
# Examples
#
# add_mustache(‘~/Desktop/zach.gif’)
# # => ‘/tmp/zach.mustache.gif’
#
# Returns the String path to the processed image.
def add_mustache(image)
end
Slide 36
Slide 36 text
plaintext
explicit
english
flexible
Slide 37
Slide 37 text
ruby
Slide 38
Slide 38 text
TINY
METHODS
Slide 39
Slide 39 text
SMARTER
METHODS
Slide 40
Slide 40 text
tests
......F...
.....F....
F.........
Slide 41
Slide 41 text
KNOW YOUR
INPUT &
OUTPUT
Slide 42
Slide 42 text
KNOW YOUR
EDGE
CASES
Slide 43
Slide 43 text
GitHub TomDocs its Ruby
JavaScript
Shell
CoffeeScript
C
Erlang
Slide 44
Slide 44 text
hating on
tomdoc
Slide 45
Slide 45 text
“My code is perfect.”
Slide 46
Slide 46 text
“No one updates documentation.”
Slide 47
Slide 47 text
“It’s too verbose.”
Slide 48
Slide 48 text
“My commit messages,
tests, and/or my left bicep
tattoos are my docs.”