A talk on habits, programming and motorcycles (closing Keynote, Garden City Ruby Conf 2015)
RACECONDITIONhabits, programming & motorcycles
View Slide
@niranjan_pNiranjan ParanjapeFounding Partner & CTO C42 Engineeringachamian
@ponnappaSidu PonnappaFounding Partner & CEO C42 Engineeringkaiwren
Yamaha R15
KTM RC390
Triumph Daytona 675R
Don’t Panic
There Are Two Kinds OfProgrammersthose who live in fear and those who don’t
Fear Makes You Slow
Fear Makes You Avoid Change
Fear Causes Panic
Panic Causes Mistakes
You Don’t Learn When Panicked
Your Mind is the Bottlenecknot your bike
Push Yourself to Go Faster…but without causing a panic attack every five minutes
Do Not TrustYour Instincts
Your Human Instincts Are Wrong(especially in a new context)
Copy-Paste OrientedDevelopment
Crunch Mode: Stop Writing Tests
Fat Controller Skinny Model
Hot Fix on Production
Default Instincts Need Re-training
Panic Braking(destabilises the bike)
Chopping Throttle(when getting on the gas is the right thing to do)
Your Strongest Instincts WillWork Against You(they may even cause you to crash)
Understand and Compensate forSurvival Reactions(panic is the enemy)
You ImproveWhat YouMeasure
We All Track Metricscode coverage, cyclomatic complexity, velocity…
Measurements Introduce Biasesloc as a productivity metric #fail
Areas of Interest Create Biasesbeautifully architected codebase, no working code #fail
Measure Everything You Canlap times, sector times, rpm, gearing…
Train One Metric at a Timeit’s hard to improve in two areas simultaneously at 100+ kmph
Local Maxima != Global Maximasometimes improving one corner reduces overall lap times
Focus Is ACurrency
You Never Fix Two Bugs at theSame Timejuggling is for jugglers
You Always Prefer Fine GrainedAbstractionsdecoupling help you think more clearly
You Hate Side Effectsbecause side effects cause bugs
You Are Always Quicker Whenthe Architecture is WellUnderstoodfewer decisions, more time to think about each of them
You Are Always Quicker With AComprehensive Spec Suiteyou don’t have to evaluate side effects in your head, so fewerdecisions
Focus is a Currencyand everyone has a finite budget
You Spend Focus When YouMake Decisionsso you want to save up for important decisions
You Spend Focus When YouMake Decisionsand everyone has a finite budget
Habits Save On Trivial DecisionMakingall you need to do is practice
Go Slow To GoFast
Overall Consistency Trumps SpotPerformancefrequent death marches slow you down
We Know Learning Takes Time
But Not Learning Takes Longer
We Know Katas are Valuable
We Treat these as Investmentswe trade spot performance in the short-term for consistentperformance in the long-term
CONSISTENCY
Be an Investorinvest the time it takes to get better
Investments Take Time to Maturedon’t be impatient, you will go slower
Invest in Practicepractice common decisions through drills to save focus
Drillsthrottle control, braking, counter steering, lines…
Define YourProduct
We Understand the Importanceof Clear Requirements
We Use Tools like User Stories
We Value Clear AcceptanceCriteria
Knowing Desired OutcomesReduces Errors
Define the Productfor every corner
Clarify the Tradeoffseasy to unintentionally trade entry speed for exit speed
Tune your Markersmarkers are essential to optimising your cornering
Know YourEnvironment
Picking the Right Tools Mattersruby for number crunching cobol for web applications
We Constantly Optimize OurDevelopment EnvironmentsOS, shell, editor, IDE, macros…
We Constantly Tune OurConfigurationsdotfiles
We Know Our Projects Inside-Outarchitecture, domain, ops
Choose Your Kit
Motorcycles are More Specializedthan we Think
Track Bikes are HeavilyOptimizedposture, handling, comfort, storage, range, mileage, powerdelivery, braking
Non-Track Bikes are a Bad Ideaok for MVP, but not to scale
Customize Your Bike Further ToSuitadjust brakes, lever play, suspension, gearing etc. to your needs
Know Your Tracksurface, camber, corners, lines
Hack YourHabits
Instincts can be hackedturn a disadvantage into a strength
You Go Where You Lookmeasure loc, you get loc measure customer focus, you get customer focus
Target Fixation
You Literally Go Where You Lookuse this to go faster, not just avoid crashes
When You’re GoingDown, You’reGoing Down
High Side
PHOTO CREDITSRaniel Diaz, https://flic.kr/p/cGsPDY !Pair Programming, http://commons.wikimedia.org/wiki/File:Pair_programming_1.jpg !Lorenzo crashes out of the lead of the ValenciaMotoGP. Source, Alberto Siz / AP
Q & A@niranjan_pNiranjan ParanjapeFounding Partner & CTO C42 Engineeringachamian@ponnappaSidu PonnappaFounding Partner & CEO C42 Engineeringkaiwren