Blog. Notes from the work.
Running Qwen4-35B-A3B Locally at 256K Context: llama.cpp vs LiteRT-LM
Opening Qwen/Qwen4-35B-A3B on Hugging Face greets you with two numbers that look like a typo: a model named 35B-A3B carries a 57B parameter badge, yet ships with Day-0 local builds claiming up to a 1M-token context window on a laptop.
Your App Returned a 502: Debugging HTTP Status Codes by Who Generated Them
At 02:14 you get paged for a spike in 502 Bad Gateway on POST /checkout. You open the application logs for the checkout pods. Nothing. CPU is flat, memory is flat, zero panics, zero restarts, and every request that actually reached the container returned 200 OK in 18 ms.
Rc vs Arc in Rust: Memory Layout, Send/Sync Bounds, and Atomic Orderings
std::rc::Rc<T> and std::sync::Arc<T> both give a heap-allocated T multiple owners via reference counting, and both hand out only shared references (&T) on dereference. Summarizing them as “Rc for single-threaded code, Arc for multithreaded code” is a useful starting rule, but it skips four details that matter in real Rust code: how the heap allocation is laid out, when Arc<T> actually implements Send and Sync, what atomic memory orderings Arc pays for, and how mutation and reference cycles behave.
MeMo: Memory as a Model — An Alternative to Vector Databases for LLM Knowledge
When an LLM application needs external knowledge, the default architecture is almost always RAG: chunk the documents, compute embeddings, store them in a vector database, and stuff the top-k chunks into the prompt at query time.
7 Caching Patterns Every Backend Engineer Should Know (and Where They Break in Production)
Caching is one of the fastest ways to cut latency and take pressure off a database, yet it is also one of the easiest places to introduce subtle production bugs. Choosing how data enters, updates, and leaves your cache matters just as much as choosing Redis or an in-memory store.
Understanding LRU Cache: Concepts, Use Cases, and a TypeScript Implementation with Bun
Memory is fast, and memory is finite. Every system that caches data in RAM eventually hits the same question: when the cache is full, what do you throw away?
Apache Kafka vs RabbitMQ: When You Need a Log and When You Need a Queue
An order gets paid. Analytics needs to count the sale, the warehouse needs to release the order, and the customer needs a receipt. These requirements sound like three subscribers to the same message until something breaks: analytics needs to replay a week of orders, but nobody wants to email a week’s worth of receipts again.
5 Rate Limiting Algorithms Explained: From Fixed Window to Sliding Window Counter
Rate limiting is one of those backend building blocks that looks trivial on a whiteboard—until traffic spikes, clients retry in lockstep, or a distributed cluster starts double-counting. Every algorithm trades off accuracy, memory, burst handling, and implementation complexity.
Designing a Distributed Rate Limiter: GCRA, Hybrid Coordination, and Production Gotchas
An API key has a limit of 100 requests/min. The gateway passes a load test with one replica. Then you add a second replica, rerun the test, and the same key can make 200 requests/min if traffic is distributed evenly. Nothing is wrong with either counter: the bug is that each replica thinks it owns the whole budget.
Building Type-Safe REST APIs with Axum in Rust
Axum is a web framework for Rust that makes building APIs a pleasure. It’s built on top of Tokio and Tower, giving you excellent performance and composability. In this post, we’ll build a simple but complete REST API for managing a todo list.
React Hooks Deep Dive: Beyond useState and useEffect
Most React developers know useState and useEffect. But React offers several other hooks that can make your code cleaner, faster, and more maintainable. Let’s explore the hooks you might be missing.
React + Axum: Building a Type-Safe Full-Stack Application
What if your frontend and backend could share the same type definitions? No more mismatched API responses. No more runtime surprises. In this post, we’ll build a full-stack application with React and Axum that achieves exactly that.
Understanding Rust Lifetimes: A Beginner's Guide
Lifetimes are one of Rust’s most talked-about features, and they often intimidate newcomers. But once you understand why they exist, they become much less scary. Let’s demystify them.
Beginner's Guide to anyhow and thiserror in Rust
Rust error handling can feel intimidating at first, especially when you want nice error messages without writing a lot of boilerplate. Two crates make this much easier:
Determining if a File is a PDF in Rust
In my work generating BI (Business Intelligence) reports as PDFs with Apache FOP (the Java XSL-FO to PDF engine), I often need to verify that an output file is actually a PDF before further processing. A reliable way to do this is to inspect the file’s “magic bytes” – the fixed signature at the start of the file. Magic bytes (also called file signatures or magic numbers) are small sequences of bytes placed at the beginning of a file to identify its format. Because these signatures are defined by the file format itself and deliberately chosen to be unique, checking them is a fast and reliable way to recognize a PDF (or any file type) regardless of its extension.
An Introduction to the Core Concepts of Kubernetes
Kubernetes is an open-source container orchestration platform that has become the de facto standard for managing containerized applications at scale. Originally developed by Google and now maintained by the Cloud Native Computing Foundation (CNCF), Kubernetes (often abbreviated as “k8s”) provides a robust framework for deploying, scaling, and managing containerized applications across clusters of machines.
Converting Excel Column Names to Numbers in Rust
When working with Excel files programmatically, converting column names (like “A”, “B”, “C”, …, “Z”, “AA”, “AB”, etc.) to their corresponding numeric values (0, 1, 2, …, 25, 26, 27, etc.) is a common task. Rust, with its performance, safety, and expressiveness, is an excellent choice for implementing such functionality.
Utility to save a ton of time in web development
In modern web development, especially when working with utility-first frameworks like Tailwind CSS, managing dynamic class names efficiently is crucial. The cn function, which combines the functionalities of clsx and twMerge, offers a streamlined approach to handle this task.
Database Indexes Explained: Single-Column vs. Multicolumn Indexes
If your database queries feel slow, indexes might be the solution. But with different types of indexes available, how do you choose the right one? In this guide, we’ll break down single-column indexes and multicolumn indexes, show practical examples, and explain when to use each for faster query results.
Easy Steps to Export Schema Without Data from SQLite Database
In the realm of database management, SQLite stands out as a lightweight and efficient solution, especially for small to medium-sized applications. However, when it comes to sharing or migrating the structure of your database, it’s essential to export the schema without including any data. This ensures efficiency and security while maintaining the integrity of your database structure. In this guide, we’ll explore the simple steps to export the schema from an SQLite database without the accompanying data.
Converting JavaScript Date to String in JSON.stringify
As software developers, we frequently need to work with data manipulation, including converting data types from one format to another. One common operation you may often encounter is converting JavaScript Date objects to a String format using the JSON.stringify function. However, you might have noticed that sometimes the conversion doesn’t always produce the results as you expect. In this post, we’ll look into this issue in detail.
Setting Timezone in Alpine-based Docker Image
When creating a Docker image using the Alpine Linux distribution, you may need to set the timezone to match your specific requirements. This is important for accurate timestamps in logs, scheduled tasks, and other time-sensitive operations. In this post, we’ll look at how to set the timezone in an Alpine-based Docker image using the Dockerfile.
Simplifying Docker Compose with .env Files
Docker Compose is a powerful tool for defining and running multi-container Docker applications. It allows developers to specify their application’s services, networks, and volumes in a single docker-compose.yaml file, making it easy to manage complex setups. However, as your project grows, managing environment variables for different services can become cumbersome. This is where the .env file comes to the rescue, providing a cleaner and more organized way to handle configuration.
Understanding JWT: Why the Payload is Decodable and How It Remains Secure
JSON Web Tokens (JWT) have become a widely used mechanism for securely transmitting information between parties, especially in the world of web applications. They’re commonly used for authentication, authorization, and information exchange in stateless environments.
How to Add Google-site-verification to CloudFlare
Google-site-verification is a method of verifying your website with Google. It’s used to prove that you own the domain and have the right to manage it. This verification is essential for accessing various Google services such as Google Search Console and improving your site’s visibility in Google search results.
A Clean Git History: `git pull --rebase` to Prevent Merge Commits
Learn how to use git pull with rebase flag to prevent unnecessary merge commits and keep your Git history neat and linear.
How to Build SQLite3 .lib File on Windows 10
While SQLite provides pre-built binary files for various platforms, there might be situations where you need to build a custom .lib file on Windows 10. In this tutorial, we’ll guide you through the process of building the SQLite3 .lib file step by step.
Setting Up a Custom 404 Page on Nginx
A 404 page is a standard response code in HTTP telling the user, in effect, that they’ve clicked on a broken link. Setting up a custom 404 page on Nginx is a simple and straightforward process.