Home
Ross Harrison's Blog
Cancel

Is Bad: Context-Free Documentation

A pet peeve of mine is example code with insufficient context. I can understand not wanting to bombard the reader with pages of code, but cutting down to the bone ends up sending them on an unwante...

2022: My personal Year of the Chatbot

In 2022, my relationship with artificial intelligence changed permanently. In the past I’ve used generative models for small, experimental projects: using style-transfer to make QB Matt Stafford lo...

Parsing Emails with Java and Go on AWS Lambda

As part of my design for a temporary email service, I created a microservice for parsing received emails. This microservice receives SES messages via an SNS source topic parses some data out of the...

Parameterizing GraphQL fields with graphql-kotlin

This article serves as a companion to the video posted above. The goal is to create a parameterized field on a [GraphQL][https://graphql.org/] schema, using graphql-kotlin. Code found here Boi...

Connecting Diesel to an existing Postgresql server

This article serves as a companion to the video posted above. Code found here The goal here is to connect to an existing database using the Diesel toolset. The broader goal is to create an API ...

JSON parsing for Command-Line and Shell Scripts with jq

JSON is ubiquitous. Maybe you work with a service that ingests or produces JSON output. And maybe you want to be able to automate some tasks using shell scripts. However, the hierarchical structure...

Kolin, Delegated (Lazy) Properties and GraphQL

TLDR; Use lazy properties to avoid unecessary database connections and queries. Also use optional properties to avoid n+1 queries. The big backstory is that I’m working on an API gateway that allo...

Kotlin, PowerMock, and `when`

TLDR; Wrap when in backticks to make it work. // stubbing Unirest and returning a mock response `when`(Unirest.post(Mockito.anyString())) .thenReturn(httpRequestWithBody) PowerMock is an extr...

WTF Where are my Commits? Finding lost work with `git fsck`

I always use source control (it’s always git). But every once in a while I lose some work during rebase. Today I lost about two days of work I needed for a presentation … tomorrow. Luckily I came ...

Elastic Beanstalk HTTPS redirection when using TCP ports

Link to solution gist I’m deploying an application to a Docker environment within Elastic Beanstalk. The application serves HTTP and Web Socket requests over the HTTP(s) port. AWS provides a conf...