Successfully reported this slideshow.
Your SlideShare is downloading. ×

FP adoption at REA

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad

Check these out next

1 of 117 Ad

FP adoption at REA

Download to read offline

Functional programming has made great strides in the popular imagination, yet adoption of FP languages has often been challenging for companies, sputtering in fits and starts. Ken has been at the forefront of REA's successful adoption of FP over four years, and will share lessons learnt and traps avoided: how a human-first approach can succeed and scale.

Functional programming has made great strides in the popular imagination, yet adoption of FP languages has often been challenging for companies, sputtering in fits and starts. Ken has been at the forefront of REA's successful adoption of FP over four years, and will share lessons learnt and traps avoided: how a human-first approach can succeed and scale.

Advertisement
Advertisement

More Related Content

Similar to FP adoption at REA (20)

Advertisement

Recently uploaded (20)

FP adoption at REA

  1. 1. FP adoption at REA A human-first approach @KenScambler
  2. 2. 11
  3. 3. Major companies using FP
  4. 4. FP journey
  5. 5. • ~150 developers in Melbourne • ~100 TW consultants in China • ~90 in Malaysia • Handful in Singapore, Thailand, Indonesia
  6. 6. 2013 2014 2015 2016 2017 Teams using Scala
  7. 7. 2013 2014 2015 2016 2017 Scala codebases 100 0 50 1 7 17 38 91 Total codebases: ~5200 ~2% are Scala
  8. 8. Beyond Scala Of 858 public channels: • #28 all-time messages • #28 total members • #32 users posting messages
  9. 9. Weekly FP Guild session 2013 2014 2015 2016 2017 0 50 10 15 18 25 Attendance/week 10 20 30 40 4 15 14 17 … Different presenters
  10. 10. YOW Lambda Jam 2017 C◦mp◦se :: Melbourne 2017
  11. 11. Human approach
  12. 12. SOFTWARE COMPANY • Solve my problems • Help me do what I do • On time • Supported Customers Real world Software
  13. 13. Customers Users SOFTWARE COMPANY • Easy to use • Make my life easier • Reliable
  14. 14. Customers Users Management • Bottom line • Hiring? • Long term view • Org health • Manage risk
  15. 15. Customers Users Product Managers • Verify assumptions • Features! • Time to market Management
  16. 16. Customers Users Product Managers Management • Sleep at night • Visibility • Uptime, security, latency, performance, etc Site Ops
  17. 17. Customers Users Product Managers Management • Determinism • Reproducibility • Confidence Site Ops QAs
  18. 18. Customers Users Product Managers Management • Do great work • Solve problems • Feel productive • Learn!Site Ops QAs Developers YOW
  19. 19. Customers Users Product Managers Management Site Ops QAs THE CODEDevelopers YOW
  20. 20. Tech is ok, but nothing makes sense unless it makes people’s lives better YOW
  21. 21. The easy bit YOW THE HARD BIT
  22. 22. YOW Why bother?
  23. 23. • Input  Output • Less moving parts • Less coupling • Fewer possible incorrect programs • Better separation of concerns THE CODE
  24. 24. THE CODE • Can actually know things about the code • Refactoring is easier! • Great code reuse • I’m learning! Developers YOW
  25. 25. THE CODEDevelopers YOW QAs • Same input gives same response! • We can reproduce things
  26. 26. THE CODEDevelopers YOW QAs • Rarely fails, in well understood ways • I can sleep Site Ops
  27. 27. THE CODEDevelopers YOW QAs • Devs could painlessly bolt my features on that old codebase! • I don’t hear “no” as often Site Ops Product Managers
  28. 28. THE CODEDevelopers YOW QAs Site Ops Product Managers Management • Great for hiring! • Vibrant, energetic team • Microservices mitigate risk in tech choice
  29. 29. THE CODEDevelopers YOW QAs Site Ops Product Managers Management Customers / Users • Reliable! • Regular updates
  30. 30. Tech choices are important because they can make people’s lives better YOW
  31. 31. YOW
  32. 32. YOW
  33. 33. Alan Turing Turing machines Alonzo Church The Lambda Calculus Programming languages existed before computers did
  34. 34. Programs exist like numbers exist!
  35. 35. 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 of human error Long-term consequence Happiness, productivity & wisdom Quit and become a dentist like Mum always wanted
  36. 36. ...It would be a mistake to characterize lambda calculus as a universal language, because calling it universal is too limiting. Phil Wadler
  37. 37. @ FP Guild, team dojos Chat channels Shared norms Central expert group #
  38. 38. shared norms iOS shared norms shared norms shared norms Weekly guild meetings #functionalprogramming
  39. 39. Weekly guild meetings #functionalprogramming #sig-scala shared norms shared norms shared norms
  40. 40. advice code review articles support secondmenttraining sessions shared norms shared norms shared norms Central expert group
  41. 41. 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!
  42. 42. Maybe We’ve got a couple of Scala devs, and the rest of the team is keen. We want more maintainable assets. I can pay for an up-front learning curve. Maybe. Here’s some options, tradeoffs etc...
  43. 43. 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
  44. 44. Good signs Bad signs • Stable, established team • Existing FP/Scala experience • Project can bear learning curve • Good sentiment • Local developers • Realistic expectations • Unstable team • Nobody knows Scala/FP • Very tight deadlines • Mixed or negative sentiment • Offshore developers • “It’s the cool new thing” • “We’ll be immediately more productive”
  45. 45. Case study 1: Colliding teams Chalk Services Cheese Experience
  46. 46. Time for a re-org! You are now the “Chalk & Cheese Dept”
  47. 47. Hi there! Welcome! Hooray! Let’s get to work.
  48. 48. The hell am I even looking at
  49. 49. Seriously, I’ve been doing this for 10 years and now I can’t do anything
  50. 50. Oops! Let’s scale it back a notch.
  51. 51. Cheers! No worries! You’re doing great.
  52. 52. 6 months later… Oof. This is all 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.
  53. 53. We have to help our teammates! I’ll make tutorials… I’ll run a weekly training session!
  54. 54. 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?
  55. 55. Case study 2: Decay & drift Time for something new! Let’s use Scala
  56. 56. Can you help us with some weekly training sessions? Sure!
  57. 57. 6 months later… turnover!
  58. 58. What do we do with this thing?
  59. 59. I never really wanted this tbh Me neither
  60. 60. 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!
  61. 61. Sure, I can fit you in once/week! Could you help us with some training?
  62. 62. It’s up to me to make sure my teammates are having a good time with this
  63. 63. Let’s keep it simple… Good idea!
  64. 64. val modifyBanana(b: Banana): Banana = ???
  65. 65. val modifyBanana(b: Banana): Banana = ???Oh man. Struggling. Let’s slow down! I’ll help out.
  66. 66. Weekly survey How are you finding it? 1 5 etc 1 5 Can you use technique X in anger? Let’s keep track of out progress, to work out how we’re doing!
  67. 67. val modifyBanana(b: Banana): Banana = ??? Still struggling. You’re doing great! We’ll all help
  68. 68. 6 months later… success! Project was a success! Well done team! We’re really happy with this code! We’ve levelled up!
  69. 69. Antipatterns How FP adoptions fail
  70. 70. Antipattern 1: Under the rug I’m going to lose my hipster badge at this rate
  71. 71. Haskell in prod, LIVING THE DREAM BABY!!!
  72. 72. Where did this come from?? I never would have agreed to this! It looks weird and we didn’t sign up for this
  73. 73. Antipattern 2: Wizard Tower
  74. 74. Profunctor optics! Church-encoded free monad. Left Kan extension enriches our algebra into a functor…..etc Why on earth would we care about all that? Tense, fragile situation…
  75. 75. Soon enough… Howdy folks I’m the new CTO! I’m really excited to….GOOD LORD what is going on there
  76. 76. You hear something? Nope.
  77. 77. Antipattern 3: Flock of seagulls Can you folk help us out? AgileConsultyCorp Sure can!
  78. 78. This will never do! Let’s add some AgileConsultyCorp pizzazz!
  79. 79. FP Guild Every Wednesday 4pm without fail f ◦ (g ◦ h) = (f ◦ g) ◦ h
  80. 80. 2014 f ◦ (g ◦ h) = (f ◦ g) ◦ h 4x
  81. 81. 2015 (theory) f ◦ (g ◦ h) = (f ◦ g) ◦ h 15x (12x first time speakers)
  82. 82. 2016 (theory)f ◦ (g ◦ h) = (f ◦ g) ◦ h 14x (6x first time speakers)
  83. 83. 2017 f ◦ (g ◦ h) = (f ◦ g) ◦ h (theory)17x (7x first time speakers)
  84. 84. Low bar • Timebox to 2 hours prep, max • Lower bar means more speakers • More diverse speakers • Sanity for organisers
  85. 85. Consistency “The show doesn’t go on because it’s ready; it goes on because it’s 11:30.” - Lorne Michaels, SNL creator
  86. 86. Consistency • Consistency is really important for building confidence in a group • Every Wednesday 4pm without fail, 4 years running • (except for Christmas & Hackathons)
  87. 87. Consistency 1. Call for talks on Monday 2. Pester individuals 3. Riff on something off the top of head 4. Watch video Fallbacks:
  88. 88. Variety Same thing…
  89. 89. Variety Same thing…
  90. 90. Variety Same thing…
  91. 91. Variety Same thing… Week-to-week variety in speakers & topics is important!
  92. 92. Look after beginners and the experts will look after themselves
  93. 93. Blah blah monad stack, typeclass coherence I’ll bet I’m the only person who doesn’t understand this Imagined:
  94. 94. 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
  95. 95. • Natural bias toward advanced talks • Encourage beginner talks • Encourage beginners talking! • Bigger, more diverse crowds
  96. 96. • Functional programming is totally awesome • Technical benefits are worth pursuing • None of it matters a damn unless you can make it help people • By taking a human-first approach, a sustainable, self-perpetuating culture of learning and achievement is possible, to everyone’s benefit Conclusion

×