Best of 2021

The blog posts Hacker News loved most in 2021. 3,497 posts.

Any topic
2447

ANSI escape codes (2019)

My team writes a lot of command line tools, and we like to assume that people aren’t using a literal VT100 (meaning: we liberally use colours, italics, and basically every other terminal feature available to us). This tends to result in strings in our code that look a little like this:

2453

My Personal Creed of Employment

After taking a sabbatical, a time I was very fortunate to spend with my family and children, I was preparing to return to work. As I walked in the park a day before I wrote these thoughts, wanting to capture the perspective I had gained during the recent months. This is a collection of thoughts I had at the time, I…

2459

Decompressing a Gzip File by Hand

2024 Update: Part 2 is out! Let’s make a gzipped file and see what’s in it. We’ll keep it simple: just write 8 ‘a’s to a file. $ echo "aaaaaaaa" > test.out $ xxd test.out 00000000: 6161 6161 6161 6161 0a aaaaaaaa. As we can see, our file is 9 bytes long. We have 8 ‘a’ bytes written, plus a Line Feed (LF) character…