Aditya Chatterjee's Blog, page 12

December 10, 2023

Receiver Parameter Idiom in Golang

Receiver Parameter Idiom in Golang

I came across this line of code in a GoLang code base today:

func (us UserStore) GetUsers(w http.ResponseWriter, r *http.Request) { // implementation // making use of `us` object/variable}

and my honest reaction was ... humm!

To me, this wasn't new but also something that I haven't paid much attention to either. I had just realized that the variable us is actually not in the argument list.

If we take look at the above snippet, the us variable is being passed separately to the functio...

 •  0 comments  •  flag
Share on Twitter
Published on December 10, 2023 02:43

Linked List in Golang

Table of ContentsIntroductionSo, Why Linked Lists?Implementation in GoDefining Node*Defining Linked ListInsert A Node at Given IndexTraversing the Linked ListDeleting a Node at Given IndexGarbage Collection in GoIntroductionLinked List in Golang

A Linked List is a linear data structure in Computer Science that stores data in a non-contiguous fashion in computer memory. It comprises nodes or elements that are interconnected through logical links. These links are established from one node to another ...

 •  0 comments  •  flag
Share on Twitter
Published on December 10, 2023 02:41

December 9, 2023

Responsive Navigation Bar [without Bootstrap or external library]

A responsive nav-bar is a UI/UX based element, which is essential to improve the appearance and ease of navigation in websites. It consists of a 1D bar (usually) with icons and hyperlinks to take you to different parts of the same website. Almost all modern websites have a nav bar of some format, and the better-looking and functional it is, the more it improves user experience and gives a great impression, especially if you want to add it to your portfolio projects.

We can easily create a simple...

 •  0 comments  •  flag
Share on Twitter
Published on December 09, 2023 04:59

Vector of array in C++

Table of contentDepth IntroductionKey FeaturesVarious OperationsInsertionAccessingDeletionMenu Driven CodeComplexity AnalysisConclusionDepth IntroductionVector of array in C++

The vector of arrays in C++ is an excellent tool for efficiently managing fixed-size arrays within a vector. This approach is particularly advantageous for organizing grouped data where each array shares a uniform size. In this structure, each element in the vector is an array of a consistent size. This method is commonly empl...

 •  0 comments  •  flag
Share on Twitter
Published on December 09, 2023 04:51

December 8, 2023

December 6, 2023

Discovery of Speed of Light and some methods to measure it

Introduction

From the ancient times to the modern days, It was a very long journey how concepts about light evolved with time and new experiments and observations. Today we all know Light is a electro-magnetic wave as well as bunch of photon particles.

The speed of light in vacuum is a fundamental constant. The accuracy of determination of speed of light really matters beacause it is the maximum possible velocity of a particle, according to the relativity theory. Many scientist Tried to calculat...

 •  0 comments  •  flag
Share on Twitter
Published on December 06, 2023 03:31

December 3, 2023

Rendezvous hashing

Key Takeaways (Rendezvous hashing) Rendezvous hashing, also known as highest random weight (HRW) hashing. Rendezvous hashing solves a general version of the distributed hash table problem. Rendezvous hashing distributes keys uniformly across the nodes. Rendezvous hashing was invented by David Thaler and Chinya Ravishankar at the University of Michigan in 1996. Apache Ignite distributed database uses Rendezvous hashingTable of ContentIntroductionPropertiesAlgorithmC...
 •  0 comments  •  flag
Share on Twitter
Published on December 03, 2023 14:18

November 29, 2023

Unveiling the Power of WebAssembly: A Beginner's Guide

In the world of web development, a new revolutionary force is uprising and reshaping the way we build and execute web applications. Enter WebAssembly (WASM for short), a binary instruction format poised to elevate the performance and versatility of web applications. In this guide at OpenGenus, you'll learn how to use WASM, get started with it, use it for building your next application, and explore the power of WASM!

So let's just dive into this new awesome thing, i.e., WebAssembly, shall we?

Wha...
 •  0 comments  •  flag
Share on Twitter
Published on November 29, 2023 13:00

November 27, 2023

The Integration of Security to DevOps

Source: images.unsplash.com

DevOps is the combination of development and operations in software development. This includes all the tools, practices, and processes that combine software development and IT operations in a company. DevOps increases the efficiency of software development projects and requires software developers and IT operations personnel to work hand-in-hand.

Traditionally, these groups work separately, but it has been proven that effective collaboration between people who write ...

 •  0 comments  •  flag
Share on Twitter
Published on November 27, 2023 07:45

November 14, 2023

AI and Machine Learning in Automated Cross Browser Testing

The era of Artificial Intelligence (AI) and Machine Learning (ML) isn’t just a story of the past; it is a boon for every industry and plays a pivotal role. Both AI and ML deliver immense capabilities that can drive innovation, enhance efficiency, improve decision-making, and give a competitive edge. Whether you are an organization aiming to stay ahead in a rapidly evolving landscape or an individual looking to streamline your tasks, Artificial Intelligence (AI) and Machine Learning (ML) have the...

 •  0 comments  •  flag
Share on Twitter
Published on November 14, 2023 05:17