Skip to content

Ferdinand Agyei-Yeboah

Software Engineering Tutorials & Best Practices

Implementing Pessimistic Locking With Spring JPA (OR JDBC) and Postgres

June 22, 2023

Prerequisites I will not be going through the developer setup (installing java, postgres, maven, etc..) but the sample code assumes you have…

Writing JPA Integration Tests

May 28, 2023

For when you want to write a test that interacts with the database. How to write a JPA integration test 1. Create a new test class and…

Google Guava Rate Limiter

May 15, 2023

Background Rate limiting is when an API restricts the number of invocations over time for a client (could be a user, another application…

Working With Selenium In Java

March 25, 2023

Quickly showing how to get started with Selenium using Java and Maven. The setup step assumes Google Chrome is installed, but Selenium…

OAuth2 (and brief OIDC) Overview

February 22, 2023

Background OAuth allows you to give a third party fine grained access to your resources (via access tokens) without granting them full…

Writing Go Applications

January 20, 2023

How to create a Go project Create a new folder. Ex: my-project. Run go mod init to initialize a go module (project). It will create a go…

Spring Retry

December 22, 2022

Background Spring retry is an easy way to add retry to your Spring application. Spring Boot Implementation Assuming this is a Spring Boot…

Quick Log4j2 Notes

November 27, 2022

Sample Log4j2 Configuration and Explanation Below is a sample log4j2 properties file and configuration file. By default log4j2 searches for…

Quick Zsh Setup

November 15, 2022

Just quick steps for my zsh setup Install Zsh Zsh comes pre-installed in many distributions, but can install it if not. Install powerlevel…

React Debugging Tools

August 15, 2022

VSCode Debugging VSCode React Debugging - here Intellji Debugging Intellji React Debugging - here React Developer Tools React has a chrome…

ECS Startup Troubleshooting

July 24, 2022

Log locations /var/log/ - general logging folder /var/log/ecs/ecs-agent.log - in depth info on startup errors More Reading: ECS Logs…

Postman Features You Should Be Using

June 17, 2022

Collections This one is basic, but I've seen many people not use collections and spend unnecessary time looking through the History tab for…

AWS Networking Tips

June 16, 2022

Summarized tips/info on AWS Networking. Use Cases & Setups Setting up internet access The internet is not part of your VPC (Virtual Private…

Docker Compose Containerized Testing

March 24, 2022

Web applications generally are composed of multiple components such as the frontend, backend and database among other things. Docker compose…

Host Based Routing With AWS ALB

March 24, 2022

There are many routing options when using AWS ALB (Application Load Balancer). You can route based on url paths, http headers, host headers…

Linux Desktop File Entries

March 22, 2022

Background Desktop entry files, .desktop, are used to create shortcuts (taskbar and search) for installed applications. Generally polished…

Using Lombok

March 22, 2022

Background Lombok is a java code generation tool, it can remove a lot of boilerplate code. Installing Lombok To configure intellji, there…

Junit and Mockito

March 16, 2022

Basic Example There are three basic phases to writing unit tests. Mocking, Execution, Verification. Each of the steps are shown in the…

Locust Performance Testing

March 16, 2022

Background The biggest name when it comes to performance testing is Jmeter. However, Jmeter isn't very initituive to set up, even for a…

Reentrant Locks

March 16, 2022

Reentrant Locks Reentrant locks are a good way to force mutual exclusion of resources. Re-entrant locks are not "global" locks persay, you…

Tidbits on Retries and Idempotency

December 17, 2020

Summary API calls should be retried if possible to avoid customer impact. However, retrying apis risks the possibly of duplicate operations…

Random Intellji Stuff

December 02, 2020

Background Some tips on Intellji. The proper Intellji term for a collection of folders is "Project" but I sometimes use the term "Workspace…

Multipart Requests

November 15, 2020

Background The HTTP header Content-Type describes the kind of data being sent in the request. It can be set to things like text/plain…

Sonar and Jacoco Maven Configuration

October 30, 2020

Background Sonar: Static analysis for code coverage and code quality (bad practices, bugs, etc..) Jacoco: Java code coverage tool which can…

Handy Git Commands

October 27, 2020

Note: <> represents variable info in the post and should be replaced with your own values. Creating Commits Create normal commit with…

Finding Process On Port

October 22, 2020

You might want to find (and kill) a process on a port. Here's how. Mac/Linux Find process on port. You may need to use sudo if the process…

Intro to Linux Screen

October 22, 2020

Background The linux screen utility allows you to run commands or programs in the background easily. This is great for when you need to…

Installing Homebrew on Linux

October 12, 2020

Homebrew is a package manager that makes installing extra software very easy. Originally it was only for Mac, but a version for linux was…

Intro to Jmeter

October 12, 2020

Background Briefly, performance testing tells you the speed and reliablity of your system when under different load conditions. It is great…

Designing REST APIs

August 10, 2020

Here are some REST API design tips. Quick Intro to REST First, some basic background on REST. REST is an API interface style guide around…

Using SSH config files

August 07, 2020

Are you tired of passing in your private key and user on every ssh connection? Then just create a user ssh configuration file ~/.ssh/config…

Fixing Ubuntu Boot Errors

August 04, 2020

I recently had an issue with my Ubuntu 18.04 laptop starting up. It can be daunting to fix startup errors since you do not have access to…

Demistifying HTTPS/SSL

January 08, 2019

First things first. If you have read anything about SSL, you have probably also seen the term TLS thrown in as well. TLS is interchangeably…