👋 welcome to

Phoebe Hong

's website 🏡

Complexity in software engineering

2019-09-22

A Philosophy of software design by John Ousterhout was a beautiful read and I mean to write a more comprehensive review one day. Here is one quick note I want to make after finishing the book, which is about the word complexity. It is a word I hear in software engineering under two different contexts with two different meanings and I have yet to see them discussed in parallel.

First complexity, mostly talked about in analysis of algorithms, is computational complexity. This complexity is perceived by computers and indicates how efficient it is for them to run an algorithm. An algorithm with higher computational complexity requires more resources (namely, time and space).

Second complexity, often talked about in software design as it is in the said book, is cognitive complexity. This complexity is perceived by humans and indicates how efficient it is for them to build a program. A program with higher cognitive complexity is harder to modify and easier to introduce bugs.

These are two separate, important concepts but I do want to complain how we don't talk as much about the latter. This is very true in the commercial software development world that I am in, and it doesn't seem too different in academia according to Ousterhout. Hence my reaction to many book reviews I found online saying "the wisdom this book has is basic, good for undergrads maybe" was lots of 🤔🤔🤔. But let me elaborate on it in a dedicated post.