David A Good

David A. Good

Software engineer crafting full-stack, cloud-native solutions for enterprise. GitHub | LinkedIn | Twitter

U.S. Diplomatic License Plates

December 21, 2023

Esoteric U.S. diplomatic license plate codes

Encapsulation and Tell, Don't Ask

November 14, 2021

Resources on the clean coding principles of Encapsulation and Tell, Don't Ask. TellDontAsk - Martin Fowler GetterEradicator - Martin Fowler Assertions on Domain Objects - Chris Stevenson

Time-Based Feature Flags (Please Don't)

September 14, 2021

I recently heard of someone adding a time-based feature flag. So for example, it overrides some behavior until 2021-09-15T15:30:00.000Z, after which it is no longer effective. That's way too clever, I...

A Pattern for Enums in Go

September 05, 2021

I'm sure I'm not alone, being new to Go and missing first-class support for enums. I do see there's an enum proposal for Go v2, so at least this is recognized as a shortcoming with an improvement on t...

Monolith For The Win

September 02, 2021

All the common wisdom says to start with a monolith and evolve into microservices once you know you need it. So why does everyone ignore this advice and reach for microservices, even when building a s...

How to Connect to DynamoDB Local Using the AWS SDK for Go

August 27, 2021

Example code demonstrating how to connect to locally running DynamoDB such as DynamoDB Local or LocalStack. By the way, you can run DynamoDB Local very easily like this: docker run -p 8000:8000 amazon...

To Code Clean or Not To Code Clean

August 23, 2021

I recently came across a post on Blind which was phrased like this: "From my experience, the code at XYZ top-tier tech company is garbage. So why do top-tier tech companies even bother hiring top...

The Five Orders of Ignorance

August 22, 2021

I came across this post recently. The Five Orders of Ignorance are essentially: having the answer having a question

Chialisp Basics

May 24, 2021

Chialisp is the native smart contract language of the Chia blockchain and cryptocurrency (XCH). This post demonstrates basic Chialisp commands, operators, and an example program. It is based on this o...

How to Specify AWS EC2 Root Volume Size with CDK

May 12, 2021

Here's how to override the size of the root volume on your AWS EC2 instance using CDK. Not at all obvious! Step 1: Check The Root Device Name Update this command with your region and AMI: aws ec2 desc...

How to Make Spring Boot Fail on Missing Environment Variables

May 06, 2021

Problem By default, Spring Boot @ConfigurationProperties doesn't fail when there are missing/unresolved environment variables defined in application properties. Instead, the property will be bound wit...

Serverless Sidecar Pattern for Offloading Auxiliary Logic

May 05, 2021

Had this idea and just getting it down on paper. Concept Your core business logic lives in containerized application, running on Kubernetes. (your org or team is not fully bought in to cloud native a...

How to Configure AWS Credentials and Region in Spring Cloud AWS

April 30, 2021

When using Spring Cloud AWS, getting the AWS credentials and region configuration properties right can be tricky. The preferred option is to use the AWS Default Credential Provider Chain and Default R...

How to Disable Spring Cloud AWS

April 25, 2021

If you're using Spring Cloud AWS, it's likely you'll want to disable it when running locally and for @SpringBootTest integration tests. The solution depends on which version of Spring Cloud AWS you're...

Brave Browser Sync Not Working—Here's How to Fix It

April 05, 2021

Problem Brave Browser Sync is not working. Passwords, history, autofill, etc. are not being synced across devices. Solution Make sure you have customized the sync settings because the default is to sy...

DynamoDB Repository Layer Isolation in Java

January 19, 2021

A simple strategy for maintaining isolation between a DynamoDB repository layer and the rest of the application which permits a seamless transition to a different database provider

How to Introspect Gatsby's GraphQL Schema with JS GraphQL Plugin in WebStorm/IntelliJ

January 11, 2021

The JS GraphQL plugin for WebStorm/IntelliJ provides much needed features which don't come out of the box with these IDEs. However, Gatsby does not have a GraphQL schema file to inform the plugin. Here, I show how to introspect the Gatsby GraphQL schema using the plugin and demonstrate its schema-aware auto-completion feature.

How to Set Up Automatic Code Formatting with Spring Java Format

January 01, 2021

In my first ever screencast, I show how to set up Spring Java Format using the Gradle Plugin and IntelliJ IDEA plugin.

Spring Troubleshooting Tips

December 30, 2020

Tips and ideas for troubleshooting Spring issues, e.g. useful packages and classes places to enable debug logging

Gatsby Starter Blog: How to Add Header Images to Posts with Support for Twitter Cards ↗

December 28, 2020

My first post published on freeCodeCamp!

How To Completely Disable HTTP Security in Spring Security

December 16, 2020

Spring is known and loved for its convention of configuration approach. But this can occasionally cause a challenge when automatically enabled features need to be disabled. Here we see how to completely disable Spring Security's HTTP security

How to Automatically Request and Refresh OAuth2 Client Credentials Token in Spring

December 10, 2020

How to transparently handle OAuth2's Client Credentials authorization grant request and subsequent token refresh requests when making service to service requests from a client to a resource server. One solution uses Spring WebFlux's WebClient together with Spring Security OAuth2 Client abstractions and is complex but highly configurable. Another solution uses OAuth2RestTemplate which is simple but not at all customizable.

Working with Heterogeneous Item Collections in the DynamoDB Enhanced Client for Java

December 07, 2020

Working with heterogeneous item collections with the Java SDKs can be tricky. Here we see how to handle them with the AWS SDK v2 for Java's Enhanced Client.

DynamoDB Enhanced Client for Java: Missing Setters Cause Misleading Error or Unexpected Behavior

December 01, 2020

The AWS SDK v2 for Java's DynamoDB Enhanced Client requires setters for every attribute. Missing the setter for a given attribute may cause a misleading exception or the attribute being silently ignored.

Basics of Using DynamoDB with Java

December 01, 2020

A work in progress: open questions, lessons learned, tips, etc. from working with DynamoDB and Java

Java Type System

November 27, 2020

A work in progress: open questions, lessons learned, tips, etc. from working with the Java type system

DynamoDB Data Modeling

October 19, 2020

A work in progress: open questions, lessons learned, tips, etc. from data modeling for DynamoDB

What I'm Working On

September 06, 2020

What I'm currently working on: personal projects, learning, open source, etc.

My Favorite Talks & Podcast Episodes

July 27, 2020

A running list of my favorite talks, podcast episodes, etc…

Serverless: Past, Present & Future

July 10, 2020

My notes from Tim Wagner's thought-provoking talk from AWS Serverless Days 2020

You're an entry-level developer. Is getting an AWS certification worth it?

July 03, 2020

Based on a question I received from a former intern after I got my AWS Certified Developer - Associate certification.

useAbstraction: React Hooks as a Tool for Abstraction and Encapsulation ↗

May 14, 2020

React Hooks have taken the web development community by storm. Many of their benefits are well-documented. Here I talk about custom hooks as a tool for abstraction and encapsulation. Published in The Startup.

Share Config Properties between Serverless Config and Lambda Functions ↗

May 10, 2020

Prevent simple mistakes by sharing properties between Serverless Framework config and code.

iPhone Apps Can’t Access Photos and Don’t Show Up Under Settings > Privacy > Photos ↗

January 20, 2020

Your apps can’t access your photos on iPhone. You’ve tried a half dozen supposed solutions but nothing works. Do not despair!

Logging in Java: APIs, Implementations, Bridges, Log4j, JUL, Apache Commons Logging, SLF4J, Logback, Log4j2

August 28, 2019

Java logging reference. Work in progress.

Clean Code and Architecture ↗

July 01, 2019

Clean, maintainable code is very often undervalued and underappreciated...

How to Create and Publish a Scoped NPM Package (@you/package) from Scratch ↗

April 07, 2019

I had never published an NPM package, so I went through the process from start to finish and documented the steps hoping that it will help others.

Start Incrementally Adopting TypeScript Today — Here’s How ↗

April 06, 2019

Depending on your setup, adding TypeScript to your existing project might take as little as a minute or two.

TypeScript’s Coming of Age and My TypeScript Moment ↗

April 06, 2019

TypeScript has really come of age. Type definitions are widely available, the community has grown by leaps and bounds, the productivity...

How to Reformat a Dell and Start with a Clean Install of Windows ↗

March 12, 2019

Put an end to the bloatware, McAfee AV, Dell pop-ups and reminders, etc. I was surprised that I couldn’t find a comprehensive, yet simple guide on how to do this. Hope this will help others and no doubt my future self!

Mocking Moment.js in Jest — A Simple, One-Line Solution ↗

January 30, 2018

I struggled with Jest at first. I wrote this after I couldn't find the solution anywhere and hoped this would help others. Now, two and a half years later, it is published in Frontend Weekly and has 48k views and 34k reads!