Exploring APT

As a software developer, I like to really understand the tools I use every day to feel more in control and aware. I’ve been using APT for a long time to handle updates, dependencies, and installations on my Debian-based systems, but I’ve never looked into how it actually works. Learning about things like how it uses GPG keys to check repositories or manages software sources could come in handy for tasks like setting up Docker containers or solving issues with software updates.

read more →

Diving into PHP: the fun of custom extensions


Inspired by a chapter on compiling from source in How Linux Works, I decided to practice a bit by building a PHP extension. Compiling programs from source is a valuable skill, and what better way to practice than by extending everybody’s favourite language, PHP? This post explores creating a simple PHP extension to add a function that wraps a string in a decorative border and experiment with creating a new class.

read more →

Debugging connections with strace and packet analysis

Debugging TCP Connections: Tools and Techniques

This post explores tools and techniques for debugging TCP connection management, focusing on strace, tshark (Wireshark’s CLI counterpart), ss, and comparisons with alternatives like tcpdump and netstat. We’ll analyze single-threaded and multi-threaded servers, as well as a Vert.x-based server-sent events (SSE) setup, to understand TCP behavior, system calls, and packet exchanges. The code and configurations are available in the following repositories:

Tools Overview

strace

strace is a powerful tool for tracing system calls made by a program. It’s invaluable for debugging TCP connections by revealing how a server interacts with the kernel, including socket binding, polling, and data transfer. Its output can be overwhelming without filters, so here are key options for effective use:

read more →

10 Essential Strategies for High-Performance API Design

API Performance Optimizations: Techniques and Insights

Optimizing API performance is critical for delivering fast, scalable, and reliable services. Below I summarize key strategies with practical insights to enhance your API’s efficiency.

Server-Side Caching

Caching reduces server load and accelerates responses by storing frequently accessed data. Cacheability determines which responses can be cached based on their idempotency and freshness. GET requests are typically cacheable, while POST or PUT requests often aren’t due to side effects.

read more →

My Coding Philosophy

Not long ago, someone asked me about my coding philosophy. I mumbled something semi-coherent at that time, but the question stuck with me and got me thinking - what is my coding philosophy? Having a clear credo to guide me through crunch times would be invaluable.
After some soul-searching, I boiled it down to five principles that keep me grounded and productive.

Solve Real Problems

I focus on tackling actual issues - bugs, unmaintainable code, or performance bottlenecks, rather than chasing hypothetical problems. Theoretical debates, like Vim vs. Emacs (Vim, obviously), often waste time when multiple valid solutions exist and personal preference is the deciding factor. By addressing concrete challenges as they arise, I keep progress on track and development rooted in reality.

read more →

Ace Technical Arguments with S.O.F.T.W.A.R.E.

Technical disagreements are a fundamental part of a programmer’s role. Whether debating frameworks, architectures, or the eternal tabs vs. spaces dilemma (spaces, clearly), these discussions can feel like high-stakes battles. However, programming is a collaborative effort - no one owns the codebase unless they’re single-handedly building the next unicorn in their garage. For those craving total control, a side project offers the freedom to code like a visionary artist, chasing bold tech dreams (or nightmares). In a team setting, though, it’s about sharing the sandbox and finding common ground. To navigate these debates effectively, I’ve distilled a practical approach into the S.O.F.T.W.A.R.E. framework, inspired by sales techniques but tailored for technical discussions.

read more →

Rate limiter experiments

What is a Rate Limiter?

A rate limiter is a mechanism designed to control the frequency of requests or actions in a system. It ensures that a service doesn’t get overwhelmed by too many requests in a short period, protecting it from overuse or abuse. Imagine a bucket that holds a limited number of tokens - each request takes one, and if the bucket runs dry, further requests are delayed or denied until it refills. Rate limiters are widely used for:

read more →

The importance of testing in software development

To test or not to test

Testing is the bedrock of solid software development. It’s not just about squashing bugs, it’s about crafting a foundation that keeps your code dependable, maintainable, and a breeze to work with. From my own experience, I’ve noticed not every developer buys into testing. Some rock a YOLO mindset, thriving on the thrill of tossing bugs into the wild and patching them later, rather than building a sturdy base of tested code. Skip the tests, and you’re flirting with a hulking monolith — devs start piling on new code instead of tweaking what’s there, terrified of shattering some vital piece. Left unchecked, this spirals into an untamable dumpster fire. To me, writing tests feels like a no-brainer, yet I keep running into devs who resist the idea. Here’s a rundown of the most common objections I’ve heard:

read more →

Automating Redis cluster setup

Introduction

This post serves as a companion to my repository, which provides an automated setup script for deploying a Redis cluster. Designed to streamline the process of configuring a clustered environment, the script enables users to quickly establish a functional Redis cluster with minimal manual intervention. In this guide, I’ll explain the purpose behind this project, detail the testing process for various configurations, and highlight key Redis capabilities uncovered during development. Additionally, I’ll clarify the differences between standalone and clustered Redis to provide context for when clustering is advantageous.

read more →

Judgement in software development

Judgment in software development is clutch—it’s what separates the code monkeys from the architects. (Grok)

Role of judgement in software development

In software development, judgment is about anticipating more than just today’s requirements—it’s about preparing for tomorrow’s unpredictability. You’re coding not only for current specifications but also for future challenges: will the system scale under load, will it fail unexpectedly, or will it create problems later? This foresight requires balancing intuition with analysis, much like strategizing in a game where the next move isn’t fully visible. Development involves a constant tension between order—such as clean code and design patterns—and chaos, driven by deadlines, bugs, and changing requirements. Judgment provides the balance, guiding you to enforce structure when it’s needed and to tolerate imperfection when time or resources demand it, adapting to uncertainty rather than resisting it.

read more →