A presentation by @stuherbert
for @GanbaroDigital
Automate, Automate,
AUTOMATE!
An Introduction For Developers
Slide 2
Slide 2 text
Industry veteran: architect, engineer,
leader, manager, mentor
F/OSS contributor since 1994
Talking and writing about PHP
since 2004
Chief Software Archaeologist
Building Quality @GanbaroDigital
About Stuart
Slide 3
Slide 3 text
Follow me
I do tweet a lot about
non-tech stuff though :)
@stuherbert
Slide 4
Slide 4 text
@GanbaroDigital
??
??
What automation
do you use today?
Slide 5
Slide 5 text
@GanbaroDigital
??
??
Why do you use
automation?
Slide 6
Slide 6 text
@GanbaroDigital
https://unsplash.com/photos/cDwZ40Lj9eo
Story #1: Cannot Compile
Slide 7
Slide 7 text
@GanbaroDigital
Why We Automate
Slide 8
Slide 8 text
@GanbaroDigital
Automation is often
introduced to help with ...
Slide 9
Slide 9 text
@GanbaroDigital
https://unsplash.com/photos/mqpMdf1MeRE
Common
Practices
@GanbaroDigital
Development
Integration
Testing
Deployment
Desktops, laptops,
cloud workspaces / VDM
above & on CI services
Slide 38
Slide 38 text
@GanbaroDigital
Development
Integration
Testing
Deployment
Desktops, laptops,
cloud workspaces / VDM
above & on CI services
same as above
Slide 39
Slide 39 text
@GanbaroDigital
Development
Integration
Testing
Deployment
Desktops, laptops,
cloud workspaces / VDM
above & on CI services
same as above
same as above
Slide 40
Slide 40 text
@GanbaroDigital
When you introduce automation,
make sure that it doesn't
reduce flexibility.
Slide 41
Slide 41 text
@GanbaroDigital
Always remember
that you'll still need
to make emergency releases too!
Slide 42
Slide 42 text
@GanbaroDigital
There are no specific tools
in this talk.
Tools come and go.
Slide 43
Slide 43 text
@GanbaroDigital
Development
Slide 44
Slide 44 text
@GanbaroDigital
??
??
What automation
can we use
to write code faster?
Slide 45
Slide 45 text
@GanbaroDigital
1. Code completion
Slide 46
Slide 46 text
@GanbaroDigital
2. Refactoring tools
Slide 47
Slide 47 text
@GanbaroDigital
3. Code formatting
Slide 48
Slide 48 text
@GanbaroDigital
IDE Tools For Automation
1. Code completion
2. Refactoring help
3. Code formatting
Slide 49
Slide 49 text
@GanbaroDigital
??
??
What about
code generation?
Slide 50
Slide 50 text
@GanbaroDigital
Many frameworks
will provide
template / skeleton generators.
Slide 51
Slide 51 text
@GanbaroDigital
Some frameworks
will rewrite your code
to help you upgrade.
Slide 52
Slide 52 text
@GanbaroDigital
Integration
Slide 53
Slide 53 text
@GanbaroDigital
??
??
What is integration?
Slide 54
Slide 54 text
@GanbaroDigital
“
Integration
is how you deliver
into your team's collective work.
Slide 55
Slide 55 text
@GanbaroDigital
“Integration is adding
your changes to everyone else's
and proving
you haven't broken anything.
Slide 56
Slide 56 text
@GanbaroDigital
??
??
How can automation
help us deliver quicker?
Slide 57
Slide 57 text
@GanbaroDigital
A CI server (or service)
can automate
checking a merge request.
Slide 58
Slide 58 text
@GanbaroDigital
??
??
If we have a CI server,
what kinds of checks
can we automate?
Slide 59
Slide 59 text
@GanbaroDigital
1. Reproducible builds
Slide 60
Slide 60 text
@GanbaroDigital
2. Unit tests pass
Slide 61
Slide 61 text
@GanbaroDigital
3. Gather code metrics
Slide 62
Slide 62 text
@GanbaroDigital
4. Static code analysis
Slide 63
Slide 63 text
@GanbaroDigital
??
??
How many of these
automated tasks
help us deliver quicker?
@GanbaroDigital
??
??
Do all the test approaches
help us all the time?
Slide 94
Slide 94 text
@GanbaroDigital
https://unsplash.com/photos/IClZBVw5W5A
Right Tool For Each Job
Slide 95
Slide 95 text
@GanbaroDigital
“
Unit tests help us
develop libraries faster.
Slide 96
Slide 96 text
@GanbaroDigital
“
Functional tests
help us develop
the app or API faster.
Slide 97
Slide 97 text
@GanbaroDigital
“
Acceptance tests
help us invoice faster.
Slide 98
Slide 98 text
@GanbaroDigital
https://unsplash.com/photos/ZSrgSSGJiQs
Story #2
The Best Metrics
Slide 99
Slide 99 text
@GanbaroDigital
The testing
failed to catch
errors from the design phase.
Slide 100
Slide 100 text
@GanbaroDigital
The Testing Fell Short
1. Over-reliance on unit tests w/ mocks
2. Manual functional testing
3. No representative environment to test within
Slide 101
Slide 101 text
@GanbaroDigital
Deployment
Slide 102
Slide 102 text
@GanbaroDigital
??
??
How can automating deployment
help us iterate faster?
Slide 103
Slide 103 text
@GanbaroDigital
We need somewhere
to run and test our code.
Slide 104
Slide 104 text
@GanbaroDigital
??
??
Can you spin up
a representative environment?
Slide 105
Slide 105 text
@GanbaroDigital
??
??
Can you spin one up
on your dev box?
Slide 106
Slide 106 text
@GanbaroDigital
Two Layers of Deployment
1. Representative environment
2. Deploying code into that environment
Slide 107
Slide 107 text
@GanbaroDigital
Don't merge them
into a single activity.
Slide 108
Slide 108 text
@GanbaroDigital
??
??
How do you automate
your deployment today?