113: Chatting with Pinterest’s Christina Lee

In this episode we catch up with a highly energetic but sick Christina Lee about the delightful details in the Pinterest app, delving with the dark side (Swift), giving live coding presentation talks and touching on some Kotlin details like covariance and contravariance. Listen on for a power-packed 40 minutes.

Download directly

Show Notes

Sponsors

  • Mapbox – Android developers don’t have to settle for a default same-map-no-matter-what option in their Android app. Mapbox offers complete map design control, allowing you to create beautiful custom maps to meet the needs of your Android users.

Show Notes

Sponsors

  • Mapbox – Android developers don’t have to settle for a default same-map-no-matter-what option in their Android app. Mapbox offers complete map design control, allowing you to create beautiful custom maps to meet the needs of your Android users.

Contact

112: Effective Java v3 – Item #9 – Prefer try with resources to try finally

In this mini-fragment episode, Donn talks about Item #9 of the Effective Java (Third Edition) book – Prefer try with resources to try finally.

Please note, this episode references the third edition of the Effective Java book that recently came out. Previously we were doing the entire series on version 2, but we are now upgrading to version 3 of the book. We will not be re-doing any of the existing lessons, but if one was inserted in the mix, then we will do that lesson.

Listen on:

Download directly

Links

Sponsors

  • Mapbox – Android developers don’t have to settle for a default same-map-no-matter-what option in their Android app. Mapbox offers complete map design control, allowing you to create beautiful custom maps to meet the needs of your Android users.

Check them out today at mapbox.com/android

Contact

111: Effective Java v3 – Item #5 – Prefer Dependency Injection to Hardwiring Resources

In this mini-fragment episode, Donn talks about Item #5 of the Effective Java (Third Edition) book – Prefer Dependency Injection to Hardwiring Resources.

Please note, this episode references the third edition of the Effective Java book that recently came out. Previously we were doing the entire series on version 2, but we are now upgrading to version 3 of the book. We will not be re-doing any of the existing lessons, but if one was inserted in the mix, then we will do that lesson.

This is the case with Item #5. We did Item #5 previously for v2 of the book, but v3 introduced a new Item 5 (and bumped the previous Item 5 up to 6).

TLDR; Item #5 is new in the third edition of the Effective Java book. So listen closely. :)

Listen on:

Download directly

Links

Sponsors

  • Mapbox – Android developers don’t have to settle for a default same-map-no-matter-what option in their Android app. Mapbox offers complete map design control, allowing you to create beautiful custom maps to meet the needs of your Android users.

Check them out today at mapbox.com/android

Contact

110: BuddyBuild and CI/CD services

In this episode of Fragmented, we talk about CI, CD and CD services. That’s Continuous Integration, Continuous Delivery, and Continuous Deployment. BuddyBuild a beloved 3rd party service of ours (and previous sponsor) is sunsetting their Android service, so Donn and KG discuss alternatives and the options they’ve been keeping an eye on.

Listen on:

Download directly

Show Notes

Differences between CI/CDs services

differences between CI/CD/CD

Options for CI Services

Sponsors

Contact

109: Learning Kotlin – Sequences the new Iterables

In this episode of Fragmented, we go back to learning some Kotlin and look at the Iterable like data structure introduced called “Sequences”. What is a sequence? How is it different from Iterable? When should I use it?

Download directly

Show Notes

Eager/Lazy

Eager evaluation:

val lst = listOf(1, 2)
val lstMapped: List<Int> = lst.map { print("$it "); it * it }
print("before sum ")
val sum = lstMapped.sum()

// prints "1 2 before sum"

Lazy evaluation:

val seq = sequenceOf(1, 2)
val seqMapped: Sequence<Int> = seq.map { print("$it "); it * it }
print("before sum ")
val sum = seqMapped.sum()

// prints "before sum 1 2"

Source stackoverflow.com answer

Intermediate and terminal operations

Notice that at each chain operation, a new temporary list is created:

data class Person(val name: String, val age: Int)

fun main(args: Array<String>) {
    val people = 
        listOf(Person("Chris Martin", 31), 
               Person("Will Champion", 32),
               Person("Jonny Buckland", 33),
               Person("Guy Berryman", 34),
               Person("Mhris Cartin", 30))

    println(people
            .filter { it.age > 30 } // new temp. list
            .map {                  
                it.name.split(" ").map {it[0]}.joinToString("")
            }  // new temp. list
            .map { it.toUpperCase() }) // new temp. list
}

Using a sequence:

println(people
        .asSequence()  // convert to sequence
        .filter { it.age > 30 } // lazy eval (intermediate op)
        .map {                  
            it.name.split(" ").map {it[0]}.joinToString("")
        }  // lazy eval (intermediate op)
        .map { it.toUpperCase() }  // lazy eval (intermediate op)
        .toList() // terminal operation
       )

Without a terminal operation, Sequences won’t print anything:

val seq = sequenceOf(1, 2, 3)
println(seq) // prints address
println(seq.toList()) // [1, 2, 3]

You can’t pick an index from a sequence:

println(seq[0]) // throws ERROR "No get method providing array access"
println(seq.toList()[0]) // 1

Sponsors

Contact