Every once in a while, somebody gets so frustrated by the modern dynamic linking ecosystem that they suggest just throwing it out entirely and going back to static linking everything. Seriously, the topic comes up occasionally in some very nerdy circles. I was inspired to write this blog post by a recent conversation on Twitter.
So, what’s dynamic linking? Why is it good? Why is it bad? Is it actually bad? What’s static linking, and how did things work before dynamic linking? Why did we mostly abandon it? And… What would static linking look like if we “invented” it today with some lessons learned from the era of dynamic linking? (And no, I am not talking about containers and Docker images when I say modern static linking. This isn’t one of those blog posts where we just treat a container image as morally equivalent to a static linked binary. Though I have some sympathy for that madness given that the modern software stack often feels un-fixable.)
Electron is somewhat controversial as an application development framework. Some people complain that the applications that use it aren’t very efficient. Others say they just use RAM and no sense letting it go to waste. So, which is it? Is the tradeoff of developer time for efficiency worthwhile?
We take it as an article of faith that newer cheaper better faster machines come out every year.
Sure, Moore’s Law doesn’t give the gains it once did. And sure, I am looking at buying a laptop today that has literally the exact same amount of RAM as my 10 year old desktop that seems to finally have died. And sure, modern laptops make RAM upgrades impossible because the RAM is soldered on, so I’ll have the same amount of RAM for the next several years over the lifespan of the laptop. So I’ll have the same amount of RAM in my main computer for somewhere between 10 and fifteen years depending on how long the new laptop lasts.
But faith says I’ll have more RAM over time no matter what!
We all like to think the whole Universe is centered on us. And thanks to relativity and whatnot, the whole observable universe really is centered on the observer! In science, the universe is constantly expanding, and every observer sees themselves as being at the center of that expansion.
You can’t see everything — you can only see a subset of the whole universe. Light doesn’t travel infinitely fast, and the universe isn’t infinitely old. That means you can only see a ting bubble of only about 15 billion light years around yourself. Aliens living in a distant galaxy half way across the universe can likewise only see a 15 billion light year bubble around themselves. And if those aliens are more than 15 billion light years away from us, we can’t see them and they can’t see us.
To clarify that a bit, it’s not just that we can’t see them with our eyeballs or our current telescopes — we can’t have any sort of interaction with them. We can’t ever have had any sort of interaction with them at any point in the past. And the things we are doing today can’t possibly be effected by any sort of interaction with those distant aliens. That is to say, they are beyond a metaphorical horizon, beyond which the events don’t matter to us and can’t be observed by us. Just like how you can’t see stuff below the Earth’s horizon. Hence, an Event Horizon.
So, why am I trying to shoehorn the concept of an Event Horizon into corporate life? When a corporation is small, everybody shares an event horizon. Three engineers wedged into one work room in a startup will hear each other’s conversations. When something breaks, they’ll all know about it. They all observe the exact same bubble in the universe. Their shared universe is small. And they can readily reach consensus about what’s important, what’s broken, and what’s working. They may disagree about what to do next, which Linux distribution or programming language is best, etc. But they exist in a shared universe and a shared understanding of basic facts. That shared universe which can not last forever. And the inevitable collapse of the shared perspective leads to all sorts of trouble that is, by its nature, impossible to observe directly.
(This started as a post many years ago on an old blog. In those days it was fashionable to install every plugin on your self hosted word press instance, and then never update any of it, so naturally that blog needed to get taken down. A colleague reminded me of this in a conversation, so I decided to dig it out of an old MySQL backup since I don’t think anybody else on the Internet was ever bored enough to document this many color wheel widgets in various applications. At some point perhaps I’ll more actively revisit the topic with some screenshots of software from the current decade. At this point the post is mainly interesting for having documented long obsolete color wheels like Shake and “Apple Color” from the old Final Cut Studio.)
Have you ever noticed how many variations there are on color wheels? It’s basically a very simple idea. Different colors go around the edge of a circle. Different saturations go from the edge to the center. Most saturated is at the outermost edge of the circle. Easy, right? Couldn’t be simpler. So you’d think… While making a color adjuster widget for an application recently, I have been pondering them with more attention than I ever thought I would. Here are some well known examples of color wheels and color wheel type adjuster widgets… (Click images to get them full-sized, in all their utilitarian glory.)
This Shake wheel widget is ‘live.’ So, as you adjust the value slider, it will get darker or lighter. If value is set to 0, you will just see a big black square with no wheel in it, which can be counter-intuitive the first time you try to select a color.
For some reason, the wheel in the Nuke color picker uses Shake ordering for the colors, despite the fact that the color wheel node doesn’t. (It’s shown in thumbnail in the DAG view to the right of the color picker window in case you don’t believe me.) The button you click to bring up the color picker has an image on it with the same ordering as the node, despite the fact that this means the wheel on the button doesn’t match the wheel on the window it brings up. Also notable are the radius-circle and vector line in the color wheel pointing out exactly where the current selected color is.
That last one was inspired in part by the visual softness of the FCP wheels with their nonlinear saturation falloff, I am experimenting with a biased cubic falloff for the saturation in my color wheels. This results in a slightly smoother appearance than straight linear falloff, but the biasing prevents the center from being completely blown out, so you can always see what you are doing, even if you zoom in on the widget so you can’t see the fully saturated edges anymore, because you want very fine adjustments. It’s intended for a color adjuster for color correction, rather than a true color picker, so it wasn’t important to me to have the color of the clicked spot map precisely to the resulting color. Also new in this version is that the widget will paint itself with the selected color as the background, giving you a local, live preview as you adjust.
Personally, I think red along +X makes the most sense from a correctness standpoint. In mathematics, we define a unit circle such that this is the direction of zero degrees. In HSV color space, we define zero degrees as red. It seems like a simple, learnable convention. I can’t see why having red in some other direction would specifically be more intuitive or easier for the user, but I’m willing to be proven wrong if somebody has a good argument. Without that, I’ll stick to +X = red for reasons of comfort with the mathematics.
As far as order around the circle, the unit circle in mathematics goes counter clockwise from +X. In optics, we learn the Roy G Biv color ordering according the frequency of colors in the spectrum. Logically, we should match increasing frequency to increasing angle. Consequently, Orange should be next after red as you go counter-clockwise. This is a “green up” or “Shake” orientation. (And contrary to the most recent screenshot I have posted of my own widget. It’s still a work in progress…)
I therefore declare that a Standard Color Wheel ought to be red at +X, and green at top-left. So, why are there so many variations when it seems like there is a correct answer? I dunno. I guess a lot of these color wheels were made pretty much independently by people who weren’t particularly concerned about matching up with some other standard. Some may have intentionally wanted to differentiate themselves from existing color wheels that they had seen just for the sake of novelty. Most of the details are presumably now lost to time.
So, just from the apps that I had handy to check on, there are four different layouts for the colors, and four different saturation calculations for the middle. What do you prefer? Do you know of any other interesting variations on a simple color wheel? Is one or the other more intuitive or functional for you?