Java Notes

Java Programming Language Notes In Java, class names has to match with the file names To get a jar file that you can execute on a JVM, you need to perform the following steps: Compile the Java source code into byte code Create a jar file from the compiled byte code Execute generated jar file with JVM If we outline the commands corresponding to the steps above javac Main.java jar cvfe my-jar.java Main Main.class OtherDeps.class java -jar my-jar.java In addition to swtich statements, there is also switch expressions ...

November 7, 2025

Concurrency in Go

Concurrency Modern computers provide multiple chips, and we can access multiple chip Golden questions to ask The following questions are important to answer to run programs concurrently Are critical sections entered and exited with high frequency What size would be ideal for the critical section

November 1, 2025

Go Pointers

Pointers Pointer is a variable which contains address of another values stored address. Different values require different sizes of memory location, value is the boolean, but it still takes up a whole byte, that is because smallest representable amount of memory, and the other types takes up space their bit count divided by four; int32 -> 32 bits -> 4 bytes etc. Slices, maps, interfaces, channels, and functions are impelemented using pointers. It’s common to pass channel to some other function, and defines their purpose, hence it’s pointer by default. ...

November 1, 2025

Go Introduction

Introduction Go is a language where concurrency is first class citizen, it can be used to concurrently run applications using the language native constructs with ease, and efficiently. Although Go compiles to native binary, it still has two main components attached to it, a scheduler, and a garbage collector. Garbage collection in Golang, is meant to run frequently with small puases, rather than big but less frequent pauses. Scheduler is the component responsible what enables concurrency constructs to run smoothly, it manages OS thread pool and orchestrates goroutines. ...

October 29, 2025

Goroutines

Gorotines Goroutines are functions that can run concurrently. Golang follows the model of concurrency called fork-join model. The subroutine forks from the mainroutine and after it completes its execution joins back to the mainroutine.

October 1, 2025

Daily Docker Tasks

Introduction This is not a in-depth guide for Docker but rather understanding enough to get comfortable with it. Docker is a containerization tool that creates an isolated environment for applications to not rely on system level dependencies so its behavior doesn’t change from system to system. It can be considered as defining a pure function rather than a function that relies on global variables or side effects. With the same inputs, it’ll produce the same output, here inputs being the system you define for your application to execute. ...

June 15, 2025