Topics /

Software Engineering

The most popular blog posts about software engineering on Hacker News. 21,842 posts.

Any year
16927

A Perl Regular Expression That Matches Prime Numbers

Take a look at this Perl regular expression: perl -lne '(1x$_) =~ /^(11+?)\1+$/ && print "$_ is composite"' This regular expression matches only the composite numbers (and doesn't match prime numbers). Can you figure out how it works? I'll give the explanation below but try to figure it…

16934

Analyzing Spotify Stream History

I recently learned Spotify provides downloads for users’ streaming history. For me, this is over 10 years worth of data, so at the very least it seemed like a good nostalgia trip. This post covers some of my analysis of my personal export, and hopefully is a good starting place if you’re interested in exploring your…

16944

Quake Engine source review

I happily dove into Quake World source code . Here is what I understood, hopefully it will help someone to swim. This article is in four parts : Architecture section Network section Prediction section Rendition section

16945

A Bestiary of Functions for Systems Designers

Whether your game surfaces its numbers to the player or not, odds are it has underlying systems that rely on them, and you use functions to determine how those numbers affect each other. In other words, a mathematical function is usually at the core of the answer to a bunch of frequent game design questions.