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. 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]
  4. 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]
  5. 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]
  6. 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]
  7. 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]
  8. 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]
  9. 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]
  10. 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]
  11. 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]
  12. Risk Management Hype Driven Development • Annotations, experimental, deprecated, Opt-In

    • Coding for disposability • Isolated API surface • Coding workshops • Feasibility investigations (timeboxed) [email protected]
  13. 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]
  14. 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]
  15. 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]
  16. 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]
  17. 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]
  18. 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]
  19. 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]
  20. [{ "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" } }]
  21. query conferences { repository(owner: "AndroidStudyGroup", name: "conferences") { events: object(expression:

    "HEAD:_conferences") { ... on Tree { entries { data: object { ... on Blob { oid text } # ... }
  22. "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" }, /* ... */ },
  23. 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()
  24. 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
  25. 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]
  26. 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]
  27. “Every existing thing is born without reason, prolongs itself out

    of weakness and dies by chance.” Jean-Paul Sartre
  28. 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