Git Submodules Basics and How to Replace One Submodule With Another
Git Submodules Basics and How to Replace One Submodule With Another
· β˜• 7 min read
Suppose you are working with softwareA which depends on libraryA, instead of copy-pasting the libraryA over and over again when a new version of the library is released what we can do is use submodule to make this process DRY and elegant.

How I Enabled HTTPS on My EC2 Hosted Website
How I Enabled HTTPS on My EC2 Hosted Website
· β˜• 6 min read
In 2014, Google hinted that they are running tests taking into account whether sites use secure, encrypted connections as a signal in our search ranking algorithms. This means it will affect SEO in some way. Today in the age of HTTP2, https is defualt. Default in the sense that many server software will only allow HTTP2 when https is configured.

The Year in Review 2020
The Year in Review 2020
· β˜• 10 min read
Each year I post about what have I done in that particular year, inclining it more toward career. This is to document my process of learning over the year of 2020. I would say this was a productive year for people in IT. I myself completed some courses this year which would take more time if it was a non-corona year.

Beginner's Introduction to Promises in JavaScript
· β˜• 2 min read
Promise is a language feature for asynchronous programming in JavaScript. Today we see the basic syntax which will get you running while you learn more on the go.

Data Structures 101
Data Structures 101
· β˜• 8 min read
Like most of the self-taught programmers, I spent a lot of my years dabbling with different technologies. But there comes a time in every programmer's life when they have to learn data structures and algorithms to proceed in their careers. In this post I will go through the basics of data structures, what purpose they server and what's common between all of them.

A Brief Evolution of HTTP
· β˜• 7 min read
In this post I have gone through and collected events related to HTTP and it's gradual development.

Difference Between Handler, Handle and HandlerFunc
· β˜• 6 min read
Are you lost between Handle, HandleFunc, and HandlerFunc? If the answer is yes then this post is for you. To understand these pretty well we need to be familiar with interafces. Although `interface` is just a keyword, it's confusing at first when you are switching from Python like language; which does not have a similar keyword.

What Does a True RESTful API Means?
· β˜• 4 min read
Introduction The way we used to deliver resources to the client in a server-client setup is now drifting away from REST to a more modern delivery mechanism. Two of them are gRPC and GraphQL. While both these solve a different kind of problem, REST is going to stay for a while. It is the simplest to learn at least. You might have seen job descriptions requiring skills like the ability to design RESTful API.

Benchmarking in Go, with Example
· β˜• 3 min read
Introduction From The Zen of Go: If you think it’s slow, first prove it with a benchmark Don’t assume if things are slow. Benchmark it and see if they are really slow. One thing to note here is benchmarking a program is different from profiling a program. Benchmarking is the way we check how fast our algorithm is for a given unit of the program. In benchmarking, we typically see how many iterations can a piece of code can run in a given time.

Top 6 Free Learning Resources I used to Learn Go
· β˜• 4 min read
The internet is filled with Go learning resources. And I am not going to repeat all the links here. I will list only the resources that I went through. I am a self-taught programmer from start. And have limited knowledge of computer science. Which of course is changing day by day. I had a background in Python before getting into Go. So my recommendations will also be aligned with my experience level.

Optional Parameters Using Option Struct
· β˜• 5 min read
Introduction In last post we learned how we can use functional options to pass parameter to our functions. In this post we’ll see an alternative way to do the same thing. I’ll take the same code from the last post to keep things simple. Variadic Functions for Options 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 type Coffee struct { CoffeeBeans bool Sugar bool SteamedMilk bool } func New(opts .

Optional Parameters using Functional Options
· β˜• 5 min read
Introduction In Python you can assign default value to the functions, like so: 1 2 def my_func(posarg, named_arg=True, another_named_arg="Okay") # logic goes here... But in Go you can’t do this: 1 2 3 func myFunc(posarg, named_arg bool = true, another_named_arg string = "Okay") { // logic goes here... } This will throw a syntax error. Try that? In this post, we’ll see how can we overcome this issue the go way, with something called Function Options.

Sending POST Request in Go with a Body
· β˜• 3 min read
Introduction Send a POST request in golang is pretty daunting if you have a post body and you’re coming from a scripting language like JavaScript or Python. Here in Go, schema for JSON needs to be defined beforehand in order to marshal and unmarshal string back and forth to JSON. Simple POST This marshaling/unmarshalling could be an oneliner if your request body is not nested, or is one level deep, or there is not even a body.