Topics /

Software Engineering

The most popular blog posts about software engineering on Hacker News. 14,541 posts.

Any year
10171

Stability by Design

I think I figured out what’s stressing me out about programming in dynamically typed languages: It’s about always being unsure if using a library in a particular way is going to work and if minor version upgrades aren’t going to break your code.

10174

The -a to -z of Command-Line Options (2003)

Unix tradition encourages the use of command-line switches to control programs, so that options can be specified from scripts. This is especially important for programs that function as pipes or filters. Three conventions for how to distinguish command-line options from ordinary arguments exist; the original Unix…

10175

Using a LLM to compress text

Introduction Large language models are trained on huge datasets of text to learn the relationships and contexts of words within larger documents. These relationships are what allows the model to generate text. Recently I've read concerns about LLMs being trained on copyrighted text and reproducing it. This got me…

10180

How to read Haskell like Python

Have you ever been in the situation where you need to quickly understand what a piece of code in some unfamiliar language does? If the language looks a lot like what you’re comfortable with, you can usually guess what large amounts of the code does; even if you may not be completely familiar how all the language…

10185

The I-JSON Message Format

The Olde ASCII is at rfc7493.txt . I’ll put a nicely-formatted HTML version here as soon as I pull a few pieces together. This is really, really simple stuff and should be about as controversy-free as an RFC can be.

10186

Simpler Backoff

Exponential backoff with jitter is de rigeur for making service calls. This code, or something like it, probably looks really familiar: func do(ctx context.Context) error { const ( maxAttempts = 10 baseDelay = 1 * time.Second maxDelay = 60 * time.Second ) delay := baseDelay for attempt := range maxAttempts { err :=…

10188

The Frink Is Good, the Unit Is Evil

One day Alan Eliasen read a fart joke and got so mad he invented a programming language. 20 years later Frink is one of the best special purpose languages for dealing with units. “But why do we need a language just for dealing with units?” Glad you asked! Intro to Units A unit is the physical property a number…

10189

Running C unit tests with Pytest

In this post I will describe my approach to C unit testing using pytest. In particular, we get to see how to gracefully handle SIGSEGVs and prevent them from stopping the test runner abruptly. Furthermore, we shall try to write tests in a Pythonic way.

10193

Curl those funny IPv4 addresses

Everyone knows that on most systems you can specify IPv4 addresses just 4 decimal numbers separated with periods (dots). Example: 192.168.0.1 Useful when you for example want to ping your local wifi router and similar. "ping 192.168.0.1" Other bases The IPv4 string is usually parsed by the inet_addr() function or at…

10197

Modeling Redux with TLA+

Update 01/07/19 Greetings from 2019! The good news is that Chicago isn’t yet a radioactive crater. The bad news is almost everything I said about refinement in this article is wrong. I’m working on writing a more in-depth, rigorous treatment of refinement as its own article. But this one is currently explaining…

10199

Crafting Interpreters: Classes

One has no right to love or hate anything if one has not acquired a thorough knowledge of its nature. Great love springs from great knowledge of the beloved object, and if you know it but little you will be able to love it only a little or not at all.

10200

A systematic approach to debugging

I've got a reputation at work as being a skilled debugger. It's a frequent occurrence that the weird stuff lands on my desk [1] after it goes through another skilled engineer or two. To say my job is substantially "debug the weird shit" would not be an understatement and I'm here for it.