Programming Leftovers
-
Thomas Günther ☛ Animate native lazy loading
Native lazy loading is awesome — just add loading="lazy" and you’re done. By default, images appear abruptly once they’re loaded. No transition; it’s just suddenly there. Depending on the file it could even load from top to bottom. My designers hate that. For a long time, I either relied on JavaScript libraries like Lozad.js or tried to explain why animations weren’t worth the overhead.
This never felt right — it’s just a simple animation! Turns out, the solution was quite easy. Not as easy as I’d like it to be, but more on that further down.
-
Vidit Bhargava ☛ Designing Distraction Free Computers
Smartphone addiction is a problem. The modern day computers that enable us to do so much are also a giant source of distraction. With every app seeking our undivided attention, getting things done on a modern day computer is a challenge.
The problem is, apps being addictive isn’t just a one-off phenomenon, with an increasingly saturated market, every app on a smartphone is incentivized to create “addictive user interfaces” that exploit habit forming patterns for their benefit, to maximize engagement on their platform. These addictive interfaces in-turn result in an experience that while provides people with entertainment, it also distracts them when they’re working or studying. Patching it with screen time apps doesn’t really help it, it just applies band-aid to a wound.
-
Lawrence Tratt ☛ Can We Retain the Benefits of Transitive Dependencies Without Undermining Security?
Just as with people, we place a great degree of trust in software, and different pieces of software place a great degree of trust in each other. I trust that, after I log into my bank account, my web browser won’t transfer my money behind my back; my web browser itself trusts an image processing library to decode arbitrary data from the [Internet] without allowing an attacker to take over the computer; and so on.
In this post I’m going to argue that the growth in transitive dependencies in software is the equivalent of jamming our door open and hoping for the best — we are putting too much trust in things we don’t and can’t know in detail. However, I don’t think that the best long-term solution is to avoid transitive dependencies all together — we’re increasing our use of direct and indirect dependencies because it makes us more productive and our software better. Is it possible to get the advantages without the disadvantages?
-
Karl Seguin ☛ In Zig, What's a Writer?
I find Zig's idea of a "writer" confusing. This is probably because there are three different types, each trying to compensate for compromises made by the others. Let's try to understand what each is and how it fits into a bigger whole.