Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Project Manager Developer Hey could you ship the new SDK version?

Slide 5

Slide 5 text

Project Manager Developer Hey could you ship the new SDK version? S-s-sure…

Slide 6

Slide 6 text

$ gradlew sdk:assembleRelease $ building… $ … $ # 10 hours later

Slide 7

Slide 7 text

3. Blah blah bla 2. Bla blah bla 1. Blah blah blah RELEASE NOTES

Slide 8

Slide 8 text

4. EXPERIMENTAL APIs. They are subject to change and not final!!! 3. Blah blah bla 2. Bla blah bla 1. Blah blah blah RELEASE NOTES

Slide 9

Slide 9 text

Project Manager Developer Cool, thanks Here’s the new Version! SDK

Slide 10

Slide 10 text

4. APIs have been removed. 3. Blah blah bla 2. Bla blah bla 1. Blah blah blah RELEASE NOTES

Slide 11

Slide 11 text

Project Manager Developer Cool, thanks Here’s the new Version! SDK

Slide 12

Slide 12 text

Slack Message PROJECT MANAGER $CUSTOMER JUST CALLED THEY HAVE A BUILD ERROR WITH THE NEW SDK VERSION CAN YOU FIX THAT NOW PLS Friday, 9PM

Slide 13

Slide 13 text

You: Have they read the release notes? PM: I’ll ask ... PM: No

Slide 14

Slide 14 text

@Experimental @Deprecated

Slide 15

Slide 15 text

@Target(ANNOTATION_CLASS) public annotation class Experimental(val level: Level = Level.ERROR) { public enum class Level { WARNING, ERROR, } }

Slide 16

Slide 16 text

@Target(ANNOTATION_CLASS) public annotation class Experimental(val level: Level = Level.ERROR) { public enum class Level { WARNING, ERROR, } }

Slide 17

Slide 17 text

@Target(ANNOTATION_CLASS) public annotation class Experimental(val level: Level = Level.ERROR) { public enum class Level { WARNING, ERROR, } }

Slide 18

Slide 18 text

@Experimental annotation class ExperimentalCatPicturesAPI

Slide 19

Slide 19 text

class CatPicturesAPI { /** * Experimental in case cats overtake the planet and * demand pets and treats in exchange for cat pictures */ @ExperimentalCatPicturesAPI fun getCatPicture(): CatPicture = CatPicture() }

Slide 20

Slide 20 text

fun doCatPictureAPIStuff() { val catPicturesAPI = CatPicturesAPI() catPicturesAPI.getCatPicture() } This API is experimental and its usage must be marked with @UseExperimental.

Slide 21

Slide 21 text

@ExperimentalCatPicturesAPI fun doCatPictureAPIStuff() { val catPicturesAPI = CatPicturesAPI() catPicturesAPI.getCatPicture() }

Slide 22

Slide 22 text

@UseExperimental(ExperimentalCatPicturesAPI::class) fun doCatPictureAPIStuff() { val catPicturesAPI = CatPicturesAPI() catPicturesAPI.getCatPicture() }

Slide 23

Slide 23 text

Productive Developer

Slide 24

Slide 24 text

Project Man Developer

Slide 25

Slide 25 text

Project Manager Developer

Slide 26

Slide 26 text

Project Manager Developer

Slide 27

Slide 27 text

Project Manager Developer

Slide 28

Slide 28 text

Project Manager Developer Hey could you ship the new SDK version?

Slide 29

Slide 29 text

Project Manager Developer Hey could you ship the new SDK version? S-s-sure…

Slide 30

Slide 30 text

4. APIs have been deprecated. 3. Blah blah bla 2. Bla blah bla 1. Blah blah blah RELEASE NOTES

Slide 31

Slide 31 text

Project Manager Developer Cool, thanks Here’s the new Version! SDK Contains deprecated APIs

Slide 32

Slide 32 text

Project Manager Cool, thanks SDK User Here’s the new Version! SDK Contains deprecated APIs

Slide 33

Slide 33 text

BUILD ERROR SDK User SDK *updates SDK version* *runs Gradle build*

Slide 34

Slide 34 text

/** * Marks the annotated declaration as deprecated. */ TYPEALIAS) annotation class Deprecated( val message: String, val replaceWith: ReplaceWith = ReplaceWith(""), val level: DeprecationLevel = DeprecationLevel.WARNING )

Slide 35

Slide 35 text

