FP adoption at REA
A human-first approach
@KenScambler
FP adoption at REA A human-first approach @KenScambler 11 Major - - PowerPoint PPT Presentation
FP adoption at REA A human-first approach @KenScambler 11 Major companies using FP FP journey ~150 developers in Melbourne ~100 TW consultants in China ~90 in Malaysia Handful in Singapore, Thailand, Indonesia Teams using
A human-first approach
@KenScambler
11
Indonesia
2013 2014 2015 2016 2017
2013 2014 2015 2016 2017
100 50 1 7 17 38 91
Total codebases: ~5200 ~2% are Scala
Of 858 public channels:
2013 2014 2015 2016 2017 50 10 15 18 25 Attendance/week 10 20 30 40 4 15 14 17 … Different presenters
YOW Lambda Jam 2017 C◦mp◦se :: Melbourne 2017
SOFTWARE COMPANY
do
Customers
Real world Software
Customers Users
SOFTWARE COMPANY
life easier
Customers Users Management
Customers Users Product Managers
Management
Customers Users Product Managers Management
latency, performance, etc Site Ops
Customers Users Product Managers Management
Site Ops QAs
Customers Users Product Managers Management
Site Ops QAs Developers
YOW
Customers Users Product Managers Management Site Ops QAs
THE CODE
Developers
YOW
Tech is ok, but nothing makes sense unless it makes people’s lives better
YOW
The easy bit
YOW
YOW
Why bother?
programs
concerns
THE CODE
THE CODE
about the code
Developers
YOW
THE CODE
Developers
YOW
QAs
same response!
things
THE CODE
Developers
YOW
QAs
understood ways
Site Ops
THE CODE
Developers
YOW
QAs
painlessly bolt my features on that old codebase!
Site Ops Product Managers
THE CODE
Developers
YOW
QAs Site Ops Product Managers Management
team
risk in tech choice
THE CODE
Developers
YOW
QAs Site Ops Product Managers Management Customers / Users
updates
Tech choices are important because they can make people’s lives better
YOW
YOW
YOW
Alan Turing Turing machines Alonzo Church The Lambda Calculus
Programming languages existed before computers did
Fundamental software principles
Applicability VS
Last week’s hot web framework
Every single day Every language Every problem Every context Next 6 months, if you’re lucky Substance Eternal and unchanging fabric of the universe Eternal hamster wheel of memorising steaming piles
Long-term consequence Happiness, productivity & wisdom Quit and become a dentist like Mum always wanted
...It would be a mistake to characterize lambda calculus as a universal language, because calling it universal is too limiting.
Phil Wadler
FP Guild, team dojos Chat channels Shared norms Central expert group
shared norms iOS shared norms shared norms shared norms Weekly guild meetings #functionalprogramming
Weekly guild meetings #functionalprogramming #sig-scala shared norms shared norms shared norms
advice code review articles support secondment training sessions shared norms shared norms shared norms
Central expert group
Should my team use Scala?
Hey do you mind helping out with some advice for my team? We’re thinking about using Scala for the new service… Sure!
Maybe
We’ve got a couple of Scala devs, and the rest
We want more maintainable assets. I can pay for an up-front learning curve.
some options, tradeoffs etc...
We have tight deadlines, a new team of junior Ruby programmers, multiple stakeholders, and half our team is in Xi’an. I heard Scala will make us more productive. How can I make them like it?
ABSOLUTELY NOT
Good signs Bad signs
productive”
Case study 1: Colliding teams
Chalk Services Cheese Experience
Time for a re-org! You are now the “Chalk & Cheese Dept”
Hi there! Welcome! Hooray! Let’s get to work.
The hell am I even looking at
Seriously, I’ve been doing this for 10 years and now I can’t do anything
Oops! Let’s scale it back a notch.
Cheers! No worries! You’re doing great.
6 months later…
going a bit slower than we thought… Not going to lie, this Scala/FP stuff is tough
Is this really the right approach for us? Hmmm.
We have to help our teammates! I’ll make tutorials… I’ll run a weekly training session!
6 months later… Success!
Woohoo! Productivity! This software is rock solid! Love it! Devs are knocking down the door to join. Great results. Future though?
Case study 2: Decay & drift
Time for something new! Let’s use Scala
Can you help us with some weekly training sessions? Sure!
6 months later… turnover!
What do we do with this thing?
I never really wanted this tbh Me neither
Case study 3: Empathy FTW
?
We do a lot of maintenance, quality matters. A lot of our stuff is already Scala. We really want to learn. I’m happy to invest in our skills!
Sure, I can fit you in
Could you help us with some training?
It’s up to me to make sure my teammates are having a good time with this
Let’s keep it simple… Good idea!
val modifyBanana(b: Banana): Banana = ???
val modifyBanana(b: Banana): Banana = ???
Oh man. Struggling. Let’s slow down! I’ll help out.
Weekly survey How are you finding it? 1 5 etc 1 5 Can you use technique X in anger?
Let’s keep track of
work out how we’re doing!
val modifyBanana(b: Banana): Banana = ???
Still struggling. You’re doing great! We’ll all help
6 months later… success!
Project was a success! Well done team! We’re really happy with this code! We’ve levelled up!
How FP adoptions fail
Antipattern 1: Under the rug
I’m going to lose my hipster badge at this rate
Haskell in prod, LIVING THE DREAM BABY!!!
Where did this come from?? I never would have agreed to this! It looks weird and we didn’t sign up for this
Antipattern 2: Wizard Tower
Profunctor optics! Church-encoded free
extension enriches
functor…..etc Why on earth would we care about all that?
Tense, fragile situation…
Soon enough… Howdy folks I’m the new CTO! I’m really excited to….GOOD LORD what is going on there
You hear something? Nope.
Antipattern 3: Flock of seagulls
Can you folk help us out? AgileConsultyCorp Sure can!
This will never do! Let’s add some AgileConsultyCorp pizzazz!
FP Guild
Every Wednesday 4pm without fail
f ◦ (g ◦ h) = (f ◦ g) ◦ h
f ◦ (g ◦ h) = (f ◦ g) ◦ h
4x
(theory)
f ◦ (g ◦ h) = (f ◦ g) ◦ h
15x
(12x first time speakers)
(theory)
f ◦ (g ◦ h) = (f ◦ g) ◦ h
14x
(6x first time speakers)
f ◦ (g ◦ h) = (f ◦ g) ◦ h
(theory) 17x
(7x first time speakers)
Low bar
Consistency
“The show doesn’t go on because it’s ready; it goes on because it’s 11:30.”
Consistency
confidence in a group
running
Consistency
Fallbacks:
Variety
Same thing…
Variety
Same thing…
Variety
Same thing…
Variety
Same thing…
Week-to-week variety in speakers & topics is important!
Look after beginners and the experts will look after themselves
Blah blah monad stack, typeclass coherence I’ll bet I’m the only person who doesn’t understand this
Imagined:
Blah blah monad stack, typeclass coherence I’ll bet I’m the only person who doesn’t understand this
Actual:
I’ll bet I’m the only person who doesn’t understand this I’ll bet I’m the only person who doesn’t understand this I’ll bet I’m the only person who doesn’t understand this I’ll bet I’m the only person who doesn’t understand this
culture of learning and achievement is possible, to everyone’s benefit
Conclusion