The 5-Minute Refactoring Guide As experienced software engineers, we often face a dilemma: our codebases, like all physical systems, trend toward entropy. The gap between “getting it done” and “getting it right” grows, leading to sluggish feature delivery and inevitable technical debt. The solution isn’t a massive, heroic rewrite; it’s the disciplined, humble practice of Kaizen, or continuous improvement. For Golang engineers, this translates to the 5-Minute Refactor: a daily comm...| Lorbic
Quark: A Minimal Note-Taking System A few months ago, I was in a meeting where the conversation was moving at lightning speed. Updates, critical decisions, all flying around the room. I opened my laptop, ready to take notes in Notion, but within minutes I was lost. Too many clicks, too much formatting, and many annoying boxes. By the time I found the right template. I had already missed half of the discussion.| Lorbic
The Real Cost of Digital Laziness We’ve built our entire lives on top of fragile passwords. Most people treat them like they treat dental checkups, ignore it until something hurts. By then, it’s too late. The numbers are not on your side. Every password you’ve ever created has probably been leaked in some breach you’ve never heard about. It doesn’t matter that the breach was from a forgotten forum you joined in 2012; attackers don’t forget. They run automated “credential stuffin...| Lorbic
What We Are Doing If you are somewhere that blocks VPNs through deep packet inspection (DPI), SNI filtering, or crude port blocking, the goal is to make your VPN traffic look as boring as possible. The quick win is to put it on port 443, the same port used by HTTPS. That is the lifeline of the modern web, so most firewalls are reluctant to block it. But think of it as changing your outfit but not your walk: just putting Shadowsocks (which Outline runs under the hood) on port 443 does not make...| Lorbic
How to Resolve Huge Git Merge Conflicts Without Losing Your Mind If you’ve ever been knee-deep in a long-lived branch merge and thought, “this can’t be what version control was meant for,” you’re not alone. Git gives us powerful tools, but resolving large merge conflicts, especially during major migrations or rewrites can feel like surgery without anesthesia. In this post, we’ll walk through how to approach and resolve massive merge conflicts systematically. Not with hand-wavy adv...| Lorbic
Today I learned that building a successful open-source project like Milvus, which became a leading vector database, involved starting from scratch due to a lack of suitable existing solutions, making the difficult decision to completely rewrite the core system (Milvus 2.0) for better scalability and cloud-nativity, and continuously engaging with the community to evolve the product. It also highlighted that the company behind Milvus, Zilliz, focuses on the “unglamorous” but critical aspect...| Lorbic
What Being a Staff Developer Means at Shopify (2023)| Lorbic
Vector search using clickhouse.| Lorbic
Learn about how to build vector database with ClickHouse.| Lorbic
What Facebook’s Memcache Taught Me About Systems Thinking “The probability of reading transient stale data is a tunable parameter.” - Scaling Memcache at Facebook (NSDI, 2013) There’s a moment in every engineer’s life when a seemingly simple component like a cache, suddenly becomes the most complex piece in the stack. For me, that moment arrived reading Facebook’s paper on scaling Memcache. I didn’t expect a key-value store to challenge my understanding of systems architecture. ...| Lorbic
Bitmasking in Go Bitmasking is one of those computer science tricks that feels like wizardry, until you realize it’s just some clever shifting and binary math. This blog explores the idea, shows how we use it in Go, and why it’s surprisingly useful when working with databases like Couchbase. --- What’s Bitmasking? A bitmask is just an integer where each bit (0 or 1) represents a flag or state. Instead of storing multiple booleans in a slice or map, you cram them into a single int. Fast ...| Lorbic
How to Backup and Restore Docker Volumes Between Machines When working with Docker, persistent data is often stored in volumes. Unlike container filesystems, volumes survive restarts and recreations. But what if you need to move this data from one machine to another? Here’s a quick and reliable way to back up a Docker volume on one computer and restore it on another. I find this use case very often when I’m working on a new project that changes the database schema and I need to maintain e...| Lorbic
Understanding different types of software testing is crucial for delivering a reliable application. Smoke Testing checks basic stability after a new build, while Sanity Testing verifies specific bug fixes or minor updates. Functional Testing ensures that features work as expected based on business requirements. Regression Testing prevents new changes from breaking existing functionality. End-to-End (E2E) Testing simulates real-world user workflows, and Performance Testing checks sy...| Lorbic
Tools I Use on My Mac As a new Mac user, it has been a tough journey getting used to limitations of macOS compare to linux based os. I rely on a set of carefully chosen tools to improve productivity, streamline workflows, and make my overall experience less frustrating. Here’s a look at top 20 essential apps I use daily: System & UI Enhancements 1. Scroll Reverser Allows me to reverse the scrolling direction for trackpads and mice independently, making navigation more intuitive.| Lorbic
In Go, method receivers determine whether a method acts on a copy of a value or a reference to it. This choice isn’t just about performance—it affects correctness and behavior, especially when dealing with synchronization primitives (mutex, wait group, etc), slices, and embedded types. In this post I explore when to use T (a value receiver) vs. *T (a pointer receiver) and why, in most cases, pointer receivers should be the default and preferred.| Lorbic
Analysis Paralysis in Engineering In engineering, progress is key. However, sometimes teams get stuck in endless discussions, over-planning, and constant changes, delaying actual work. This situation is called “Analysis Paralysis.” It happens when people focus too much on making perfect decisions instead of moving forward with practical solutions. One common cause of analysis paralysis is fear of failure. Engineers and managers want to avoid mistakes, so they keep analyzing every possible...| Lorbic
Go Clean Code Guidelines for Code Quality and Maintainability. When it comes to writing clean, maintainable code, there are a few fundamental rules that can help improve the overall structure and quality of your codebase. As engineers, our goal should be to keep things simple, clear, and scalable. With this in mind, here are some guidelines which prioritize code readability, functional clarity, and the overall maintainability of a project. These guidelines are based on principles from clean c...| Lorbic
Let’s go through the SOLID principles and functional programming principles that can apply to your Go codebase. I’ll provide simple Go examples along with brief explanations to show how each principle can improve code quality. --- SOLID Principles Single Responsibility Principle (SRP) Description: A class or function should have only one reason to change, meaning it should only have one job or responsibility. Example: // Good: Separate responsibilities into two functionstypeEmailSenderstr...| Lorbic
Are you new to IT? Feeling a bit overwhelmed? Don’t worry, I’ve got you covered! In this article, I’ll share 10 essential tips to help you get started on your journey in Information Technology. From mastering the basics to gaining hands-on experience and staying curious, these tips will set you on the right path. Let’s dive in and start the IT adventure!| Lorbic
NGINX is a web server that can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache. NGINX is a free and open source software licensed under 2-clause BSD. You can easily download and use NGINX in Windows, macOS, Linux and other operating systems link read NGINX installation instructions from the official docs and install on your operating system for free. But, in this blog we are going to build NGINX from source code. And we will configure NGINX’s settings, paths, and a...| Lorbic
While installing Docker on Windows typically installs it on your C drive, there are scenarios where you might prefer a different location. Perhaps you have limited space on your main drive or want to isolate Docker’s operations for increased performance and security. Whatever the reason, this guide will provide you with the knowledge and steps to install Docker in a custom drive on your Windows system. Requirements: Windows 10 or later (with Hyper-V and WSL 2 enabled) Docker Desktop install...| Lorbic
Lorbic - Terms of Service Welcome to Lorbic! By accessing and using this website, you agree to comply with and be bound by the following terms and conditions of use. If you do not agree to these terms, please do not use this website. Content Usage External Images: Some images used on this blog are sourced from external platforms such as Pexels, Unsplash, and Pixabay. These images are subject to the terms and licenses provided by the respective platforms. We do not claim ownership of these ext...| Lorbic
Clopudflare Workers and D1 database - lorbic.com In today’s fast-paced digital world, where attention spans are short, optimizing website performance and user experience is crucial. Imagine asking someone to visit a lengthy URL (https://lorbic.com/setting-up-llama-2-with-docker-on-your-gaming-laptop-using-ollama/) – their reaction might be a disappointed face (🙁). Typing such URLs can lead to errors, resulting in users landing on a dreaded 404 page.| Lorbic
This article is simple guide on setting up Llama 2, a powerful large language model, on your gaming laptop using Docker and the Ollama platform. Ollama makes it very easy to run many LLMs locally. In this detailed article, I’ll cover each step, such as Ollama installation and ease of interaction through a Chat GPT-like UI. Before we go into the technical details, let’s understand what a large language model is.| Lorbic
In this blog I’ll discuss how to host a static website on AWS with S3, CloudFront and Route 53. We will secure our website with SSL certificate generated from Certificate Manger, enable HTTP/2 and HTTP/3 and redirect insecure http traffic to https version of the website. We will also make our bucket private and add policy to allow access from CloudFront. Picture of a Motor Buggy| Lorbic
Learn how to enhance user experience by activating the search input field with a simple key press on your website. This quick guide provides a code snippet and easy-to-follow steps. 1. HTML Markup for Search Input: <form> <inputtype="text"id="search-input"placeholder="$ grep..."> </form> <!-- If you have a button to activate the search field like in this website --><liclass="search-icon"> <ahref="javascript:void(0)"id="search-button"> <iclass="fa fa-search"></i> </a> </li> 2. JavaScript Funct...| Lorbic
Learn the simple and fast process of creating a PostgreSQL container using Docker. This guide provides both the command and a detailed explanation of the container and PostgreSQL database configuration. 1. Create the PostgreSQL Container: docker run -d --name postgres \ -e POSTGRES_PASSWORD=RunningFlying2 \ -e PGDATA=/var/lib/postgresql/data/pgdata \ -v postgres_data:/var/lib/postgresql/data \ -p 5432:5432 \ postgres:latest 2. Explanation: The above command initiates the creation of a contain...| Lorbic
Good Evening, Here are the Hands-on notes for Dart Programming Language. I created these notes when I was learning Dart Language. So, these notes might help you too. You can use these notes as a quick reference to Syntax and Demo. I’ve covered almost every fundamental concept of Dart in this article. Photo by Birmingham Museums Trust --- 1. Basics 1.1 The Main Function Every Dart program starts execution from main() functions.| Lorbic
Photo of Hyacinth macaw by Roi Dimor on Unsplash --- Types of Pointers in C / C++ 1. Null Pointer It is a pointer pointing to nothing. NULL pointer points to the base address of the segment. -EXAMPLE- int* ptr = (int) *0; float* fptr = (float) *0; double* dptr = (double) *0; char* chptr = (char) *0; Other ways of initializing NULL pointer int* ptr = NULL; char* chptr ='\0'; NULL also means 0 in macro #define NULL 0 --- 2. Dangling Pointer A pointer pointing to the memory address of any variab...| Lorbic
Instructions Things You’ll Need Proficiency in C++ C++ compiler Debugger and other investigative software tools Part 1 Understand the operator basics. The C++ operator new allocates heap memory. The delete operator frees heap memory. For every new, you should use a delete so that you free the same memory you allocated: char* str =newchar [30]; // Allocate 30 bytes to house a string. delete [] str; // Clear those 30 bytes and make str point nowhere. Part 2 Reallocate memory only if you’ve ...| Lorbic
Photo by NASA on Unsplash --- If you want to learn bash bash scripting please read this article. Learn complete Linux bash (shell) scripting in one article Operators help us perform various types of operations such as addition, multiplication etc. There are following types of operators present in bash: Arithmetic, Relational, Boolean, File Test, String Test 1. Arithmetic Operators All the arithmetic operators present in bash are discussed below with examples. These operators work with integers.| Lorbic
– Photo by Iván Rivero from Pexels In this article I’ll be discussing about linux bash scripting (shell scripting) and I will cover every fundamental concept that you need to get started with bash scripting under linux environment. Bash scripting is a critical skill for every programmer. First of all you will need a linux machine to execute these scripts. You can use any of the below techniques to get a linux machine:| Lorbic
If you want to get Linux environment in your Windows system there are some solutions that provide the opportunity. For example MYSYS, CYGWIN and a Virtual Machine (If you want complete linux machine) or Multiple Boot. But some of them aren’t much powerful and some are resources hungry like Virtual Machine. So, the solution is WSL (Windows Subsystem for Linux). You can learn how to setup WSL from here.| Lorbic
Home Index Content| Lorbic
My journey to build my own cloud storage from scratch with nextcloudflare and the lessons I learned along the way| Lorbic