Locks in Go - Mutex, RWMutex, and When to Use What

Posted on Wed 25 March 2026 in Programming • Tagged with Golang, Programming

In our concurrency post, we briefly touched on mutexes. But there's more to locking in Go than just sync.Mutex. Go gives you several synchronization primitives, each designed for a specific access pattern. Use the wrong one and you'll either have a race condition, a deadlock, or unnecessary contention killing …


Continue reading

Concurrency in Python - Threads, Processes, and AsyncIO Explained

Posted on Wed 25 March 2026 in Python • Tagged with Python, Programming

Python's concurrency story is... interesting. If you've ever Googled "Python multithreading", you've probably run into the GIL debate and come away more confused than when you started. Can Python do concurrency? Yes. Is it straightforward? Not exactly. Python gives you three different concurrency models, each suited for different problems. Pick …


Continue reading

Concurrency in Go - Goroutines, Channels, and Patterns That Actually Matter

Posted on Tue 24 March 2026 in Programming • Tagged with Golang, Programming

"Don't communicate by sharing memory; share memory by communicating." That's the Go proverb that took me a while to truly understand. When I came from a Python/Django background, concurrency meant threads, locks, and race conditions giving me nightmares. Go changed that for me. Not because concurrency is easy (it's …


Continue reading

Understanding Context in Go - The Right Way to Pass It Around

Posted on Mon 23 March 2026 in Programming • Tagged with Golang, Programming

If you've been writing Go for any amount of time, you've seen ctx context.Context as the first parameter in almost every function. When I first started with Go, I treated it like a formality - just pass it along and don't think about it. That's fine until your HTTP handler …


Continue reading

Writing Your Own Kubernetes Operator - A Practical Guide

Posted on Sun 22 March 2026 in DevOps • Tagged with Kubernetes, Golang, DevOps

Kubernetes is great at managing stateless workloads out of the box. You define a Deployment, it creates Pods, handles rolling updates, and restarts them if they crash. But what about stateful applications like databases? What if you want Kubernetes to understand how to create a PostgreSQL replica, take a backup …


Continue reading

Terraform State Locking, Stuck Locks, and Force Unlock

Posted on Sat 21 March 2026 in Terraform • Tagged with Terraform, Infrastructure as a Code, DevOps

If you've worked with Terraform in a team, you've almost certainly run into this error at some point:

Error: Error acquiring the state lock

Lock Info:
  ID:        a1b2c3d4-e5f6-7890-abcd-ef1234567890
  Path:      s3://my-terraform-state/prod/terraform.tfstate
  Operation: OperationTypeApply
  Who:       sanyam@sanyam-macbook
  Version:   1.7.0 …

Continue reading

Understanding Git Worktrees

Posted on Fri 20 March 2026 in DevOps • Tagged with Git, Version Control

If you've been using Git for a while, you've probably been in this situation: you're deep into working on a feature branch, and suddenly you need to switch to another branch to fix a bug or review a PR. The usual approach is to either git stash your work or …


Continue reading

Understanding Git Submodules

Posted on Fri 20 March 2026 in DevOps • Tagged with Git, Version Control

Have you ever needed to use another Git repository inside your own project? Maybe a shared library, a theme, or a set of configuration files maintained separately? Git submodules let you do exactly that - embed one Git repository inside another while keeping their histories independent. Let's understand how they work …


Continue reading

Infrastructure as Code with Terraform

Posted on Sun 11 December 2022 in Terraform • Tagged with Terraform, Infrastructure as a Code

Infrastructure as Code (IaC) is an approach to managing IT infrastructure in which infrastructure resources are managed as code rather than through manual processes. Terraform is a popular open-source tool for implementing IaC. In this article, we'll explore how to use Terraform to manage infrastructure as code and how it …


Continue reading

Terraform and AWS Lambda

Posted on Tue 25 October 2022 in Terraform • Tagged with Terraform, Infrastructure as a Code

AWS Lambda is a serverless computing service that allows you to run your code without provisioning or managing servers. Terraform is a popular tool for infrastructure as code, which allows you to manage your infrastructure as code rather than using manual processes. In this article, we'll explore how to use …


Continue reading