Topics /

Software Engineering

The most popular blog posts about software engineering on Hacker News. 1,747 posts.

2025
541

Reverse geocoding is hard

My wife and I run OpenBenches - a crowd-sourced database of nearly 40,000 memorial benches. Every bench is geo-tagged with a latitude and longitude. But how do you go from a string of digits to something human readable? How do I turn -33.755780,150.603769 into "42 Wallaby Way, Sydney, Australia"? Luckily, that's a…

551

Writing simple tab-completions for Bash and Zsh

Shell tab-completions can be very handy, but setting them up is complicated by the fact that half your users would be using Bash-on-Linux, while the other half will be using Zsh-on-OSX, each of which has different tab-completion APIs. Furthermore, most users exploring an unfamiliar CLI tool using tab completion…

555

RFC 9839 and Bad Unicode

Unicode is good. If you’re designing a data structure or protocol that has text fields, they should contain Unicode characters encoded in UTF-8. There’s another question, though: “ Which Unicode characters?” The answer is “Not all of them, please exclude some.”

567

No strcpy either

Some time ago I mentioned that we went through the curl source code and eventually got rid of all strncpy() calls. strncpy() is a weird function with a crappy API. It might not null terminate the destination and it pads the target buffer with zeroes. Quite frankly, most code bases are probably better off completely ……

568

Learning Persian with Anki, ChatGPT and YouTube

I’ve been learning Persian (Farsi) for a while now, and I’m using a bunch of tools for it. The central one is certainly Anki, a spaced repetition app to train memory. I’m creating my own never-ending deck of cards, with different types of content, for different purposes. The most frequent type of cards is grammar…