154: Developer Growth: Start Writing


Download

Growing as a developer is important for you, your career and your future. One of the best ways to grow your career is to start writing.

Donn recommends starting a blog or contributing to a blog. The process of writing will expose your weak points in your comprehension of a topic. Refining your communication skills through writing and putting thoughts out into the universe via a blog will broaden your skills as a developer.

Ultimately, writing is about communication and communication is the cornerstone of success in much of anything. In this episode, Donn walks you through why you should start writing to help you grow as a developer.

Enjoy.

Sponsors πŸ™

Contact

153: How to be an indie Android developer with Chris Lacy


Download

Listen to all star Indie developer and friend of the show Chris Lacy. Chris Lacy created the beloved Action Launcher – arguably one of the best Launcher apps on Android. In this epiisode, he talks to us about what it’s like being an indie developer, starting on Action Launcher and of course his newest creation – ActionDash.

Enjoy.

Shownotes

ActionDash

Sponsors πŸ™

Contact

152: Should I Rewrite My App? with Jeroen Mols


Download

After you’ve been working on an app for sometime, the most common quandry one runs into is the need to rewrite the app. We’ve all been there, there’s technical debt, we’ve improved our understanding, the tools have become better, we’ve become better. So should you go back and just rewrite the whole app? Jeroen walks us through his thinking.

Shownotes

Resources

Sponsors πŸ™

Contact

150: Learning Kotlin – Returns, Jumps & Labels

Shownotes

Download

Code

data class Customer(val isPlatinum: Boolean)

fun main() {

    val customer = Customer(false)

    println("Number of points customer has: ${calculatePoints(customer)}")

    // Break out of the loop once we're over 25
    for (i in 1..100) {
        if (i > 25) {
            break
        } else {
            println(i)
        }
    }


    // Skip all even numbers
    for (i in 1..100) {
        if (i % 2 == 0) {
            continue
        } else {
            println(i)
        }
    }


    // Break out of the outer loop (which breaks out of the inner too) using a label
    donn@ for (i in 1..100) {
        for (j in 100..200) {
            if (j > 150) break@donn // This will break out of the inner loop and outer loop
            else println("i: $i, j: $j")
        }
    }

    // Continue processing the next outer loop value when a condition is met.
    donn@ for (i in 1..100) {
        for (j in 100..200) {
            if (j > 150) continue@donn // This will break out of the inner loop and outer loop
            else println("i: $i, j: $j")
        }
    }

    // returns with label
    example1()
    example2()

    println("I'm done processing!")
}

fun calculatePoints(customer: Customer): Int {
    if (customer.isPlatinum) {
        return 100000
    } else {
        return 10
    }
}


fun example1() {
    listOf(1, 2, 3, 4, 5, 6, 7, 8, 9).forEach {
        if (it > 7) {
            return
        } else {
            println(it)
        }
    }
    println("This wont print :( because return exited the bar() function")
}

fun example2() {
    listOf(1, 2, 3, 4, 5, 6, 7, 8, 9).forEach bin@ {
        if (it > 7) {
            return@bin
        } else {
            println(it)
        }
    }
    println("This will print! :) return exited the forEach!")
}

Sponsors πŸ™

  • Nevercode

    • Nevercode is taking Flutter revolution extremely serious and is prepared to offer kick-ass CI/CD for Flutter projects with codemagic.io. Check it out and get started at https://codemagic.io/
  • Sentry.io

    • Sentry tells you about errors in your code before your customers have a chance to encounter them. Check them out at: https://sentry.io/for/android/

Contact

147: Disposing RxJava 2 Streams with AutoDispose

In this short fragment episode, Donn explains how you can clean up your RxJava 2 streams and ensure no memory leaks are occurring by using the AutoDispose library from Uber.

Download

Shownotes

Code Samples

Java

myObservable
    .map(...)
    .as(AutoDispose.<SomeType>autoDisposable(AndroidLifecycleScopeProvider.from(this)))
    .subscribe(...)

Kotlin

myObservable
    .map(...)
    .autoDisposable(AndroidLifcycleScopeProvider.from(this))
    .subscribe(...)

With Scope Event Provided

myObservable
    .map(...)
    .autoDisposable(AndroidLifcycleScopeProvider.from(this, Lifecycle.Event.ON_DESTROY))
    .subscribe(...)

Testing

// File: CustomerService.kt
class CustomerService @Inject constructor(...) {
    lateinit var scopeProvider: ScopeProvider
}

// Usage in Fragment/Activity/etc
val service = CustomerService(...).apply {
    scopeProvider = AndroidLifecycleScopeProvider.from(this)
}

// Usage in Test
val service = CustomerService(...).apply {
    scopeProvider = TestScopeProvider.create()
}

Contact