Skip to content

How a Chip With No Intelligence Runs Your Code

For the longest time I had no idea how a computer works internally. Now I have built one from a single logic gate. Building it revealed that everything at the low level is just a combination of turning a couple of bits from 0 to 1 (and back) and reading or writing to memory. Doing this in a smart way is the real magic and the smart part is the wiring, not the chip. ...

What Assembly Reveals That Your Language Hides

Writing assembly is a pain in the a*s. Why bother? Because it will make you understand what happens behind the scenes when you assign a value to a variable. Once you’ve done that work by hand you will look at your code in a different way. Turns out, everything is just memory. Declaring a Variable Is Just Memory When you declare and initialize a variable it’s one line of code. ...

What an Easy Project Reveals About a Strong Foundation

You struggle through the hard parts. You hit walls and get stuck but then break through. The next project just flows smoothly. Was it too easy or did your hard work finally pay off? In Nand2Tetris Project 3, I built a RAM from scratch and had exactly these thoughts in mind. From Gates to Memory Project 3 was easy because it reuses previously learned patterns. Like the Mux/DMux routing from Project 1 and the same divide-and-conquer approach for scaling up the RAM. ...

How You Can Build a Calculator from a Single Gate

Adding and subtracting numbers is easy. Humans learn it in second grade. Building a machine that does this for you is not. I built the ALU, the calculator piece of my computer, from a single logic gate in Nand2Tetris Project 2. Numbers ≠ Numbers Computers use the binary number system and the translation is widely known already. But how do you actually represent negative numbers? A 4-bit number can represent 16 different numbers. So you just split it equally in half to have 8 positive (0..7) and 8 negative (-1…-8) numbers. ...

Content Transformation: The First Step Most RAG Tutorials Skip

The most important thing to understand when working with LLMs is: If you insert trash, you get trash back. Before you even start to build a RAG system you should think about which kind of documents you want to store in the system and which format the text should have. This decision highly influences how you build your system. What chunking mechanisms you can use, how much information you fit into one document and what technology you can use. ...

How You Can Build a Computer From a Single Gate

Most software engineers can’t explain how their computer works. Me included, I work as a backend developer but know nothing about the internals of my laptop. In modern computer science we have so many layers of abstraction that you don’t need to know what’s underneath. But knowing a thing or two about it will certainly make you a better developer. And you can start by building your own computer from just a single logic gate. ...

Building a multi-tenant RAG pipeline with Postgres. Part 0: Overview

Today I want to start with a series of articles describing my experience building a multi-tenant RAG system powered by Postgres that serves over millions of documents while still delivering end-to-end responses in under 4 seconds (including the latency from AI providers). This article serves as the overview before I will start diving deeper into the several topics in the upcoming weeks. I put a lot of research into most of the steps until I reached a somewhat stable and fast system. I was heavily involved in building this at my company, but I wasn’t the only one and many of the ideas came from working through problems together with the team. In case you are thinking about building a RAG-based system this series could help you make the decisions regarding architecture or provider choice. ...

How to make Claude Code actually follow your rules

Coding Agents are great and fast evolving. I personally use Claude Code on every project. It’s super powerful, but it still needs a lot of handholding, especially when it comes to code consistency. Often times the implementation they are coming up with works properly but the code it produces is not optimal. If you are a person that just wants something that works somehow, then you don’t need to care. But in most professional environments you want the codebase to have some kind of consistency in style and to be easy to maintain. So everyone follows some rules or principles on how certain things should be done. ...