Top posts

Every blog post that took off on Hacker News, ranked by the votes of its best submission. 1,748 posts.

Software Engineering
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…

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 ……