v0.1.3: Results-oriented Thinking

Download v0.1.3 for:

Discuss on HN

The background animation now features a matrix-like effect, and information boxes are partially transparent:

You can track the blur of the text as it falls down behind the newly transparent boxes. This transparency effect currently only works properly on Windows due to issues with WebKit on Linux. (WebKit is the browser engine that Tauri uses for rendering apps on a native platform. I haven’t tested the transparency effects on Mac OS, but given how WebKit rendering there has been buggy in the past, it is unlikely to work on the Mac either.)

More minor changes include adding a shift left/shift right transition effect when navigating between some screens, instead of always doing a “bounce”; using an arrow icon instead of text for the chat send button, to fit in better with the Nasalization font; and separating out the settings and credits buttons to be at the bottom of the side navigation bar. That last change would’ve looked weird with the previous background animation because it would slightly pierce the illusion that the sidebar is actually directly attached to the main content.

It was a bit of a pain in the ass to get the transparency effects fully working. It worked just fine on Firefox, but on Windows, WebKit somehow has a problem with applying the background blur filter within the boundaries of the clip-path. See how the blur is applied even outside of the rounded cut corner here?

Screenshot of blur being applied past the corner on Windows

This problem only arises when a parent HTML element has both border-radius and overflow CSS properties applied. I have somehow managed to stumble on an unholy combination of very specific conditions that brings out this rendering bug on WebKit. (This isn’t the first time I’ve encountered a bug on WebKit, although it appears it differs sufficiently enough from Safari on Mac OS that it perhaps isn’t worth reporting more bugs to the team.)

Even more maddening was that I could reproduce this effect in Chrome, but there it was triggered not by the coincidental presence of both those CSS properties, but instead by something else about the way Storybook renders the iframe. CodePen renders your code in an iframe too, but this effect is not reproducible there. But copy that exact same HTML and CSS into the Storybook iframe, and the buggy effect appears. No seriously, I literally edited the iframe element in the Chrome Web Inspector to just be an HTML document containing the same HTML and CSS that the CodePen contained. All of a sudden, the blur effect bleeds outside of the clip-path again. WTF. Just to test my sanity, I tried setting the HTML and CSS for the entire page to be those contents — and sure enough, problem gone.

I know, it’s just a tiny 18 x 18 pixel triangular region that’s affected. It’s really not even noticeable unless you specifically look for it at the exact moment a character falls into that triangular region. At what point does craftsmanship and attention to detail cross over the line into becoming an obession with perfectionism? But try as I might, I just couldn’t bring myself to be 差不多 on this one. It didn’t sit right with me that the problem was simply lurking there, waiting to be made obvious the moment you adjusted the depth of the cut corner to be something greater. Perhaps most of all, it was the fact that a solution clearly existed, because it is possible for WebKit to properly render the exact result that I wanted in certain circumstances.

So, I split up the overflow-y and border-radius properties across separate parent divs, and sure enough, everything was rendered perfectly — at least on Windows:

Screenshot of blur being fixed with corners

So then I added a screenshot test for this, to make sure that I’m notified about any visual regressions in the future. It turns out that while Firefox (as installed by Playwright) is entirely capable of correctly rendering the blurred transparency effects in headed mode, the Playwright screenshot does not include any blur at all. I ended up using Chromium for the Playwright screenshot. Ah, web development — these browsers sure do enjoy taking turns giving me their own problems to deal with.

The system-installed WebKit on Linux, meanwhile…

Screenshot of wack text shadows on Linux

…generates a weird halo around the text on one machine (caused by the shadow filter somehow being applied to text elements), and didn’t show any blur effects at all on another machine. Oof, that won’t do. So, I added yet another setting to turn off transparency effects by default on non-Windows platforms. Having never really developed for Windows before this, I have been surprised that Windows has naturally become my best-supported platform for running ZAMM on (though still not so much for developing ZAMM on).

