Injustice - Developers Among Us (SciFiDevCon 2024)
Get lean tutorial
1. Get Lean
Slimming Down with Rails
Marty Haught
@mghaught
http://martyhaught.com
http://github.com/mghaught/getlean
2. tutorial’s goal
• introduce lean concepts
• discuss the how and why
• demonstrate Rails-specific techniques
• give you a starting place to go further
3. session guidelines
• questions are welcome at any point
• let’s be interactive
• encourage conversations
• we’ll have breaks
4. context for today
• limited resources (time & money)
• uncertain of solution
• unknown market
5. outline
1. lean overview
2. rails basics
3. focusing on value
4. minimize effort
5. measuring
6. delivering fast
14. history of lean
• emerged from manufacturing in the 50s
• Toyota production system
• translated for software projects in 90s
• influenced agile thinking
15. lean startups
“translating your startup vision into a successful
business as quickly and efficiently as possible”
Eric Ries
http://www.startuplessonslearned.com/
18. changed my view
• much like when I discovered XP in 2004
• think just as much about the business as
the technical
• engineers should ‘own’ the business side
23. master your stack
• practice your art to get faster
• use plugins and gems for common
functionality
• anything to let you focus more on what’s
important
24. context is king
• pick the right amount of process
• start simple and add on as you go
• know when not to use lean
“A solar death ray assembler would likely need more
testing and process than a twitter-based web app.”
25. context changes
• what worked for the start of the project
may not fit once you enter into
maintenance mode
• the larger the organization, the more the
process
• accept that you will likely have to re-
evaluate
27. defining your product
• knowing your vision
• clarify and agree as a team
• what is your value?
• why are you creating this software?
28. business value
• how do you define success?
• how do you measure it?
• will people use it?
• who?
29. agile’s customer
• dev team takes direction from client
• no questioning of business motives in
feature requests
• engineers don’t ‘own’ the business side
44. lessons learned
• start simple and launch early
• validate against real use
• get out of the building and talk to people
45. minimum viable product
• rails rumble or startup weekend
• starting place for validated learning with the
least effort
• should be embarrassing
• early adopters see the potential
50. simplicity
• strip features to the essence that achieves
value
• spiking large features
• “do the simplest thing that could possibly
work”
51. delay commitment
• pushing off decisions, commitment until the
last possible moment
• yagni - you ain’t going to need it
• no really, be militant about pushing things
off
52. reducing waste
• core value of lean, eliminating waste
• does your current task add business value?
• eliminate activity that doesn’t contribute to
progress
• re-evaluate the value of what you’re doing
54. Develop only for the current
Overproduction Extra Features
story
Story cards are detailed only
Inventory Backlog, Requirements
for the current iteration
Extra Processing Extra Steps Code directly from stories
Have everyone in the same
Motion Finding Information
room; customer included
Test first; including acceptance
Defects Defects not caught by tests
tests
Waiting Waiting, Including Customers Deliver in small increments
Developers work directly with
Transportation Handoffs
customers
64. what to measure?
• will the new story add value?
• how will you measure progress?
• define when new stories are created
• best when it’s one of your core metrics
65. split testing
“presenting two or more variations and
measuring user behavior to determine value”
71. small batches
“amount of finished work that can be shipped”
• reduce to smallest, meaningful chunks
• reduces integration costs
• helps avoid overproduction
• think hours not days
72. kanban
• a pull-based system for continuous flow of work
• expression of just in time
• emphasis on flow
http://www.limitedwipsociety.org/
73. science behind it
• queueing theory
• theory of constraints
• proven in world of manufacturing
• working in software projects
74. agile’s iteration
• fixed time box, such as two weeks
• IPM to cover a set of stories
• make estimates
• velocity to determine what fits
75. reducing waste
• no need to estimate
• no need to force stories to fit
• just in time meetings
• no big batch of stories
77. kanban benefits
• simple, less process
• limit work in progress, maximize
throughput
• more easily spot bottlenecks
• easy to change direction
• less inventory of requirements/stories
• less time in meetings
79. kanban-tracker hybrid
• one week iterations
• ultra light weight complexity ‘estimates’
• continuously add stories to backlog as
needed
• no ipm, just in time discussions
• deploy stories when complete
90. benefits
• eliminates waste on shipping code
• features go live sooner
• reduce shelf time for finished work
• find integration issues quickly in isolation
94. test all the f’n time?
• don’t blindly follow some guideline
• does 100% coverage have business value?
• are all tests valuable?
• cost of writing/maintaining all tests?
• cost of failure/bugs?
95. value of testing
• not all project phases value testing equally
• larger the team, the greater the need
• context really matters
96. phases of a startup
Kent Beck
http://www.threeriversinstitute.org/blog/?p=251
1. Taxi (find a need)
2. Takeoff (validate need has a problem)
3. Climb (scaling)
4. Cruise (manage)
97. lean up your tests
• consider business value of features tested
• view tests as a garden, must prune
• strong integration layer
• test interesting/tricky business logic
• look for high value, small footprint tests
• skip rarely used areas like admin UI
98. takeaway
• really understand value for your project
• focus on tasks that add value
• ship early and continuous
• automate all that you can
• minimize effort to get feedback asap