Nano-Blog : May 4, 2025
Nano-Blog for the week of May 4, 2025.
§ May 6, 2025 ![[QR Code]](IM/qr.png)
-
Greg Comeau's Guide to Understanding Even the Most Complex C Declarations
Many decades ago Greg Comeau published a good article in Microsoft Systems Journal explaining how to read and construct complex C variable and function declarations. It seems to have fallen off the web, so we mirrored it here. C and C++ seem to be having a bit of a renaissance, likely because younger Rust programmers are wondering what older coders were complaining about. It is recommended reading for anyone who needs to read or write C code.
-
Every programmer knows color is a mix of three primary hues: red, green and blue. But that's not true in the strictest sense. Color perception in humans is complex, beautiful and weird.
Several Color Models have been devised to allow humans to reason about different aspects of color perception. RGB is simply a common model we inherited from an earlier generation of engineers. But it's use on the web for the last thirty years has reinforced its place as "the default."
Recent work by web-boffins is starting to give developers a choice, however. This article, Why We Moved from RGB and HSL by Irina Nazarova, describes her use of the OKLCH and OKLAB color models. Definitely read the whole article, but the TLDR is other color models give developers different abstractions when thinking about color. The OKLAB and OKLCH color spaces make it much easier to reason about hues with the same perceived brightness.
Kate Morley's 12-Bit Rainbow Palette gives a good visual example of why this (OK)LCH color spaces are useful. The palette she devised yields a rainbow of colors, but when you put them next to each other, they seem to have similar apparent brightnesses.
Kate's Rainbow Palette is specified using RGB colors for easy integration with older software. We used it in a few experiments and found it useful to name the colors using CSS variables. Here's an fragment from a CSS definition:
§ May 5, 2025 ![[QR Code]](IM/qr.png)
-
The Visual Display of Quantitative Information
We live in a delightful time for "user experience." Though several philosophical and practical issues remain, as a species we seem to keep improving our understanding of cognitive science. One practical aspect of this is our increasing understanding of how to present information to maximize understanding. Granted, we're not always good at it, but there's an intellectual framework we can use to reason about effective communication.
One of the first works to talk explicitly about how to structure graphs, charts and tabular numerical data for maximum comprehension was Edward Tufte's The Visual Display of Quantitative Information. Aimed at the non-specialist, this text gently steps readers through examples of how graphs and tables were used used (or abused). Interspersed are discussions of human cognitive capabilities.
Well worth a read.
§ May 4, 2025 ![[QR Code]](IM/qr.png)
-
Jason Fried relates a great story in his blog post "Give it five minutes" about learning to think instead of react. Many times your initial reactions are correct. But other times they will lead you astray.
Fried's post is short. You can read it in a minute or two. The central conceit is not hard to guess from the title: it's often good to wait a few minutes before offering a critique. One line from Fried's post stands out:
There are two things in this world that take no skill: 1. Spending other people's money and 2. Dismissing an idea.
There is an art to delivering useful critique. Maybe mulling over ideas for a few minutes is the first step into the artful world of discourse.