Hacker News with Generative AI: Software Design

Layered Design in Go (jerf.org)
This post will describe how I design my programs in Go. I needed this for work, and while I searched for a link, nothing quite fits my coding practices out there. The word “Layered” can pull up some fairly close descriptions, but I want to lay out what I do.
Software crying to have better interfaces (venam.net)
Throughout the countless years of research on this blog a common thread always comes up: Some features and toggles are often hidden under mountains of hubris that nobody understands.
Building the Hundred-Year Web Service (2024) (unplannedobsolescence.com)
My UtahJS talk, “Building the Hundred-Year Web Service”, was put online this week! It’s about how to build software infrastructure that lasts a very long time.
Library patterns: Why frameworks are evil (tomasp.net)
This article is a follow up to my previous blog post about functional library design, but you do not need to read the previous one, because I'll focus on a different topic.
Ask HN: Easiest and hardest concurrency models to use correctly? (ycombinator.com)
There's a lot of options for concurrency. In Python alone, you can use threads with shared memory, threads with queues, processes with queues, concurrent.futures, asyncio, trio, or AnyIO. Java now has a preview of structured concurrency and virtual threads in addition to regular threads. There's also the CSP model of Go, as well as the actor model and supervision trees of Erlang/OTP. Software transactional memory seems to be popular in the purely functional world but rare outside of it.
Multi-threading is always the wrong design (2023) (medium.com)
Say what you want about Node.js. It sucks, a lot. But it was made with one very accurate observation: multithreading sucks even more.
John Ousterhout and Robert Martin Follow-Up to Aposd vs. Clean Code [video] (youtube.com)
The Gang of Four is wrong and you don't understand delegation (2012) (saturnflyer.com)
The Gang of Four got it wrong. Ruby's standard library has it wrong. Rails has it wrong.
Not OK Cupid – A story of poor email address validation (fastmail.com)
I don’t usually like to call out the bad behaviour of specific companies, but the egregious mis-design and lack of acknowledging it justify this case.
Notes on structured concurrency, or: Go statement considered harmful (2018) (vorpus.org)
Every concurrency API needs a way to run code concurrently.
My 10 Commandments of Software Design (Inspired by John Ousterhout) (igbanam.com)
This should not have been a book — for many reasons — could as well have been a bullet list. The summary I have at the end of this article is the whole book. Skip there if you don’t care about my reasoning.
Great software design looks underwhelming (seangoedecke.com)
Years ago I spent a lot of time reviewing coding challenges. The challenge itself was very straightforward - building a CLI tool that hit an API and allowed the user to page through and inspect the data. We allowed any language, so I saw all kinds of approaches1. At one point I came across a challenge I thought was literally perfect.
Clean Code vs. A Philosophy Of Software Design (github.com/johnousterhout)
Subverting Control with Weak References (jlongster.com)
Weak references are neat. The best language features unlock different kinds of abstractions, and weak references do exactly that. Let me show you why.
John Ousterhout and Uncle Bob discuss John's disagreements with Clean Code (github.com/johnousterhout)
Every line is a potential bug (2009) (teamten.com)
Every line of code you write is a potential bug. Do not write any line of code unless you absolutely need it right now and your program will suffer for the lack of it. Do not write routines speculatively. Do not write abstraction layers you don’t need right now. If an optimization will add any complexity whatsoever, even a subtraction, resist it.
Some Programming Language Ideas (davidbos.me)
This post is me writing down some ideas for programming languages or programming language features.
Cargo Cult Programming (wikipedia.org)
Cargo cult programming is a style of computer programming characterized by the ritual inclusion of code or program structures that serve no real purpose.
Open and closed universes (2021) (sunshowers.io)
Type systems are tools for modeling some aspect of reality. Some types need to represent one of several different choices.
Go Data Structures: Interfaces (2009) (swtch.com)
Go's interfaces—static, checked at compile time, dynamic when asked for—are, for me, the most exciting part of Go from a language design point of view. If I could export one feature of Go into other languages, it would be interfaces.
Conway's Law (2022) (martinfowler.com)
Pretty much all the practitioners I favor in Software Architecture are deeply suspicious of any kind of general law in the field. Good software architecture is very context-specific, analyzing trade-offs that resolve differently across a wide range of environments. But if there is one thing they all agree on, it's the importance and power of Conway's Law. Important enough to affect every system I've come across, and powerful enough that you're doomed to defeat if you try to fight it.
Go Is a Well-Designed Language (mattjhall.co.uk)
Go was designed at Google, where Russ Cox, Rob Pike, Ken Thompson and many others were working. Google was using Java and C++ at the time which the designers of Go felt were performant but hard to use. The compilers were slow, tooling was finicky and the languages had been designed at least a decade before. Cloud computing - large numbers of multicore servers working together - was becoming widespread.
Comptime as Configuration (openmymind.net)
If you look at my httpz library, you'll notice that httpz.Server(T) is a generic. The type passed to Server serves two purposes. The first is to support an application-specific context - whatever instance of T passed into Server(T).init gets passed back to your custom HTTP handlers.
Go Is a Well-Designed Language (mattjhall.co.uk)
Go was designed at Google, where Russ Cox, Rob Pike, Ken Thompson and many others were working. Google was using Java and C++ at the time which the designers of Go felt were performant but hard to use. The compilers were slow, tooling was finicky and the languages had been designed at least a decade before. Cloud computing - large numbers of multicore servers working together - was becoming widespread.
Types are a basic tool of software design (2018) (tedinski.com)
One of my pet peeves is when someone makes like they’re going to talk about software design, and then… talks about comments. Or they focus on the details about how functions get written.
Software Design Is Knowledge Building (olano.dev)
ORG relies on an integration service, SaaS, to decouple its business logic from vendor software dealing with billing, analytics, customer management, etc.
Building a Self-Hostable Product (fusionauth.io)
In this article, you’ll learn about the architecture, business model, and software design choices necessary to create a self-hostable developer tool.
Arcan as Operating System Design (2021) (arcan-fe.com)
Arcan is a single-user, user-facing, networked overlay operating system.
Lua is so underrated (bearblog.dev)
The more I learn about Lua's design and implementation, the more impressed I am. It's very rare to see software that does so much with so little code.
Visitor Pattern Considered Pointless – Use Pattern Switches Instead (nipafx.dev)
In modern Java, the visitor pattern is no longer needed. Using sealed types and switches with pattern matching achieves the same goals with less code and less complexity.