Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DevFest Berlin: Hype Driven Development

Ash Davies
December 03, 2022

DevFest Berlin: Hype Driven Development

Ever wondered what it would take to combine all the experimental features of a language you love (Spoilers... It's Kotlin!) into one big bundle?

I'm a lover of new and shiny stuff, so let me share with you my experience of using everything shiny, and new, in my pet project, to show you how to *not* do all the things you might want to do with yours!

JetBrains Compose for Desktop, Unstable Coroutines APIs, version catalogues, Gradle composite builds, multiplatform navigation support, multiplatform paging, GraphQl, Firebase Cloud Functions, Molecule, Mosaic, what could go wrong?!

This isn't a fairytale story, when making use of unstable technology, it's not always tested with other unstable technologies; I'm going to tell you of all the things I could have done better, so that you don't need to make the same mistakes!

Ash Davies

December 03, 2022
Tweet

More Decks by Ash Davies

Other Decks in Programming

Transcript

  1. Hype Driven Development How I learned to stop worrying and

    love the failures DevFest Berlin - Dec 22’ 󰎲 Ash Davies Android / Kotlin GDE - Berlin [email protected]
  2. “Be careful not to do that thing I knowingly did

    despite my own advice” Every one of my talks, ever. [email protected]
  3. Decision-Making Hype Driven Development [email protected]

  4. Design-Decisions Hype Driven Development [email protected]

  5. Design Decisions Common Tools • Language: Kotlin, Java, Scala, or

    Swift • Dependencies: Dagger, DI, or Koin • Threading: Coroutines, RxJava, or Java • Serialization: Gson, Moshi, Jackson, or KotlinX • Network: Retrofit, OkHttp, or Ktor • Image Loading: Coil, Glide, or Picasso [email protected]
  6. Decision Paralysis Hype Driven Development [email protected]

  7. Option 1: Do Nothing Design Decisions Advantages: - Low engineering

    complexity. - Staffing needs are minimal - Timeline is manageable Disadvantages: - Doesn’t solve the problem [email protected]
  8. Decision Fatigue Hype Driven Development

  9. How I learned to stop worrying and love the failures

    Hype Driven Development [email protected]
  10. Decision Making Hype Driven Development • Stakeholder influence, feature driven

    requirements • Reaction to issues in the codebase (ie. tech debt) • New tech, promises faster, easier solutions • Not limited to engineering (CEO Driven Development) [email protected]
  11. Law of the Instrument “Birmingham Screwdriver” “I suppose it is

    tempting, if the only tool you have is a hammer, to treat everything as if it were a nail.” - Abraham Maslow [email protected]
  12. Community Influence Hype Driven Development • Enticement to use a

    product or service, usually monetised for enterprise • Seemingly benevolent, promises developer interests • Trustworthy whilst goals are aligned [email protected]
  13. Decision Making Hype Driven Development • Heavy social media utilisation

    (Twitter, Reddit, etc) • Human psychology (Argumentum ad novitatem) • Promise to make life easier, better, faster, stronger… [email protected]
  14. Risks of using immature software Hype Driven Development • Dependent

    on third party development commitment • Libraries sometimes need years to evolve and mature • Very difficult to revert if results are undesired • More likely to produce poor quality code • Often new learning curve introduced • Investment of unknown future [email protected]
  15. Risk-Management Hype Driven Development [email protected]

  16. Risk Management 🤷 Hype Driven Development @Deprecated( message = "CoroutineScope.rxCompletable

    is deprecated in favour of top-level rxCompletable", level = DeprecationLevel.ERROR, replaceWith = ReplaceWith("rxCompletable(context, block)") ) public fun CoroutineScope.rxCompletable( context: CoroutineContext = EmptyCoroutineContext, block: suspend CoroutineScope.() -> Unit ): Completable = rxCompletableInternal(this, context, block) [email protected]
  17. Risk Management 🤷 Hype Driven Development @RequiresOptIn(message = "This API

    is experimental. It may be changed in the future without notice.") @Retention(AnnotationRetention.BINARY) @Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION) annotation class MyDateTime // Opt-in requirement annotation @MyDateTime class DateProvider // A class requiring opt-in [email protected]
  18. Risk Management Hype Driven Development • Annotations, experimental, deprecated, Opt-In

    • Coding for disposability • Isolated API surface • Coding workshops • Feasibility investigations (timeboxed) [email protected]
  19. Solutions Looking for a Problem Hype Driven Development [email protected]

  20. Solutions Looking for a Problem Hype Driven Development • New

    technology might not be appropriate for your project • Be cautious of finding problems that don’t exist • If it ain’t broke, don’t fix it. [email protected]
  21. YAGNI You Aren’t Going to Need It

  22. The Benefit of @Experimental Hype Driven Development • Early adoption

    of inevitable software (sometimes) • Contribute bug reports or resolutions upstream • New features provide potential market growth • Knowledge sharing in the development community [email protected]
  23. Inevitability Hype Driven Development

  24. Is It Worth It? • Depends on company and team

    priorities • Development community benefits everybody • Early adopters guide and provide contributions • Development cost absorption Hype Driven Development [email protected]
  25. How to get away with it anyway… • Not a

    good idea to follow hype in a production codebase • Still eager to try out new technologies Hype Driven Development [email protected]
  26. Open Source to the rescue! • Many engineers maintain a

    playground repository • Many examples of new tech in Google repos • Many open source projects needing maintainers • Contribute to a project that can make use of it Hype Driven Development [email protected]
  27. Use cases for a playground project • Majority of mobile

    applications are a user-friendly facade for API data • There are many open APIs available providing niche data sets Hype Driven Development [email protected]
  28. Case Study 🧪 github.com/ashdavies/playground # 451f3d8 | AGP- 7.3.1 |

    Compose - 1.2.1 | Kotlin 1.7.20 [email protected]
  29. Case Study ashdavies/playground • Takes conference data from open source

    ASG contributions • Built heavily around Compose for Desktop • Backed by Cloud Functions and Firebase Firestore • Firebase AppCheck Server Kotlin SDK • Shared models across platforms • Quasi-monorepo for side projects Hype Driven Development [email protected]
  30. androidstudygroup.github.io/conferences/ [email protected]

  31. [{ "name": "droidcon-berlin-2021.md", "path": "_conferences/droidcon-berlin-2021.md", "sha": "9361834b3e310ffd8992c1020eb868ebb56c564a", "size": 239, "url":

    "https://api.github.com/repos/AndroidStudyGroup/conferences/contents/_conferences/droidcon-berlin-2021.md?ref=gh-pages", "html_url": "https://github.com/AndroidStudyGroup/conferences/blob/gh-pages/_conferences/droidcon-berlin-2021.md", "git_url": "https://api.github.com/repos/AndroidStudyGroup/conferences/git/blobs/9361834b3e310ffd8992c1020eb868ebb56c564a", "download_url": "https://raw.githubusercontent.com/AndroidStudyGroup/conferences/gh-pages/_conferences/droidcon-berlin-2021.md", "type": "file", "_links": { "self": "https://api.github.com/repos/AndroidStudyGroup/conferences/contents/_conferences/droidcon-berlin-2021.md?ref=gh-pages", "git": "https://api.github.com/repos/AndroidStudyGroup/conferences/git/blobs/9361834b3e310ffd8992c1020eb868ebb56c564a", "html": "https://github.com/AndroidStudyGroup/conferences/blob/gh-pages/_conferences/droidcon-berlin-2021.md" } }]
  32. --- name: "Droidcon" website: https://www.berlin.droidcon.com/ location: Berlin, Germany date_start: 2022-07-06

    date_end: 2022-07-08 ---
  33. GraphQL docs.github.com/en/graphql

  34. query conferences { repository(owner: "AndroidStudyGroup", name: "conferences") { events: object(expression:

    "HEAD:_conferences") { ... on Tree { entries { data: object { ... on Blob { oid text } # ... }
  35. "data": { "repository": { "events": { "entries": [ { "data":

    { "oid": "9a2a79fe414cf02fd0904c02ef7ce416344d747d", "text": "---\nname: \"360|AnDev\"\nwebsite: http://360andev.com/\nlocation: Denver, Colorado, USA\n\n date_start: 2016-07-28\ndate_end: 2016-07-29\n\ncfp:\nstart: 2016-01-27\nend: 2016-04-29\nsite: http://360andev.com /call-for-papers/\n---\n" }, /* ... */ },
  36. ashdavies/playground Case Study

  37. Case Study ashdavies/playground

  38. TypeScript ashdavies/playground

  39. Multiplatform ashdavies/playground

  40. Kotlin for JavaScript kotlinlang.org/docs/js-overview kotlin { js { nodejs() }

    jvm() }
  41. Kotlin for JavaScript kotlinlang.org/docs/js-overview val dyn: dynamic = ... //

    'whatever' is not defined anywhere dyn.whatever(1, "foo", dyn) dyn.whatever(*arrayOf(1, 2, 3)) dyn.foo().bar.baz()
  42. ✓ Case Study ashdavies/playground

  43. Case Study ashdavies/playground

  44. Case Study ashdavies/playground

  45. Kotlin all the things! An experiment in creating a mobile

    app and firebase cloud functions in Kotlin – Andrew Reitz andrewreitz.com/tech_blog/kotlin-multiplatform-android-firebase
  46. Compose Multiplatform Compose in the Cloud ☁

  47. Firebase AppCheck Compose in the Cloud ☁ github.com/ ashdavies/playground/ tree/main/app-check/

    app-check-function
  48. Case Study ashdavies/playground Py

  49. Kotti Cat Study ashdavies/playground

  50. CENSORED Py Cat Study ashdavies/playground

  51. Knowledge Sharing Hype Driven Development [email protected]

  52. Work and Life Balance • Not everybody can, wants, or

    should spend time outside of work on pet projects • Some are fortunate to have time for research, and community involvement • Advocate for time to evaluate feasible technology, timeboxed, hack-week, etc • Propose solutions for internal tooling, don’t forget the business case 🤑! • Develop for disposability when in production (see “Everything is an API”) Hype Driven Development [email protected]
  53. Conclusion • HDD is high risk for production environments •

    Satisfy dev thirst in a safe environment • Use learnings to advise feasibility • Share learnings with the community Hype Driven Development [email protected]
  54. “Every existing thing is born without reason, prolongs itself out

    of weakness and dies by chance.” Jean-Paul Sartre
  55. Thanks! Ash Davies - Cat Person Android / Kotlin GDE

    - Berlin [email protected]
  56. Attributions • “Feature” [monkeyuser.com] • Hype Driven Development [blog.daftcode.pl/hype-driven-development-3469fc2e9b22] •

    Instant Gratification Monkey [waitbutwhy.com] • Kotlin All the Things [andrewreitz.com/tech_blog/kotlin-multiplatform-android-firebase] • Untitled [goose.game] Hype Driven Development