Simplify your adapters - lambdas in data classes

Data classes are a Kotlin feature that allow us to write clean, simple classes that are commonly used to model data, such as API requests/responses and application state. They have have automatically derived equals(), hashCode() and toString() functions. This is an example of a simple data class Item that holds an id, title and subtitle: data class Item( val id: String, val title: String, val subtitle: String ) On Android we can use a data class to represent an item in a list.
Read more →

Danger on Android

A team I have been working with recently has grown to a big enough size that we decided to improve the pull request (PR) process with continuous integration (CI) by introducing Danger. We wanted to automate as many of the PR checks as possible to streamline the process. Danger runs during your CI process, and gives teams the chance to automate common code review chores. To start with I was looking to get more information into the PR itself.
Read more →

Splitting SSH and git configs

To separate work and personal projects, I run different SSH keys and git configs. For example specifying a different SSH key and git email for personal and work projects. This allows me to clone any project, work or personal and get started straight away.

SSH config Step 1: Create SSH key ssh-keygen -t rsa -C "[email protected]" When asked for the name give a new file name: id_rsa_work

Read more →

Custom timeouts with retrofit

I recently ran into the problem of customising timeouts for different API calls when using retrofit.
Read more →

Automating hugo deployment to S3

After making the decision to migrate from hugo to ghost I also decided to test the waters with AWS (Amazon web services) for my website hosting.

S3, a service on AWS, provides static website hosting, and as hugo generates static web files it’s a perfect match. The following are roughly the steps that I made to automate the deployment of a hugo site to S3.

Read more →