Narendra Kumar's blog

Total number of posts: 17

"Work In Progress" Khatm na hui abhi तोतड़पुर नाम के एक गाँव की बात बताने जा रहा हुँ, ढंग से बैठ जाओ तकिया लेके। 70…

List all commits that modified the .gitmodules file ( this happens for example when you add/remove submodule) Get the contents of…

Redirect output of a loop to a file Wrap the loop in parenthisis and then use redirection operator. Feed output of a command into a loop I…

Go language provides library functions to sort slice of many common types. However, when you have some collection of custom type, then it…

A short code example of how to iterate over a string in go lang, when every element of string is a numeric digit. Suppose we have a function…

Listed below are some of the books that I found interesting. Technical Cracking the coding Interview, authors: Gayle LaakMann McDowell…

In java, PowerMock library allows us to mock private static methods. I have created a small example to demo this. pom.xml Should have the…

Recently I had to test a class which was having a call to some static method on some other class. I usually keep utility functions as…

In this post, I will be talking about how to dockerize a golang application. I am using a multistage build as recommended in docker best…

This post is about running mongodb in docker with authentication. We will be setting up admin user and a non admin user. Admin user will be…

Each document in mongo db is required to have a primary key and this key is always indexed. While inserting a document in mongo, if you do…

Recently I had to check on Gerrit. Gerrit is a review tool which works on top of git vcs. I was required to create a merge conflict and then…

In this blog post we I will share how to download a gzip file from a website and process it after decompressing it in memory. We won't be…

Writing unit test is a necessary and important part of software development in java. Junit is one of the popular unit test framework. Many…

In this blog post we are going to learn the basics of channels in go programming language. What is a channel You can think of a channel as a…