Skip to content

2023

The Primary Objective of Software Design: Minimizing Total Cognitive Load

Over my half-career in software development, I've started to collect some insights (or at least opinions) about how software can be built so that it is easy to maintain, use, and extend. Usually we hear of principles such as modularity, abstraction, loose coupling, and separation of concerns, and each of these is important to strive for. But I've found that behind all of these, there is a single, unifying principle – the reduction of cognitive load. In this post I talk about what I've come to think of as the primary objective of software design: minimizing total cognitive load of all future users and maintainers of your software.

Edvard Munch"s the Scream but setting at a computer, looking at the screen, and typing angrily

Similarity Search for Grouped Content (Teaser)

Vector search has taken the world by storm. The idea is this - cast documents into a vector embedding space via some transformation (e.g. BERT) and then index them into a vector database that is capable of fast approximate nearest neighbors search. Then when the user makes a text query, cast their query into this same embedding space and find the nearest vectors to the query vector and return the corresponding documents.

It occurred to me today while staring at the sky blankly, that this type of search won't work when searching for grouped content. For instance, what if I go onto Reddit, and I'm not really looking for a single reddit page, but I'm looking for an entire subreddit that matches my interests. Here I'm not looking a document, but a group of documents that match my intent.

What's a "Mind Meld Teaser" Post

I realized today that I don't write blog posts most of the time. If you were to look at my private notes, for every blog post that I've published here, I have probaby 10-20 half baked ideas that would be great to write about... but I just don't have time to get around to them. Why not? Well, because frankly, writing a blog post is a time risk. If I determine myself to write a post on some Friday afternoon, it's very possible that I could be signing up for a whole-weekend work task, or even more if it's really a good post. Some good posts require research and creating proofs. All good posts require lots of time for actually crafting the text and refining it. What's more, blogging is a rather lonely task. All this preparation I do alone, and that takes me away from time I could be spending around people – which I much prefer.