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.
Questo è il primo episodio di una serie dedicata a Google Tag Manager. L’obiettivo non è il solito tutorial “clicca qui, poi qui”: voglio spiegare come funziona GTM davvero, sotto l’interfaccia, e demistificare alcune convinzioni che negli anni si sono sedimentate attorno allo strumento. Si parte dal client-side, la …
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.
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 …