$30 off During Our Annual Pro Sale. View Details »

Remote and Lonely

Remote and Lonely

Talk presented at Droidcon London 2016

Being the only developer in a project can be frustrating, everything falls into your shoulders and it's very easy to get trapped into bad habits. You are not alone! There are many tools, practices and services that will make your life easier... and efficient!

Several months ago David joined Help Scout as the only Android Developer with the main purpose of building their Android application from scratch. Coming from an agency environment where there were more than 30 developers willing to discuss and present different ideas, it's been quite a challenge.

This talk shares David's experience, explaining what tools, practices and methodologies he's followed. Being the only developer is no impediment to build great quality code, follow good design patterns and delight your users.

How to do Pull Requests, Code Reviews, Design Reviews, Continuous Delivery and Integration... Whether you are a one man band or work with a team, these tips will help you become a better programmer!

David González

October 26, 2016
Tweet

More Decks by David González

Other Decks in Programming

Transcript

  1. Memories of a remote and lonely Android developer

    View Slide

  2. View Slide

  3. The development

    View Slide

  4. View Slide

  5. Your main goal is to ship a product

    View Slide

  6. View Slide

  7. Naming
    http://arlobelshee.com/good-naming-is-a-process-not-a-single-step/
    https://overflow.buffer.com/2016/09/26/android-rethinking-package-structure/

    View Slide

  8. Static analysis

    View Slide

  9. The process

    View Slide

  10. Who is going to review my code?

    View Slide

  11. Page heading
    Open Pull Request !rst, the old way

    View Slide

  12. Page heading
    Pull Requests now

    View Slide

  13. The planning

    View Slide

  14. View Slide

  15. View Slide

  16. View Slide

  17. View Slide

  18. View Slide

  19. Github integration in Android Studio

    View Slide

  20. The shipping

    View Slide

  21. Jenkins DSL plugin
    https://github.com/jenkinsci/job-dsl-plugin
    def gitUrl = 'git://github.com/jenkinsci/job-dsl-plugin.git'
    job('PROJ-unit-tests') {
    scm {
    git(gitUrl)
    }
    triggers {
    scm('*/15 * * * *')
    }
    steps {
    maven('-e clean test')
    }
    }

    View Slide

  22. Plugin con!guration
    androidLint('**/outputs/lint-results.xml') {
    thresholdLimit('low')
    useStableBuildAsReference(false)
    useDeltaValues(false)
    shouldDetectModules(false)
    thresholds(
    unstableTotal: [all: 3, high: 3, normal: 3, low: 3],
    failedTotal: [all: 3, high: 3, normal: 3, low: 3],
    unstableNew: [all: 0, high: 0, normal: 0, low: 0],
    failedNew: [all: 0, high: 0, normal: 0, low: 0]
    )
    }

    View Slide

  23. Plugin con!guration
    checkstyle('**/checkstyle/*.xml') {
    thresholdLimit('low')
    useStableBuildAsReference(false)
    useDeltaValues(false)
    shouldDetectModules(false)
    thresholds(
    unstableTotal: [all: 2, high: 2, normal: 2, low: 2],
    failedTotal: [all: 2, high: 2, normal: 2, low: 2],
    unstableNew: [all: 0, high: 0, normal: 0, low: 0],
    failedNew: [all: 0, high: 0, normal: 0, low: 0]
    )
    }

    View Slide

  24. Conditional actions
    flexiblePublish {
    conditionalAction {
    condition {
    and {
    status('SUCCESS', 'SUCCESS')
    } {
    not {
    stringsMatch('$ON_MAINLINE', 'true', false)
    }
    }
    }

    View Slide

  25. The pipeline

    View Slide

  26. Amazon Device Farm and Jenkins

    View Slide

  27. Publish to Beta
    apply plugin: 'com.github.triplet.play'
    def playstoreServiceAccount = System.env.PLAYSTORE_SERVICE_ACCOUNT
    def playstorePk12File = System.env.PLAYSTORE_PK12_FILE
    if (playstoreServiceAccount && playstorePk12File) {
    play {
    track = 'beta'
    serviceAccountEmail = playstoreServiceAccount
    pk12File = rootProject.file(playstorePk12File)
    }
    }
    project.afterEvaluate {
    def publishApkRelease = project.tasks.getByName("publishApkRelease")
    def incrementVersionForRelease =
    project.tasks.getByName("incrementVersionForRelease")
    publishApkRelease.dependsOn incrementVersionForRelease

    View Slide

  28. Questions?
    David González
    @dggonzalez
    [email protected]

    View Slide