@Deprecated(“This is a legacy API. Please use the new CatPicturesAPI instead.") class LegacyCatPictureAPI { fun getCatPicture(): CatPicture = CatPicture() }

Slide 36

Slide 36 text

val api = LegacyCatPictureAPI()

Slide 37

Slide 37 text

/** * Marks the annotated declaration as deprecated. */ TYPEALIAS) annotation class Deprecated( val message: String, val replaceWith: ReplaceWith = ReplaceWith(""), val level: DeprecationLevel = DeprecationLevel.WARNING )

Slide 38

Slide 38 text

annotation class ReplaceWith( val expression: String, vararg val imports: String )

Slide 39

Slide 39 text

@Deprecated( "This is a legacy API. Please use the new CatPicturesAPI instead.", ReplaceWith("CatPicturesAPI") ) class LegacyCatPictureAPI { fun getCatPicture(): CatPicture = CatPicture() }

Slide 40

Slide 40 text

@Deprecated( "This is a legacy API. Please use the new CatPicturesAPI instead.", ReplaceWith("CatPicturesAPI") ) class LegacyCatPictureAPI { fun getCatPicture(): CatPicture = CatPicture() }

Slide 41

Slide 41 text

val api = LegacyCatPictureAPI() Replace with ‘CatPicturesAPI’

Slide 42

Slide 42 text

val api = LegacyCatPictureAPI() Replace with ‘CatPicturesAPI’ Alt + Enter

Slide 43

Slide 43 text

val api = CatPicturesAPI() ✔Occurrence Replaced!

Slide 44

Slide 44 text

class Laboratory { fun getRandommChemical(): Chemical = randomExperiment + randomExperiment + explosive }

Slide 45

Slide 45 text

class Laboratory { @Deprecated( "Typo in here. Please use getRandomChemical instead.", ReplaceWith("getRandomChemical") ) fun getRandommChemical(): Chemical = randomExperiment + randomExperiment + explosive }

Slide 46

Slide 46 text

class Laboratory { @Deprecated( "Typo in here. Please use getRandomChemical instead.", ReplaceWith("getRandomChemical") ) fun getRandommChemical(): Chemical = randomExperiment + randomExperiment + explosive fun getRandomChemical(): Chemical = randomExperiment + randomExperiment + explosive }

Slide 47

Slide 47 text

class Laboratory { @Deprecated( "Typo in here. Please use getRandomChemical instead.", ReplaceWith("getRandomChemical") ) fun getRandommChemical(): Chemical = getRandomChemical() fun getRandomChemical(): Chemical = randomExperiment + randomExperiment + explosive }

Slide 48

Slide 48 text

class CatPicturesAPI { /** * Experimental in case cats overtake the planet and * demand pets and treats in exchange for cat pictures */ @ExperimentalCatPicturesAPI fun getCatPicture(): CatPicture = CatPicture() }

Slide 49

Slide 49 text

class CatPictureAPI { /** * Experimental in case cats overtake the planet and * demand pets and treats in exchange for cat pictures */ @ExperimentalCatPicturesAPI fun getCatPicture(): CatPicture = CatPicture() }

Slide 50

Slide 50 text

@Deprecated( message = "CatPicturesAPI has been renamed to CatPictureAPI“, replaceWith = ReplaceWith("CatPictureAPI") ) typealias CatPicturesAPI = CatPictureAPI

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

SDK

Slide 53

Slide 53 text

interface SDKCapabilities { ... } class ArtboardSDK: SDKCapabilities { //It'll become super bloated }

Slide 54

Slide 54 text

interface CanvasCapabilities interface SDKCapabilities: CanvasCapabilities class ArtboardSDK: SDKCapabilities { val canvasManager = CanvasManager() override fun draw() = canvasManager.draw() }

Slide 55

Slide 55 text

interface CanvasCapabilities interface SDKCapabilities: CanvasCapabilities class ArtboardSDK: SDKCapabilities { val canvasManager = CanvasManager() override fun draw() = canvasManager.draw() }

Slide 56

Slide 56 text

interface CanvasCapabilities interface SDKCapabilities: CanvasCapabilities class ArtboardSDK: SDKCapabilities { val canvasManager = CanvasManager() override fun draw() = canvasManager.draw() }

Slide 57

Slide 57 text

interface CanvasCapabilities interface SDKCapabilities: CanvasCapabilities class CanvasManager: CanvasCapabilities class ArtboardSDK: SDKCapabilities, CanvasCapabilities by CanvasManager()

Slide 58

Slide 58 text

interface CanvasCapabilities interface SDKCapabilities: CanvasCapabilities class CanvasManager: CanvasCapabilities class ArtboardSDK: SDKCapabilities, CanvasCapabilities by CanvasManager()

Slide 59

Slide 59 text

No content

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

No content