Topics /
Software Engineering
The most popular blog posts about software engineering on Hacker News. 14,541 posts.
Why CoffeeScript Isn't the Answer
CoffeeScript is an open source project that provides a new syntax for JavaScript. I have to say that I have a lot of respect for CoffeeScript and it got a lot of things right. The “golden rule” of CoffeeScript is “It’s just JavaScript” . That means there is a straightforward equivalent to every line of CoffeeScript…
Frameworks Don't Make Much Sense
Frameworks are one of the hugest anti-patterns in software development. They're hard to learn. They limit your creativity. They increase your project's complexity and dependencies. They go out of business and get abandoned. You have to maintain and upgrade your code to match the latest framework versions for no good...
Caching is an abstraction, not an optimization
I've always been told that caching is a tool to make software faster. That, given some careful considerations to consistency, caching makes it so that when...
Shell Has a Forth-Like Quality
This post takes a short break from ASDL to expand on one of my Hacker News comments.
M4 as a templating language (2020)
m4 is a macro processor, in the sense that it copies its input to the output, expanding macros as it goes
Fibers: An Elegant Windows API
The Windows API — a.k.a. Win32 — is notorious for being clunky, ugly, and lacking good taste. Microsoft has done a pretty commendable job with backwards compatibility, but the trade-off is that the API is filled to the brim with historical cruft. Every hasty, poor design over the decades is carried forward forever…
Lisp Macros, Delayed Evaluation and the Evolution of Smalltalk
At a recent Clojure Berlin Meetup , Veit Heller gave an interesting talk on Macros in Clojure. The meetup was very enjoyable, and the talk...
Mimalloc Cigarette: Losing one week of my life catching a memory leak (Rust)
How do you solve a memory heisenbug?
How to use array reduce for more than just numbers
The array reduce method is really powerful. But people often run into trouble as soon as they step beyond the basic examples. Simple things like addition and multiplication are fine. But as soon as you try it with something more complicated, it breaks. Using it with anything other than numbers starts to get really…
32-bit x86 Position Independent Code – It's That Bad
Let's start by looking at a simple C function to be compiled as position-independent code (i.e. -fPIC , for use in a shared library):
Implement a programming language from scratch
Implementing a programming language is an experience no programmer should go without; the process fosters a deep understanding of computation, and it's fun!
What would it take to add refinement types to Rust?
A few years ago, on a whim, I wrote YAIOUOM. YAOIOUM was a static analyzer for Rust that checked that the code was using units of measures correctly, e.g. a distance in meters is not a distance in centimeters, dividing meters by seconds gave you a value in m / s (aka m * s^-1). YAIOUOM was an example of a refinement…
Past, present, and future of Sorbet type syntax
A discussion of how Sorbet's type syntax came to be, the problems it solves, and how it could improve.
Git add -p
The Pragmatic Programmer advocates you should know your editor inside and out. So why don't you know your version control system just as well? Discover git add "patch mode" and learn how to make more concisely crafted commits leading to a cleaner git history and more friends.
Your code is fast if you're lucky
Recently, while working on an optimized Quicksort implementation, I came across a rather interesting quirk. Modern compilers (especially Clang) optimize loops using fast, branch-free instructions - provided you use the right programming style.
What I learned from my first C coding challenge
Last week at Vimeo we had a challenge. Build a better query string parameter sorter for a Varnish plugin. The gauntlet was thrown down at 5pm on a Friday and by 2am Friday night we had our first contender. I arrived home to see the code and decided to throw my hat into the ring. I had made some attempts at c plugins…
Is This a Branch?
Let’s try a new format – “shorts”; small blog posts where I elaborate on ideas that I’d discuss at my twitter, but they either come back over and over, or the short form doesn’t convey all th…
Adventures in Advent of Code
I’ve been participating regularly in Advent of Code for the past couple of years. It’s one of the highlights of my holiday season. The puzzles are fun, the stories are appropriately ridiculous, and it’s a neat way for me to keep the cobwebs brushed off some of the things I learned years ago that I don’t regularly use…
You're Using JSON, Why not MessagePack?
JSON is a fantastic format, anywhere people in your organization want to reach for XML, it’s always a good thing to ask the question “Why not JSON?”. The question I’d like you to ask the next time you’re reaching for your JSON hammer, is “Why not MessagePack?”.
WebAssembly without the browser
Most WebAssembly tutorials and examples you will find online focus on using it inside the browser in order to accelerate various functionality of a website or web app. However, there is an area where WebAssembly is really powerful but not talked too much about: outside the browser usage scenarios. That is what we’ll…
Bitcoin transaction malleability: looking at the bytes
"Malleability" of Bitcoin transactions has recently become a major issue. This article looks at how transactions are modified, at the byte...
The Perfect Voxel Engine
What is it about voxels that makes people go crazy? Throughout the past decade, there have been SO many developers obsessed with shrinking them down to have as many as possible ( 1 , 2 , 3 , 4 , 5 ), admittedly including myself. It’s exciting both as a developer and to the gaming community to see amazing algorithms…