Paolo Bietolini

Home | Feed Atom

DDIA: Capitolo 1 — Applicazioni affidabili, scalabili e manutenibili

Questi appunti fanno parte di un progetto di Learn in Public. Ogni settimana leggo e riassumo un capitolo di Designing Data-Intensive Applications di Martin Klepmann. Gli appunti sono presi in inglese e tradotti in Italiano da Claude. Contestualmente al libro sto lavorando ad un progetto di creazione ed ingestion di …

Making hexdump 23 times faster (and what I've learned)

Last month I wrote hexdump from scratch and admitted I didn’t know a good alternative to printf per row. I found it: one fwrite per 64 KiB chunk instead of 128 million calls into stdio, and a 23× speedup, most of it from the part I thought was boring.

Writing hexdump from scratch

Say we want to inspect a corrupted file. To figure out its real type we can check its signature, the first few bytes of the file. On Unix-like systems, the tool for the job is hexdump: a program that shows the hexadecimal content of a file or of a data stream.

Learning C: Conway's Game of Life, Three Times

After reading the rules on Wikipedia, I set out to understand 2D grids. I spent a good hour drawing grids and numbering indices to see how they move across rows and columns. I knew I’d need two nested loops to walk the cells, so I wanted to first understand the foundation of the problem: what the game’s world is made …