An Intro to C#

NOTE: Everything is written in simple and short words — like a student's notes. Declaring variables of different types: // type variablename = value; int num; string s; bool b; char ch; double dub; float fl; decimal dc; // arrays are of fixed length and can be provided a size during initialisation. // Compiler infers the size if you do not provide it. int[] arr; List<int> nums; // List<type> varname Dictionary<string, int> dict; // Dictionary<keyType, valueType> varname; Initialising variables of different types. // Syntax: // Either `var varname = value;` — here type is inferred by the compiler // Or `type varname = value;` var num1 = 1; int num2 = 2; var dub1 = 1.99; double dub2 = 2.99; var fl1 = 1.99f; // for float 'f' or 'F' suffix must be provided at the end of the value. float fl2 = 2.99f; var dc1 = 1.99m; decimal dc2 = 2.99m; // for decimal 'm' or 'M' suffix must be provided at the end of the value. var ch1 = 'A'; char ch2 = 'B'; var s1 = "first one"; string s2 = "second one"; var b1 = true; bool b2 = false; // Ways to Initialise an array: // NOTE: Some of the other ways to initialise an array, a list, and a dictionary have not been added here. // Only standard and recommended ways have been added. // recommended way for legacy projects int[] arr1 = { 1, 2, 3 }; // creates an array with values {1, 2, 3} // recommended for new projects int[] arr2 = [1, 2, 3]; // use square brackets; creates an array with values [1, 2, 3]. // Ways to initialise a list: List<int> nums1 = [1, 2, 3]; // modern syntax: c# 12+ // traditional standard: using var keyword var nums2 = new List<int>() { 1, 2, 3 }; // Ways to initialise a dictionary: // classic way: var dict1 = new Dictionary<string, int> { {"user1", 1}, }; // Recommended way: var dict2 = new Dictionary<string, int> { ["user1"] = 1, }; Constants // const type varname = value; const int num = 5; OOP In short words, Object-oriented programming (OOP) is a way of designing software around data, or objects, rather than functions and logic. ...

June 28, 2026

An Intro to Docker

What is Docker? Docker is best understood with a problem that you likely have faced: the same code runs in your machine, but it does not run on your friend’s/colleague’s machine. Docker solves this machine by packaging and running your application in a loosely isolated environment called a container. Containers contain everything that is required to run your application. Docker objects Images: An image is a read-only template with instructions to build and run a Docker container. You might either create your own images, or use those that are available in Docker’s public registry. ...

January 22, 2026

Authentication and Authorization Methods

Basic HTTP Authentication Method In this method: The client sends the word “Basic” followed by the Base64-encoded <username>:<password> in the standard Authorization header. The server then matches that username and password against the credentials stored on the server/db. If the credentials match, access to the resource is allowed, else, access is denied. In Basic HTTP Authentication, each request follows the same methods mentioned above - each request contains Basic <username>:<password> in the authorization header. ...

January 2, 2026

Different Types of Tests and their Implementation Example in Go

NOTE: The aim of this post is to explain common types of tests in the simplest and easiest words, without diving too deep. Unit test A unit test is a way of testing where the smallest unit of code is tested to see if it works correctly. This smallest part is usually a function, a method, or a code block. Below is an oversimplified example of a unit test in Go. ...

January 2, 2026

An Intro to Relational Database and SQL

What is a relational database? A relational database is a type of database, where data is stored in rows and columns, which collectively form multiple tables. Data from these tables can be linked using primary key or foreign keys. What is a primary key? A primary key is a column in a table that uniquely identifies each row. In the example presented below, the id column is a primary key for the table “Users”. ...

December 29, 2025

N+1 Problem in Simple Words

In simple words, the N+1 query problem is a situation where too many queries are being performed, and which could have been solved by making a single query. A simple example: In the first step, you execute a query to get a list of users. In the second step, you make individual queries to get a list of orders for each single user. Situations like these are exactly where N+1 query problems occur. You may think that making many small queries would be faster than making a single large query. However, the opposite is the truth: making a large single query is usually faster than many small queries. ...

December 29, 2025

What Is a REST API and How to Design It Correctly

NOTE: The goal of this blog post is to explain REST API in easy to understand words, like a student’s notes, without diving too deep. What is REST? REST stands for Representational State Transfer; it is a set of rules for designing web APIs where data is treated as resources, and HTTP Methods like GET, PUT, POST, and DELETE are used to access them. What is an API? API stands for Application Programming Interface; it is a way through which different systems can communicate with each other. API lets you share your resources while maintaining security and control. ...

December 27, 2025

Go Cheatsheet

Below you will find a quick, and short cheatsheet, written with simple examples, and easy to understand words. Declaring variables of different types: {% highlight go %} var i int var s string var b byte var bo bool // Boolean: true or false var ch rune // Go’s equivalent of a single character. var sSlice []string // This creates a slice of strings. var sArr [3]string // This creates an array with a length of 3 strings. var mp map[string]int // Creates a map with string type as key, and int type as value. {% endhighlight %} ...

December 25, 2025

Internet Concepts You Should Know as a Developer

How does the internet work? The internet is an interconnection of devices and computer systems that are connected through a set of standardized protocols such as IP, and TCP. At the core of the internet, routers are responsible for transferring the data. Data is broken down into smaller chunks called packets, and these packets are first examined by the router, and then transferred from one router to the next, until it arrives at its destination. Routers are responsible for determining the path through which the packets travel. ...

December 23, 2025