Middlewares are one of the most important concepts in backend engineering. They are standalone, reusable pieces of software that link different systems together.
In web development, it is common to place one or many middlewares between the client and server. This essentially creates a bridge between data and user interfaces.
Each middleware acts independently on an HTTP request or response. The output of one middleware can be the input of another middleware. This forms a chain of middlewares.
I don’t know about you, but I grew up without a smartphone (gosh I’m old).
I didn’t even have a phone. I had to use my mother’s good old Sony Ericsson to send secret love messages to my crush. It was all fun and games until I had to destroy evidence by deleting over 200 text messages.
When I first started programming in Go, I find Go interfaces a confusing topic to understand. After many hours of reading and researching, I have produced this article as an attempt to simplify Go interfaces for budding Gophers.
In this tutorial, I aim to answer the following questions with plain, simple English and childlike examples.
I assume you are familiar with basic Go syntaxes like functions and structs. Let’s get started! 🏃
In formal terms, a Go interface…
One of the most fundamental design principles in writing software is the DRY principle — Don’t Repeat Yourself. As software engineers, we should always avoid writing the same code again and again.
DRY teaches us to design our software such that it is built upon reusable and modular units of code. This helps us save time and reduce software maintenance costs in the long run.
In most programming languages, functions are the most basic unit of reusable code. However, as our software grows in size, it is good practice to group functions into separate logical units. …
Hello reader! Data structures are one of the most fundamental concepts in computer science. They essentially determine the way we persist and manage data within our software applications.
Some of the common data structures you may have come across are arrays, stacks, and hash tables. Each of them has different implementations and they perform well in different scenarios.
“All things are poisons, for there is nothing without poisonous qualities. It is only the dose which makes a thing poison.”