Python - Overview

Python is an interpreted, high-level, and general-purpose programming language known for its readability and concise syntax. It supports multiple programming paradigms, including procedural, object-oriented, and functional programming. Python’s extensive standard library, dynamic typing, and dynamic binding options make it highly attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components. Few things I like about Python are Readability and Syntax: Python’s syntax is simple and clean....

Kotlin - Overview

Kotlin is a modern, statically typed programming language that makes development faster and more enjoyable. It is widely used for Android app development, web development, and server-side development. Kotlin supports object-oriented and functional programming paradigms, making it versatile for various types of projects. It’s capability of DSL (Domain Specific Language) creation makes it more powerful. Few things I like about Kotlin are Extension functions and higher-order functions make the code more readable and maintainable....

Rust - Overview

Rust is a systems programming language that prioritizes safety, speed, and concurrency without relying on a garbage collector. Its unique ownership model enforces memory safety and makes system-level programming more efficient. Rust is widely used in operating systems, game engines, and web applications for its performance and reliability, Also in some Web Clients using WASM. Few things I like about Rust are The ownership system, which ensures memory safety without a garbage collector....

C# - Overview

C# (pronounced “C Sharp”) is a modern, object-oriented, and type-safe programming language developed by Microsoft. It is widely used for developing desktop applications, web services, and mobile apps. C# supports multiple programming paradigms, including imperative, declarative, functional, generic, object-oriented, and component-oriented programming. Few things I like about C# are It’s a simple and easy to learn language. The extensive standard library and ecosystem, including ASP.NET and .NET Core. Few things I dislike about C# are...

Go - Overview

Golang, or Go, is a statically typed, compiled programming language designed for simplicity and efficiency. It is commonly used for backend systems, cloud services, and DevOps tools due to its robust standard library and support for concurrent programming. Go follows a procedural and concurrent programming paradigm, making it ideal for modern computing challenges. Few things I like about go are The seperation of data (struct) and behavior (methods). This makes the code more readable and maintainable....

Servers - Configuration Management Overview

There are different ways to manage configuration of a server. A common pattern is to use a combination of multiple sources, such as env variables, config files, cli args etc… and overlapping values are resolved based priority of the source. eg: configuring a server with a port number. cli args ( --port=8080 ) env variable ( port=8080 ) config file ( port: 8080 ) default value ( 8080 ) The configuration management system should look up the values and apply the value at the highest priority source....

Hugo - Using a hugo theme

Hugo is a great static site generator. The build times are pretty fast and there are theme which we can use. A lot of Hugo apis are available to setup a static site which is like a blog / personal website / documentation. Here are some cool themes Hugoplate Papermod Setting up hugo Initialize a new hugo site hugo new site mysite --format=yaml Add a theme ( using papermod as an example ) cd mysite git init git submodule add --depth=1 https://github....

GO + HTMX - A Crud implementation

As I was exploring htmx, I wanted to try out an interactive workflow with it. A classic example is a data list, modal to create / update data and a delete. Setup with Gofiber Initialize go module and install dependencies go mod init htmx-crud go get github.com/gofiber/fiber/v2 go get github.com/gofiber/template/html/v2 Setup Server html template engine main.go package main import ( "log" "github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2/log" "github.com/gofiber/template/html/v2" ) func main() { // Setup html template engine engine := html....

Benchmarking GO vs Dotnet vs Nextjs

I was curious about how the server side rendering in terms of req/sec can go, dotnet and nextjs perform. So I created a simple server side rendering application in all three technologies and benchmarked them using wrk. Golang Golang was setup with gofiber and gotemplate. It performed well with around 14k req/sec. using minimal ram (~21mb) 10 threads and 400 connections Thread Stats Avg Stdev Max +/- Stdev Latency 34.05ms 31....

Razor Pages + HTMX - Handling form submissions.

Htmx allows us to handle async form submissions with ease by using hx-post attribute. In background it will issue a post request to the url specified in hx-post attribute and replace the element with the response. In this post we will try to handle form submissions in razor pages using htmx. Initialize a new razor pages project. dotnet new razor -o htmx-form In Pages/Index.cshtml we setup the layout. @page @using Htmx @model IndexModel @{ ViewData["Title"] = "Home page"; } <div class="row pb-5"> <div class="col"> Form here </div> <div class="col"> Login here </div> </div> Create a partial userform which will be used here and in the post request....