Top posts
Every blog post that took off on Hacker News, ranked by the votes of its best submission. 14,541 posts.
Refactoring has a price, not refactoring has a cost
We either refactor continuously as we build features -- paying the price. Or we slowly accumulate cruft until our codebase is impossible to change -- paying the cost.
UUIDv7: Timestamps aren’t time-ordered and other oddities
When timestamps aren’t time-ordered and other oddities
Another Week with Bad Software
In the midst of my September job hop I headed to Kazan for the weekend. I don't know exactly why — probably because I could. I had a hotel booked via booking.com, but once I arrived there the receptionist told me it was the first time he's heard of my booking, and he told me that they had no more rooms, and he told me…
Four Months of Zig
It has been about four months since I returned to Zig after being absent for a few years. In this time, I have written some software in Zig and reengaged with the community, online and in person. I decided to share some of that experience, including what I have liked about Zig so far and what I haven't. I'll include…
OOP in C
The art of good programming depends upon the discipline of the programmer, no matter what language is being used. The purpose of object oriented programming (OOP) is to produce well designed reusable code. In principle OOP can be done in any language, even assembly. This is because all OO language compilers/assemblers…
SwiftUI Defaults Considered Harmful
A few notes on SwiftUI and why UI frameworks should not try to be “smart”
How did software get so reliable without proof?
In 1996, the Turing-award-winning computer scientist C.A.R. Hoare wrote a paper with the title How Did Software Get So Reliable Without Proof? In this paper, Hoare grapples with the observation tha…
Using Rust for 'Scripting'
Why I might use Rust instead of Python, with walkthroughs for building a simple
Zig build system
As the popularity of zig cc, more developers may realize Zig is not only a programming language, but also a toolchain to help maintaining C/C++/Zig project. Today I want to discuss one vital part of this toolchain: Zig's build system, build.zig the first non-trivial Zig program for newcomers. Note: This post is based…
Beautiful ideas in programming: generators and continuations
Science, programming, books, and other interesting stuff
Multi-Tenant Architectures
Multi-tenancy Application Deployment Architecture could be modeled in 4 broad ways: Separate Apps & Separate Databases Shared ...
Tricky Programming Concepts Aren’t
What Teachers do Wrong Teachers use subversive language. They say things like “this is a bit tricky” before introducing a concept. It’s in...
AI agent benchmarks are broken
Benchmarks are foundational to evaluating the strengths and limitations of AI systems, guiding both research and industry development.
MMO Architecture: clients, sockets, threads and connection-oriented servers
More on MMO Architecture:- MMO Architecture: Source of truth, Dataflows, I/O bottlenecks and how to solve them- MMO Architecture: Optimizing Server Performance with Lockless Queues- MMO Architectur…
An adventure in trying to optimize math.Atan2 with Go assembly
This is a recount of an adventure where I experimented with some Go assembly coding in trying to optimize the math.Atan2 function.
What causes Ruby memory bloat?
Ruby apps can use a lot of memory. But why? Various people in the community attribute it to memory fragmentation, and provide two “hacky” solutions. Dissatisfied by the current explanations and provided solutions, I set out on a journey to discover the deeper truth and to find better solutions.
Xcode constantly phones home
Building StopTheMadness Pro in Xcode is usually very fast, because my project doesn't use any Swift. It's a combination of Objective-C, which compiles much more quickly than Swift, and JavaScript, which doesn't need to be compiled. However, sometimes the builds were very slow for some strange reason. Checking the…
Common LibreSSL porting mistakes
The other day I wrote an article discussing LibreSSL , and the common mistakes being made by those thinking they know how to port it to oth...
Designing a Lock-free, Wait-free Hash Map
Wait-free algorithms attract vast interest and are an area of intense research, the motivation being that true lock-free algorithms and data structures provide great …
Factorio's Belt Bug
Factorio is a factory-building game involving lots (and I mean, LOTS) of conveyor belts. The code that implements these belts is marvel of optimization, but unfortunately they can't handle every construct.
Resilient Sync for Local First
Resilient sync for local-first apps by using existing technologies such as file systems
The notifier pattern for applications that use Postgres
Maximizing Postgres connection economy by using a single connection per program to receive and distribute all listen/notify notifications.
Rust's unsafe pointer types need an overhaul
I literally wrote the book on unsafe Rust . And the book on pointers in Rust . And redesigned the Rust’s pointer APIs . And designed the standard library’s abstraction for unsafe heap-allocated buffers . And maintain the alternative Vec layout .
Simpler UI Logic With Finite State Machines
A site for cataloging the many technical musing of Andy Desmarais