KotlinConf 2018 - Representing State: the Kotlin Edition by Christina Lee

Share
Embed
  • Published on Oct 7, 2018
  • Recording brought to you by American Express americanexpress.io/kotlin-jobs
    A core part of any code is the ability to know at any given time the set of conditions that make up its current operations. As developers, we need to know this for a variety of reasons, including because knowing this tells us whether we should be queuing any changes and gives us the ability to return a user to their current experience should the program be interrupted. But despite its crucial nature, codifying the state of an application at any given point in time can often be messy and error prone work. In this talk, we'll look at the reasons representing state can be problematic, and some practical ways we can leverage Kotlin to make it better. This talk is both a theoretical look at how the types we choose influence our ability to validate programs, and a practical exploration of concrete steps we can take to rectify these issues with Kotlin.

    About the Presenter:
    Christina Lee is a software engineer and GDE at Pinterest, where she works on UI frameworks.

Comments • 28

  • Pablo Costa Tirado
    Pablo Costa Tirado 2 years ago +25

    For anyone who sees value on the presentation, I think you might be interested in the

  • mean mole
    mean mole Year ago +5

    Good talk overall. Sealed classes seems to be a good solution for guarding the state, especially since Intellij will nag about missing "when branches" for the state in question. Performance takes a minor hit since a new object has to be created every time the state is being changed, but this can be prevented if the state does not hold any additional information (member variables) by defining the subclasses as static objects inside the sealed class:

  • Adam Vaszil
    Adam Vaszil 3 years ago +14

    Very informative talk and I also like the style of Christina's presentations.

  • Emanuele Di Saverio
    Emanuele Di Saverio 3 years ago +12

    Especially like the "how real development works" part. Nobody sets out to write bad code.

  • Victor Oben
    Victor Oben Year ago +2

    By far one of my favorite kotlin talks

  • DomainObject
    DomainObject Year ago

    Absolutely fabulous talk! Hear. Hear! 👏

  • Robert Chrzanowski
    Robert Chrzanowski 3 years ago +2

    Why not use Behaviors from Functional Reactive Programming to define declaritivly what the state of the view is for any given point in time?

  • hareendran c
    hareendran c Year ago

    Wondering why this lady wasn’t given a standing ovation

  • Arman Simonyan
    Arman Simonyan 3 years ago +4

    Speaking about strings I can generate an infinite number of talks. :D

  • Cole Phelps
    Cole Phelps 3 years ago +8

    I didn't understand most of it but the presentation is too good to skip. 😍

  • Peter Westlin
    Peter Westlin 3 years ago +2

    I like har presentations in general and this was as good.

  • pentexnyx
    pentexnyx Year ago +2

    awesome one

  • SVNSET
    SVNSET 3 years ago +5

    Great presentation!

  • Adit Chauhan
    Adit Chauhan 2 years ago +2

    Indeed entertaining

  • Igor G.
    Igor G. 3 years ago +2

    With all said, is there a need for `if/else` statements anymore?

  • Tony Thompson
    Tony Thompson 3 years ago

    It is possible that someone whose heart is broken is watching the talk... : )

  • Ricky Solorio
    Ricky Solorio 3 years ago

    She is amazing.

  • chethan HB
    chethan HB Year ago

    OMG , she took this long to deliver enum types , sealed classes . all other things what she explained is to simple cover up time.

  • Miloš Anđelković
    Miloš Anđelković 3 years ago +28

    This presentation felt a bit empty. So what is she saying in the end?

  • papanino
    papanino 2 years ago +6

    Would have been nicer, and quicker, without the theatrical voice.