Pro Yearly is on sale from $80 to $50! »

Tackling Android at Scale

Tackling Android at Scale

In this talk I presented our journey at N26 during from early 2018 until mid 2019, where we went from 5 to 27 developers and how we achieved technical readiness that supported that growth!

71b4edb678001f55b47bdde0741a0ff5?s=128

Fábio Carballo

July 03, 2019
Tweet

Transcript

  1. android.scale() @fabiocarballo

  2. “Building a bank the world loves to use.

  3. Hypergrowth mode

  4. 2014

  5. 2014 5 Number of Android devs

  6. 2016 5 Number of Android devs

  7. 2016 5 Number of Android devs

  8. 2017 5 Number of Android devs

  9. 5 2018 15 Number of Android devs

  10. 27 15 5 Now Number of Android devs

  11. 500% 1.5 years

  12. Technical Readiness Scale Recruiting Onboarding Automation Releases Team Culture

  13. How do we approach code?

  14. Broken Windows

  15. None
  16. What to consider defining your architecture?

  17. What to consider defining your architecture? -Reduce number of discussions

    -Embrace evolution -Favour testability -Protects from making mistakes
  18. Architecture

  19. Activity Reactive Dependency Injection Layered Architecture core:

  20. Reactive

  21. Receive 10 € into Main Account Reactive

  22. S1 S1 S2 S3 S1 spaces reactive store Receive 10

    € into Main Account spaces microservice GET /spaces Reactive Space Details View Model
  23. spaces reactive store spaces microservice GET /spaces Reactive Receive 10

    € into Main Account Space Details View Model
  24. S1 S2 S3 Spaces Dashboard View Model Space Details View

    Model spaces reactive store spaces microservice GET /spaces Reactive Receive 10 € into Main Account
  25. S1 S2 S3 S2 S3 S1 S2 S3 S1 S2

    S3 Space Details View Model spaces reactive store spaces microservice GET /spaces Reactive Receive 10 € into Main Account Spaces Dashboard View Model
  26. Feature Layered Architecture

  27. Domain Feature Presentation Data

  28. Domain Presentation Data Dependency Injection

  29. Domain Presentation Data Dependency Injection

  30. Domain Presentation Data Dependency Injection Dagger Glue

  31. Be ruthless about it Defining your tech stack

  32. -Which problem is it solving? Defining your tech stack

  33. -Which problem is it solving? -What is the impact? Defining

    your tech stack
  34. -Which problem is it solving? -What is the impact? -Is

    it actively maintained? Defining your tech stack
  35. -Which problem is it solving? -What is the impact? -Is

    it actively maintained? 2.0.1 2.0.2 2.1.0 2.2.0 2.3.0 2.4.0 2.5.0 Retrofit Version along 2.5 years Defining your tech stack
  36. Wrapping 3rd parties behind an interface is actually good.

  37. Wrapping 3rd parties behind an interface is actually good.

  38. app Camera Lib 1 - Keeping two Camera libs in

    the app Wrapping 3rd parties behind an interface is actually good.
  39. app Camera Lib 1 - Keeping two Camera libs in

    the app Wrapping 3rd parties behind an interface is actually good.
  40. app Camera Interface Camera Lib 1 - Keeping two Camera

    libs in the app Wrapping 3rd parties behind an interface is actually good.
  41. - Keeping two Camera libs in the app app Camera

    Interface Camera Lib 2 Camera Lib 1 Wrapping 3rd parties behind an interface is actually good.
  42. app Camera Interface Camera Lib 2 Camera Lib 1 Compression

    issues! camera_lib: “camera_lib_2” camera_lib: “camera_lib_2” “camera_lib_1”
  43. app Camera Interface Camera Lib 2 Camera Lib 1 Compression

    issues! camera_lib: “camera_lib_2” “camera_lib_1”
  44. Workflow Fabio Lucia

  45. Fábio Lucia Workflow

  46. Fábio Lucia Mustafa Omkar Ilke Sergio

  47. Fábio Lucia Streams of work for 20+ persons a.k.a. Possibly

    many merge conflicts
  48. Fábio Lucia Branch out and branch in small chunks Feature

    Flags
  49. Commit Messages new transaction details NewTransactionsList WIP Linked- Authorising transactions

    dialog
  50. android-machete git:(DES-156-discreet) android-machete git:(develop) git add . git checkout -b

    DES-156-discreet Switched to a new branch `DES-156-discreet` android-machete git:(DES-156-discreet) git commit -m “add discreet section to glossary” | JIRA ticket 'DES-156' prepended to commit message [DES-156-discreet 6219e9cbd4] DES-156 add discreet section to glossary
  51. None
  52. None
  53. Modularisation for independence

  54. app

  55. Oct 14 Jan 2016 Jan 2017 Jan 2018

  56. app

  57. User app Login

  58. app User Login Security

  59. app Certification Security User Login Credit

  60. app Credit Security User Login Certification

  61. app Credit Security User Login Certification

  62. app Certification Security User Login Credit Hidden coupling

  63. app User Login Certification Security Credit Hidden coupling

  64. app User Login Certification Security Credit

  65. app User Login Certification Security Credit

  66. Transactions

  67. :transactions domain :transactions presentation :transactions data

  68. :transactions domain :transactions presentation :app :transactions data

  69. :spaces data :spaces domain :spaces presentation :moneyBeam data :moneyBeam domain

    :moneyBeam presentation :transactions presentation :app :transactions domain :transactions data
  70. Jan 2019 100 modules Oct 14 Jan 2016 Jan 2017

    Jan 2018
  71. :transactions data :transactions domain :transactions presentation :app :spaces data :spaces

    domain :spaces presentation :moneyBeam data :moneyBeam domain :moneyBeam presentation
  72. :transactions :app :spaces :moneyBeam

  73. :transactions :app :spaces :moneyBeam moneyBeam microservice transactions microservice spaces microservice

  74. :transactions :app :spaces :moneyBeam Backend for Frontend service moneyBeam microservice

    transactions microservice spaces microservice
  75. 100 modules Jan 2019 Oct 14 Jan 2016 Jan 2017

    Jan 2018
  76. What about … build times? They are interesting

  77. Jan 2019 Oct 14 Jan 2016 Jan 2017 Jan 2018

    7m 5m 3m 1.5m Clean Build Times
  78. 40% of reduction in build times Jan 2019 Oct 14

    Jan 2016 Jan 2017 Jan 2018 7m 5m 3m 1.5m Clean Build Times
  79. Feature Launcher Apps

  80. Credit

  81. Credit N26 App

  82. N26 App Credit Spaces Overdraft Premium Moneybeam Transactions

  83. N26 App Credit Spaces Overdraft Premium MoneyBeam Transactions 1-5mins build

    time
  84. Launcher app Credit N26 App Spaces Overdraft Premium MoneyBeam Transactions

    1-5mins build time
  85. Go bottom-top, not top-bottom

  86. :app

  87. AppComponent NetworkModule ApplicationModule SpacesComponent SpacesModule UserComponent User Module Session Module

    Credit Component CreditModule :app
  88. :spaces :credit SpacesComponent SpacesModule Credit Component CreditModule AppComponent NetworkModule ApplicationModule

    UserComponent User Module Session Module :app
  89. :spaces :credit SpacesComponent SpacesModule Credit Component CreditModule AppComponent NetworkModule ApplicationModule

    UserComponent User Module Session Module :app Where is App/User component??????
  90. :spaces :credit :base BaseComponent NetworkModule ApplicationModule Session Module SpacesComponent SpacesModule

    Credit Component CreditModule :app
  91. Why modularize for scale? Independent teams

  92. Refactor with more safety Independent teams Why modularize for scale?

  93. Independent teams Refactor with more safety Creativity and Innovation Why

    modularize for scale?
  94. Testing to release with trust

  95. Oct 14 Jan 2016 Jan 2017

  96. Unit Tests Oct 14 Jan 2016 Jan 2017 Easy Safe

    Refactoring Let you sleep
  97. Unit Tests Oct 14 Jan 2016 Jan 2017 Jan 2018

    Jan 2019 8000 Unit tests Easy Safe Refactoring Let you sleep
  98. Easy Safe Refactoring Let you sleep Unit Tests Oct 14

    Jan 2016 Jan 2017 Jan 2018 Jan 2019 8000 Unit tests
  99. Oct 14 Jan 2016 Jan 2017 Jan 2018 Jan 2019

    8000 Unit tests Unit Tests
  100. Unit Tests Oct 14 Jan 2016 Jan 2017 Jan 2018

    Jan 2019 8000 Unit tests
  101. Unit Tests Oct 14 Jan 2016 Jan 2017 Jan 2018

    Jan 2019 8000 Unit tests
  102. Unit Tests Oct 14 Jan 2016 Jan 2017 Jan 2018

    Jan 2019 8000 Unit tests
  103. Unit Tests Functional UI Tests 400 UI Tests Oct 14

    Jan 2016 Jan 2017 Jan 2018 Jan 2019 8000 Unit tests
  104. Automated Regression 10% 50% Functional UI Tests 400 UI Tests

    Unit Tests Oct 14 Jan 2016 Jan 2017 Jan 2018 Jan 2019 8000 Unit tests
  105. UI Testing Pipeline Slow Most difficult to fix

  106. ui-pipeline.sh

  107. SpacesViewModel + spaceName.text = “Space” - spaceName.text = space.name ui-pipeline.sh

  108. :app :spaces :c :b :a ui-pipeline.sh SpacesViewModel + spaceName.text =

    “Space” - spaceName.text = space.name
  109. :spaces ./run-instrumentation spaces :app :spaces :c :b :a ui-pipeline.sh SpacesViewModel

    + spaceName.text = “Space” - spaceName.text = space.name
  110. 30+ minutes UI Testing Pipeline

  111. 3 min (worst case run) UI Testing Pipeline

  112. Build a Design System and bring consistency alongside

  113. 80 Designers & Engineers 15 Designers & Engineers

  114. None
  115. That one “divider grey” Yeah it should be the grey

    we used in that other screen :) Is this the right grey for the divider? I thought it was this one? Hmm, I was using this to be honest
  116. None
  117. System Glossary

  118. None
  119. None
  120. None
  121. None
  122. None
  123. None
  124. None
  125. listOf(

  126. SectionHeader("Transactions"), listOf(

  127. SectionHeader("Transactions"), listOf( SubSectionHeader(“Today"),

  128. TransactionContainer( "From Main Account", " to Home", Money(BigDecimal(5), Euro)), TransactionContainer(

    "From Main Account", "Last one ... ", Money(BigDecimal(4.50), Euro)), TransactionContainer( "From Main Account", "Just one more ", Money(BigDecimal(5), Euro)), TransactionContainer( "From Main Account", "Money for drinks!", Money(BigDecimal(5), Euro)))) SectionHeader("Transactions"), listOf( SubSectionHeader(“Today"),
  129. Consistency Speed

  130. Discreet Mode

  131. Discreet Mode

  132. Discreet Mode In a company of 1000+ people, 2 persons

    were able to develop and drive the launch of this feature QA Design Marketing Product Bank Security
  133. QA Design Marketing Product Bank Security Discreet Mode In a

    company of 1000+ people, 2 persons were able to develop and drive the launch of this feature
  134. Discreet Mode In a company of 1000+ people, 2 persons

    were able to develop and drive the launch of this feature QA Design Marketing Product Bank Security
  135. None
  136. Questions? n26.com/careers Berlin Barcelona New York Vienna Follow me: @fabiocarballo