The background animation was inspired by the subtle symbol animations in the background of one of the Legend of Zelda screens that Liza showed me. It’s certainly not very professional of me to put such gratuitous animation into what is meant to be productivity software, but to be fair, this software isn’t particularly productive right now anyways despite my best intentions. I have no users, and therefore no one but myself to answer to here — and really, why shouldn’t productivity tools be whimsical at times? I mean, high information density certainly is extremely useful and does form its own aesthetic, as you can see with VS Code:

Screenshot of the professional VS Code program.

But sometimes it feels like this is the only aesthetic available for most coding tools. I’ve been playing a lot of Slay the Spire, Hades, and Mortal Kombat, and I’ve come to really appreciate the various graphical effects these games have, in the gameplay itself but also all around their UI. Of course, productivity and gaming software are optimizing for very different things, but I personally would enjoy my productivity time more if it came with flying sparks.

I get why this isn’t done more. I’m a niche audience: most power users probably don’t care for aesthetics of this sort, and in fact aesthetic choices that decrease information density would even be seen as a net negative by many. It’s almost a no-brainer to avoid doing this for productivity software when you also take into account how UI work takes a non-trivial amount of engineering effort to create: one whole month of addressing UI nits, and I have nothing to show for in terms of added features. Granted, this hasn’t been the most productive month in the first place, what with a week spent on Songkran festivities for Khmer new year, and then another week spent on recovering from that week. Nonetheless, this still represents the opportunity cost of the last month, which could’ve been spent on things more pertinent to enhancing productivity.

That being said, I am allowing myself to shy away from results-oriented thinking when it comes to life in general, and ZAMM in particular. Given how pervasive this is in the parts of society I’ve inhabited, it’s something that I’ve had to unlearn to some degree. To a corporation and its shareholders, good vibes in the office generally don’t mean that much if they don’t result in a strong quarterly report. To some lovers, good vibes in the current romantic relationship won’t mean much if the relationship ends in a break up. In the end, was there anything to show for all those good vibes? I do understand this perspective. If you’re going to be investing your money in a business venture, it does matter that employees are successful at providing goods and services that generate a return on your investment. If you want kids, it does matter that you don’t spend too long looking for a partner so that you avoid fertility issues, or so that you can see your kids grow up before you’re old and infirm.

But this needn’t be the only or even the main perspective that we evaluate life by. Liza mentioned to me recently about how every person’s experience of life is precious just for how unique their lived perspective is. We talk so much about what people did with their lives, about what their lives amounted to, that it seems we don’t really ask what people perceived with their lives. I sometimes look at an old black-and-white photograph, and wonder how it felt to be in that room, in that present moment, when the photograph was taken. I sometimes read about the past, and wonder how it felt to be a regular person living through the turbulent uncertainties of major historical events. I listen to my parents’ stories of the corrupt and crime-infested 60’s and 70’s of Hong Kong, and wonder how it felt to be them growing up in those times. I think about the future, about how the year 2300 is a year that is sure to come to pass, and wonder about how it’ll feel to be someone living out the present moment in what is to me the impossibly distant far future.

But the fascinating thing is that I am currently living out the answer to the questions, “How did it feel to live through the AI revolution of the early 21st century, to live through the political realignment of people in the US and around the world, to live through the days when we were riding high on record-breaking stock market returns offered by neoliberal capitalism, but hadn’t yet been forced to come to terms with the overwhelming consequences of our environmental degradation?” Or perhaps if the questions are posed by my nephews and niece, “What was it like growing up under grandma and grandpa as your parents? What was it like going to school when you were younger, before the cynicism around higher education had formed?” If there is a sense of wonder in how the fleeting present moment felt to those in ages past and future, then there is also a sense of awe that we’re continuously fleshing out the exact answers to such questions in the fleeting present moments of our current lives — even if the questions are never actually asked and the answers never fully articulated.

