Recent posts

Run TypeScript Mocha Tests in Visual Studio Code

July 04, 2018  7 minute read  

I’m spending my July 4th getting back to basics and learning some data structures and algorithms. I’ve decided to do my stuff in TypeScript since it’s been a while since I’ve played with TypeScript and I wanted to see what has changed at the same time. This is not a blog post about how to do data structures and algorithms in TypeScript, JavaScript or any other language. If you are studying for an interview or classes, there are plenty of places on the Internet you can go to do that. Personal...

Implement Search-on-type in Android with RxJava

June 20, 2018  6 minute read  

I’m working on a new sample which, as is typical, communicates with a backend service for data through a serverless API. In this particular example, it’s a search capability that I am developing and one of the features I want to implement is “search while you type”. Not a problem, you might think. Just put a search box on the page (probably in the action bar), wire up the onTextChange event handler, and do the search. So, that’s what I did: override fun onCreateOptionsMenu(menu: Menu?): Boo...

Build a Universal Search API with GraphQL and AWS AppSync

June 19, 2018  5 minute read  

Have you ever looked at a feature of a mobile app and wondered how they do something? Me too! I like to figure out how they built those features and build them into my own apps. Take, as an example, universal search. You can find this sort of search box at the top of the Facebook app. So, how do they implement it? I’ve not seen their codebase, but I imagine it’s something similar to the following proof of concept. The schema I have a GraphQL API already built within AWS AppSync with the fol...

How developers can authenticate and authorize users with AWS AppSync

June 01, 2018  7 minute read  

AWS AppSync provides four distinct methods of authorizing users to optimize and restrict data being transferred AWS AppSync is a managed GraphQL data service that supports offline and real-time scenarios. The service allows the developer to optimize the data transfer between client and server. Any non-trivial application will need to authenticate users. It’s the only way to identify a distinct real person using the application. That association is required for private data storage and c...

Unit Testing in Android Studio with Kotlin

May 12, 2018  5 minute read  

I made myself a promise a couple of months ago. My next app would be fully unit tested for the non-UI components and fully instrument-tested for the UI components. That’s a tall order, especially since I’m using the latest and greatest Android Studio Canary. I ran into a few problems. Some can’t be solved and some can. Let’s start with a simple test. I’ve got a class that looks this: data class Note(val id: String = UUID.randomUUID().toString()) { var updated: Long = System.currentTimeMil...