Recent Posts
Exploring Kerala: A Three-Week Journey Through the Spice Capital of India
The blog provides a detailed account of a three-week trip to Kerala, India, focusing on the my experiences while balancing remote work and leisure. I am a working professional, who sharing insights about my journey, accommodations, food, activities, and transportation while exploring three key locations: Kovalam, Varkala, and Kochi.
read more
Go Effective String Concatenation
This article discusses the benefits and drawbacks of using string concatenation in Go. It explains that while concatenating strings can be an efficient way to build large text outputs, it can lead to performance issues if not managed carefully. The author provides tips on how to optimize this technique by pre-allocating memory for large amounts of text and reusing the same buffer to avoid unnecessary reallocations.
read more
Go Function Arguments Are Always Pass by Value
This article demonstrates different ways in which pointers can be passed to functions as arguments and how they can affect the original variable or create new versions of the pointer. Each approach has its use cases and trade-offs depending on the specific requirements of a program.
read more
A Guide to Configuring Private Paths and Lifecycle Rules with AWS CDK and Go Lambda
This article explains how to set up private paths, lifecycle rules, and AWS CDK in your Go-based AWS Lambda function. It provides a step-by-step guide on configuring these elements, including instructions on creating a Lambda handler function and deploying the code using the AWS CDK.
read more
Go Concurrency 2.5 - Patterns and Idioms | Fan Out Fan In
So far we have discussed how Pipelines pattern can be leveraged to re-use and compose programs together. But what if I told you that we can leverage performance/speed gains by utilising Pipelines to process streams in parallel? Isn’t that the general idea of concurrency? Let’s do a simple program to find prime numbers and then let’s compare it with its Fan Out Fan In equivalent.
I am going to use testing package in this case to benchmark performance and compare them later.
read more
Go Concurrency 2.4 - Patterns and Idioms | Generators
Generator pattern is an effective way to handle conversion of concrete slice/array types to a data stream in the for of channels. These become absolutely handy when you start working with sync primitives in Go. Using this pattern also helps in predictability and readability across application.
read more
Go Concurrency 2.3 - Patterns and Idioms | Pipelines
Pipeline design pattern is not limited to concurrency and is something that every programmer has followed or implemented, even if unknowingly. A pipeline could contain one or more stages, ideally limiting single responsibility to each stage. This allows different stages to be rearranged, to be added or removed.
read more
Go Concurrency 2.2 - Patterns and Idioms | Error handling
In this post we see how to check for errors on responses being read from a channel and let the goroutine with the right information decide how to handle the error.
read more
Go Concurrency 2.1 - Patterns and Idioms | Fundamentals
In this post we talk about some of the common patterns used in Go community that are going to prove handy when working with goroutines. The topics covered are Confinement, Infinite for loop with exit case, Loop with default case and Loop with Range and the default case pattern.
read more
Go Concurrency 1.3 - Sync Package | Channels & Select
In this post I talk about the type
read more
Channels
and Select
available under the sync package. While Channels
can be used for both communication between concurrent processes, they can also be used in synchronisation by sharing the memory address. Select
allows you to pseudo-randomly resolve one of the available/ready case.
Go Concurrency 1.2 - Sync Package | Once & Pool
Continuing the sync package series, in this post I talk about the type
read more
sync.Once
and sync.Pool
available under the sync package. While sync.Once
offers a once.Do(func() {})
signature that is perfect for initialising most of the clients in your application. While sync.Pool{New: func() interface{}}
, lets you do things like warming up, managing and creation of pool of resources.
Go Concurrency 1.1 - Sync Package | WaitGroup & Mutex
Memory access synchronisation is one of the popular ways to achieve concurrency in various languages.
read more
Sync
package is one of the major difference between these languages and Go. The package provides you new set of concurrency primitives with wide abilities on top of the memory access synchronisation primitives. I am going to briefly talk about some commonly used tools from this package.
A software professional with 7.5+ YOE delivering value with software, primarily over web.
I plan to expand this blog from just technical to other ideas I care about like philosophy, travel, food, etc.
Other Profiles LinkedIn GitHub
read more