If what matters are results, then you can zoom all the way out and see that nothing in this universe will make a difference as to how the grand arc of history plays out: Big bang. Heat death. But perhaps “mattering” is but a subjective human emotion sculpted into existence by the harsh chisels of evolution. If you can’t prove that things objectively matter, you can at least zoom back in to find the little moments that do subjectively matter. Take relationships, for example. Liza and I may love each other, but what difference does our love make if in the end, we don’t have a marriage or kids to show for it all? Well, it makes a difference to us in this present moment, and isn’t that enough for it to subjectively matter?

Certainly, if you look at it from a slightly different perspective, the difference it makes in the present moment is part of the consequences/results. We often implicitly define “results” to only be the state of the world after all is said and done, without taking into account the qualia of experiencing the ephemeral in-between states of the world. It reminds me of how some communist dictators supposedly justified repression via appeals to consequentialism: “You can’t make an omelette without breaking eggs,” and how those who find such actions abhorrent then use this as an argument against thinking that “the ends justify the means.” But it seems to me that if you take a more holistic view where “the ends” include the deaths and suffering inflicted by the means, that saying might becomes less of a thought-terminating cliché.

One could argue that the qualia of ephemeral experiences (as opposed to the memory of those experiences) leaves no mark on the world, and therefore don’t count as results. But this brings me to this feeling I have that the present can never be effaced, that once it happens it will always have happened, as if the Akashic records actually exist and its eternal pages are permanently inked with the qualia of experience. (I remembered the concept but forgot the name. A Google search for “supernatural book of all records on reality” returned results on books, but ChatGPT immediately knew about the Akashic records. This is why I believe that LLMs exhibit what we’d call “understanding” when we see it from other humans. Or in short, I believe that LLMs do actually understand some things.)

To go back to the relationship example, nothing that happens to my relationship with Liza in the future — knock on wood — can retroactively invalidate our present love for each other. Regardless of whether our relationship results in a marriage or kids, we will have always loved each other in this present moment. If time travel were possible, it may well alter the final outcomes of our relationship, but even time travel can’t undo the qualia of experiencing love that first time we went through the timeline. And isn’t there a lot to be said for that?

This is of course just one perspective, useful when I want to experience present joy without anxiety for the future. There’s also the opposing perspective of “All’s well that ends well,” which I find useful to bring out when thinking about situations I may have suffered through in the past. It’s an opposing perspective because its inverse is “All’s bad that ends poorly,” and that is exactly the opposite of what I want to feel about joy in the present moment. What? I don’t care if I’m a philosophical hypocrite if it makes life more enjoyable for me.

So, perhaps it’s alright to wean ourselves off from valuing results so heavily, to focus less on surviving and leaving a legacy, to stop fearing death and irrelevance. Adopting such an attitude might well come at a cost to your results, but then again, you wouldn’t mind that so much if you value your results less. A laissez-faire attitude towards survival is perhaps ironically not conducive to its own survival: we are more likely than not descendants of those who cared about their survival, living in a world shaped by institutions founded by those who, by definition, left behind an enduring legacy. And so what if we partake in a way of life that is destined to be limited in its longevity or popularity?

So it is that I find myself here and now, spending my time on a project that frankly appears quite unlikely to make me any income or make a greater impact beyond my personal life, driven only by a vague sense of enjoyment and the intolerability of coding anything else until coding itself can become more automated. These blog posts also receive zero upvotes and zero comments on Hacker News, which I don’t mind because I’m writing them with my regular readership in mind: my future self, and Liza. Will this be a blog post that present Liza and future me would find interesting to read? If so, then I feel compelled to bring it into existence. I think there’s value in articulating my thoughts, in documenting my current life context, and in conveying how it feels to be me doing programming the way I do it — constantly slightly annoyed by the inefficiencies, but ultimately confident in my abilities to get what I want. I suspect that programming as we know it today will soon become a relic of the past, and in case that does become true, I would love to have something to point back to, to be able to say “This was how I personally experienced programming back in the 2010’s and 2020’s.”

Or to quote Gurkin from Sydney White, “People’s Punisher isn’t about being read… it’s about being written!” (It’s surprisingly hard to find the actual quote online, but it’s neat and fitting that it appears on this other quiet blog.)