This deck represents our current thinking about the best way to build enterprise SaaS software in 2015 - using a variety of techniques from several disciplines.
Since I wrote this I have also become very interested in resilience engineering and the notion that web developers are primarily engaged in the construction of socio-technical systems. When I rewrite this I plan to talk about how we should try to minimize mean-time-to-recover (MTTR) instead of mean-time-between-failures (MTBF), and how continuous deployment grows a safety culture around your operations.
I redacted most of the examples that illustrate these points because they use sensitive code examples or URLs. If you want to see the rest of slides, join us!
27. Goal
• Strategic objective that helps STAQ grow
• Increases revenue or reduces costs, or both
• Expressed as a single sentence, completely in
business terms, associated with a deadline
• “Charge customers for use of custom
connections by 12/01/2015”
28. Epics
• Major, high-level initiative to help achieve a Goal
• Complex effort encompassing changes to multiple
codebases
• Expressed in business terms, in terms of user
capabilities, with a deadline
• “Users can view, create, update, and delete custom
connections on their own by 11/15/2015”
• Constantly reprioritized as the project deadline
approaches
29. Push back
• AMs/TAMs should always push us to deliver our best,
advocating for customer
• We should push back when real constraints exist
• Helps everyone be more creative
• Helps clarify priorities
• 80% / incremental solutions often good enough
• Resist the urge to dive in and save the day
30. Refactoring &
maintenance cycles
• Count on about a week of fixing and polishing
major features post-release
• After an epic or major project finishes, we do this
anyway; let’s plan for it
• Good time to handle chores, smaller feature
tickets & bug fixes
39. Use the staging server
• https://staging.staq.com
• https://sites.google.com/a/staq.com/
staqnowledged/home/infrastructure/staging-
server
40. Fork the app
• Good for testing database changes
• Need someone to try & document this
• https://devcenter.heroku.com/articles/fork-app
• May need to fork multiple apps in concert
• Heroku addon attachment feature pretty cool
43. Design solid code
open to future change
But also beware of YAGNI
(You Ain’t Gonna Need It)
44. Make it easy to test
This is the main point of BDD; produces better designs
45. Lint Ruby and JS Code
• Rubocop
• ruby -c after every save
• Let’s make this a git pre-commit hook
• brew install jsl
46. Keep writing tests
• Unit tests: 100% coverage
• Usually no need to test explicit string contents
• Integration test: all major subsystems
• Including failure modes
• Acceptance test: most features, important failure
modes
• Smoke test: engines/gems integrated into apps
47. Tests must always
pass on CI
Fixing the build should usually
take precedence over other work
48. Keep Classes Small
• “One screenful or less”
• Not counting documentation
• Almost no private methods
• There’s always a better way, look for a hidden
object
56. You are only done when…
• Documentation written (YARD tags + wiki)
• Unit tests written to 100% coverage
• Integration tests covering important subsystem
interactions
• Acceptance tests covering important features
and failure modes
• Code reviewed by a peer