This post shows how to implement the Observer Design Pattern using the facilities available from Spring Application Events. More importantly, it shows how to publish and consume custom application events in Spring Boot. Observer Design Pattern – Publish And Consume
Lombok @Builder To Use The Builder Design Pattern in Groovy
We can use the Builder annotation from Lombok to use the Builder Design Pattern in our Groovy codes. This post shows how to use the Lombok Builder annotation in Groovy. Hence, we need to depend on the Lombok library via
Golang Concurrency With Goroutine: Things To Know
How far along are you with your learning of Golang? You will inevitably encounter Golang concurrency with goroutine. If case you are already there and struggling, this post will make understanding goroutines painless. Goroutines Enable Concurrency The concept of concurrency
Get Your Head Around Golang Interface with Examples
The Golang interface is an interesting construct, and most people from programming languages like Java will find it different. If you are new to Golang, this post helps you get your head around the Golang interface with examples. Golang Interface
Three Ways To Create Maps In Golang
A map is a ubiquitous data structure that allows us to store key-value pairs, and there are three ways to create maps in Golang. Also, it is one of the reference types in Golang that allows us to change its
Unable To Update Struct Instance Fields in Golang
We cannot update Struct instance fields in Golang! That is partly true because Golang passes arguments to function by value even when it is a struct instance. Aside from function parameters, the effect is the same for “receiver” arguments. Sample
docker-compose.yml for PostgreSQL
This post provides a basic docker-compose.yml to create a PostgreSQL container with initial user account with password.
Lenovo ThinkPad T495 Purchase: Just Bought It!
Today I bought a Lenovo ThinkPad T495 online. I kept looking at this product for several weeks but could not make up my mind. I wanted an AMD Rayzen 7 Pro 3700U but could only get a maximum of 8GB onboard memory plus a 16GB selectable memory.
Golang Struct With Functions
It is common to see Golang Struct with functions, and it is the closest we can get at imitating OOP classes. Other than that, Golang is a procedural language. Defining a Struct We need to define a struct type before
Three Ways To Declare and Initialize a Struct in Golang
Struct in Golang is a container type similar to a Java class or Rust struct containing various fields or properties of various data types. All have equivalent ways of creating an instance. This post shows how three ways to declare