Top posts

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

Software Engineering
Any year
5043

Prince Of Persia Code Review

On Apr 17, 2012 Jordan Mechner released the source code of Prince of Persia. Even though it is the Apple II version written in 6502 assembly language, it was a pleasant experience to dive in the code of that mythical game: As usual there were many fascinating sofware wizardries to discover. The Apple II apparent poor…

5045

A byte string library for Rust

bstr is a byte string library for Rust and its 1.0 version has just been released ! It provides string oriented operations on arbitrary sequences of bytes, but is most useful when those bytes are UTF-8. In other words, it provides a string type that is UTF-8 by convention , where as Rust’s built-in string types are…

5048

Finding Free Food with Python

If you live in a major city, there’s a good chance you’ve used (or at least heard of) food delivery services like Postmates, GrubHub, or DoorDash. These services are great for times when I’m behind on groceries or when I’m getting some late night studying in before a big midterm or final. The only problem with these…

5056

Java 26 is here

Java 26 is here, and its main purpose seems to be to provide a solid foundation for future things to come. It comes with a few new features, some performance improvements and multiple enhancements that mention Project Valhalla as the inspiration for their existence. This post has all the info!

5057

Uncle Bob and Silver Bullets

A while back I wrote that Robert Martin was ruining software by being too good at programming. That was supposed to be a joke. Since then he’s done his damndest to actually ruin software by telling people they’re doing it wrong. His most recent response where he yells at software correctness was the breaking point for…

5060

How to zero a buffer

Now, we don't want to truly change the observable behaviour of our software — but fortunately the C standard has a more liberal concept of "observable" than most people. In particular, the C standard states that the observable behaviour includes accesses to volatile objects . What is a volatile object, you ask? It is…

5061

How to do distributed locking

As part of the research for my book , I came across an algorithm called Redlock on the Redis website. The algorithm claims to implement fault-tolerant distributed locks (or rather, leases [1]) on top of Redis, and the page asks for feedback from people who are into distributed systems. The algorithm instinctively set…

5064

Remember when people tracked bugs?

I've done some well-known bitching about the halfassed and haphazard way that Open Sores projects have handled their bugs in the past, but man, things have only gotten worse since then. I mean, projects used to actually have bug databases. Boy, those were the days. Failing that, developers used to put their email…

5068

Zig 0.4.0 Released

Zig is a general-purpose programming language designed for robustness , optimality , and maintainability . Zig is aggressively pursuing its goal of overthrowing C as the de facto language for system programming. Zig intends to be so practical that people find themselves using it even if they dislike it.