Why Go error handling is my favorite

Go has very simple and efficient error handling mechanism. Error as value is very powerful concept and some people find it annoying. I think errors should be annoying so that we don’t ignore them. Most notable aspects of go’s error handling I found myself are: It is just straight forward and simple, I didn’t have to do anything clever to tweak it and make it more erganomic. I got used to it quickly after a bit of skepticism....

Zig Overview

Zig is a systems programming language that emphasizes simplicity, performance, and safety. It has gained attention for its minimalistic approach and powerful features. Zig is particularly well-suited for developing low-level systems and applications where control over hardware and performance are critical. Features of Zig No hidden control flow: Zig has no hidden control flow, which means that the behavior of the program is predictable and easy to understand. This makes debugging and optimization easier....

Implementing Redis in Golang

Redis is well known for a in-memory data store which is widely used as cache, database and message broker. In this article, we will implement a simple Redis client in Golang. Let’s look at the basic parts like, Listening to a port Accepting connections Reading the commands Parsing the commands Handling the commands Listening to a port We can use the net package in Golang to listen to a port. We can use the net....

Setting up Observability in your app

Observability is a very important topic to consider in any application just like Tests. It helps understand a lot about how our system works, and measure a lot of aspects to make data-driven decisions. It can mostly be a go-to guide to what is happenning in your system, and how to improve it. Parts of Observability I’d like to categorize Observability into 3 parts: Logging: Logging is the logs we generate from our application usually in levels like info, debug, error, warn, etc....

Phoenix - Overview

Phoenix web framework had been there since a while and it caught my attention with it’s LiveView feature. The framework is built on top of Elixir and the BEAM VM is designed for highly concurrent, distributed systems. This means Live view and sockets are gonna be really feasible with Phoenix. Getting Started We need to install Elixir brew install elixir and then install Phoenix using mix. mix archive.install hex phx_new Mix is the build tool for Elixir and Phoenix uses mix to create new projects and manage dependencies....

Gleam Overview

Gleam is a statically typed language for the Erlang VM (BEAM). It is designed to be a productive and fun language to work with. Gleam is a compiled language, which means that it is compiled to BEAM bytecode and runs on the Erlang VM. It is a functional programming language with a strong type system that helps catch errors at compile time. Few things I like about Gleam are: Gleam ships with all language tooling just like Go....

Vim Inspired modern IDEs

I learned vim a while ago but really didn’t use it for main projects or daily work. Lately I decided to rebuild my neovim config from scratch and really enjoyed setting up and using all the parts. It inspired me to setup similar configurations in other modern editors. While looking around the internet for similar setups, I found that zed is a very attractive choice for a good combination of vim and modern IDE features....

Mock Service Worker - Overview

Mock Service Worker (MSW) is a library that helps you mock HTTP requests in your tests. We can use it to define request handlers to respond different mock data mainly for testing. Let’s see how to use MSW in browser environment. Installation Install msw package bun install msw Setup Create a index.js which will be used to setup MSW and ship to browser. import { HttpResponse, http } from "msw"; import { setupWorker } from "msw/browser"; // handlers const userHandler = () => { return HttpResponse....

TypeScript Overview

TypeScript has gained popularity for it’s ability to add type system to Javascript. Typescript code will be transpiled to Javascript code which can be run in any browser. Few things I like about TypeScript are Static Typing: TypeScript provides static typing which helps in catching errors at compile time. Strong Tooling: TypeScript has strong tooling support with features like code completion, refactoring, etc. Community: TypeScript has a large and active community that provides support, libraries, and tools....

Connecting to Consul & Vault using Golang

Consul is a tool for service discovery and configuration. It provides a way to discover services and manage configurations in a distributed system. Vault is a service that help us to manage secrets and protect sensitive data. It provides a secure way to store and access secrets like API keys, passwords, certificates, etc. Both are similar tools provided by HashiCorp Where we can access the services using the HTTP API....