Topics /

Software Engineering

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

2023
991

Writing a Debugger from Scratch: Stacks

(New to this series? Consider starting from part 1) At the end of the last post, DbgRs could finally set breakpoints. That was the last really critical feature needed for controlling execution of a program. Now that it can stop on an arbitrary function or code location, the next step is to find more information about…

1002

Higher quality random floats

Much has been written about how to generate random 64-bit integers; people might argue over which particular (CS)PRNG is best suited for a given task, but there is agreement on the general shape of the solution: keep some state around, and then extract 64 bits of randomness at a time, where each bit is equally likely…

1008

NP-complete isn't always hard

A common assumption I see on the ‘net is that NP-complete problems are impossible to solve. I recently read that dependency management in Python is hard because package resolution is NP-complete. This is true in principle, but the reality is more complicated. When we say “NP-complete is hard” we’re talking about…

1009

Solving “Two Sum” in C with a tiny hash table

I came across a question: How does one efficiently solve Two Sum in C? There’s a naive quadratic time solution, but also an amortized linear time solution using a hash table. Without a built-in or standard library hash table, the latter sounds onerous. However, a mask-step-index table , a hash table construction…

1013

How to create portable Linux binaries

Creating application binaries for Linux that run on a wide range of distributions is a bit tricky, as different distributions ship different versions of various system libraries. These are usually backwards compatible, but not forwards compatible, so programs linked against older versions of the libraries also work…

1016

The real “must have” tools for programming

Forget programs. The most important productivity tool for programming is your mind. And the next best set of software development tools are ones that take care of you. It isn’t about Git. Or Docker. Or testing frameworks. These are all useful tools. I use them daily. But they are not the most important software…