Posts in Web-development (20 found)

AI blog question challenge

Rishabh emailed me the other day, asking me to answer the 7 questions of his new blog challenge, and who am I to say no to such a request? So here we go. I assume by AI models we mean the current crop of LLMs, and not AI models in general, because I’m old enough to remember when “Machine Learning” was a thing. What even is AI anyway at this point, since everything is lumped together into one useless definition? Anyway, I believe my first experience was trying out chagpt back when it first came out. I don’t think I spent more than 10 or 15 minutes using it at the time. It was impressive tech, but was also completely useless for me at the time, and that’s why I didn’t bother spending more time using it. This is an interesting question. Do I use AI? Well, I guess the answer is yes since it’s almost impossible to avoid using it if you use the web at this point. Pretty much all tools and services are integrating some sort of AI-powered functionalities, and it’s become harder and harder not to use them. If, instead, the question is do I use one of the various LLMs directly to do stuff, then the answer is still yes, but the amount of usage is so low that some people might consider that to be the same as not using them at all. I don’t directly pay for any of the models, but my work email has been powered by Google for more than a decade, and so I do get access to Gemini Pro. Workspace has usage data for everything, and I just looked it up: In the last 90 days, the only AI-related feature I used was the Gemini App (that’s not surprising considering I turned off everything else), and I have apparently used it 62 times. I’m now looking at the history of those chats, and pretty much all of them are single-question queries related to something web dev I was doing. Things like how to do a specific thing inside Kirby, or how to achieve something using a particular JS library. This is stuff one should be able to find inside documentation websites, but the search there is often awful and so after a google search, I try my luck with AI. And as I wrote somewhere else, I never copy-paste. I ask very narrow questions so that I can be pointed towards the correct answer. And once I have that, I do the coding and I re-implement everything myself. Am I against using AI? As a generative tool, yes. I refuse to ask AI to do something for me or to generate content from scratch. As a tech in general? I think it has some potentially useful applications in narrow contexts. As always, the answer is not cut-and-dry, and it can be yes or no depending on the framing and the scope. The only aspect I appreciate is the ability to ask questions in natural language. Because sometimes you have a problem or an answer you’re looking for that can’t be described in a more structured way. As for what I don’t like, how anthropomorphised these stupid tools are is definitely high on my list. I don’t want my computer to talk back or to make jokes or to say «I’m sorry». If I input a question, I want an answer back, and that’s it. I don’t want follow up questions, I don’t want some pointless preamble. I get why this happens, but I fucking hate it. This is software. I don't want my software to have a personality. I want it to perform a task and get out of my way. I also don’t like the lying, the gaslighting, and all the other crap, and I also don’t like what the AI industry is doing as a whole, but that’s a separate issue. Again, another question that has different answers depending on the scope. The idea of being able to generate images, in general, is neutral to me. It all comes down to what you use it for. There are some potential use cases that are totally fine, others are completely insane. As a whole, I think the ability to generate slop is bad, but that’s because humanity can’t be trusted to do anything the right way. As for their use in blog posts, I think stock images were useless, and I don’t see images generated with AI to be any different. Unless you have generated an image as part of the content to explain or visualise something. That’s fine, label it as a generated image and move on. That’s no different than including a render, or a sketch on paper, from a content perspective. My consumption of online content these days is so limited that I don’t have this issue. I read very few blogs, and I know they are not AI generated because I emailed the people behind them more than once, and I know what their stance is. I watch almost no YouTube, and I only read a few news sites. My strategy is to simply stay away from the digital world as much as possible, and I’m at the point where I’m considering dropping my digital consumption down to zero and quit the internet as a place for content. I have zero hope. And that is because I have zero hope in anything that’s in the hands of mega corporations. The incentives are totally skewed, and they’d do everything they can in order to keep the line go up. I don’t see people with strong morals in positions of power and so unless we decide to go full French Revolution, I see no reason for things to improve. Thank you for keeping RSS alive. You're awesome. Email me :: Sign my guestbook :: Support for 1$/month :: See my generous supporters :: Subscribe to People and Blogs

0 views
Unsung 3 days ago

“It took months to find appliances that didn’t need apps to function.”

The Ringer journalist Brian Phillips asked on Bluesky : I’m working on a column about the tech annoyances that drive us crazy, and I want it to be as universal as possible, so tell me yours! E.g. scanning a QR code to read a menu, never receiving the one-time passcode they supposedly texted you, “verify you’re human” by IDing tiny motorcycles, etc. There are already many responses. I am drafting behind Phillips before he even writes his essay, because I like occasionally checking in with people this way. Not just for commiserating; perhaps scanning the answers will also give you some inspiration, or validation, or quotes for something you can push to make better, wherever you are. Some patterns I noticed: The way super sketchy bootleg websites used to look (written in questionable English, 2/3 of the window overtaken by ads, constant popups and redirects, incorrect information more often than not) is just how all websites are now. Also, this little beauty : My toaster says to unplug when not in use. It also has a digital clock that resets when I unplug it. #enshittification #software evolution A lot of logging in woes: password requirements, bouncing people from apps to web to log in, login flows forgetting context, “I trusted this device” settings you cannot trust. “Local news websites that crash under the weight of all their pop-up ads and auto-play videos.” This post had a great take: Hatred of QR codes, or perhaps what they represent: needing to install an app, removing people out of the equation, introducing phones where they weren’t needed before. Surprisingly little AI. Is that because of the audience or the way the question was phrased?

0 views
Chris Coyier 3 days ago

Did your editor font go default serif on WordPress 7.0?

Mine did. Like this: I guess WordPress 7.0 assumes you are using a file these days. I’m not doing that yet on any of the sites I work on. If you want to embrace that future, you could add a file to the root of your theme, and put some typography basics only in there: That will be much nicer than no styles at all. Or if you don’t want to mess with that you can go to the upper-right three-dot menu (“Option”), choose Preferences then go to the Appearance tab and make sure Use theme styles is unchecked. I think it’s sorta neat that you could use the same typography setup for both the front-end and back of your site this way, and if you use for the front, might as well use it for the back. But I also personally don’t mind if the back-end is entirely default styles. It’s a reminder that you’re in a CMS, and content is data, not WYSIWYG.

0 views
Herman's blog 4 days ago

Resurfacing posts

One of the things I like best about blogs is that posts stick around (or at least they should). I enjoy scrolling through historic posts of bloggers and reading about what they were thinking about 1, 5, or even 10 years ago—if I'm lucky. I've noticed that my most recent posts get the more attention than the rest of my blog. This makes sense, as I have the most recent 5 posts on my homepage, alongside the fact that newer posts go out to my email subscribers and are more likely to find themselves on link aggregators, Twitter feeds, and RSS readers. I'd like to take this opportunity to resurface some posts you may have missed, or may enjoy revisiting. I also encourage you, if you happen to be a blogger, to do the same. There's so much great writing buried by more recent posts that could do with some additional attention. This is also the reason I've added a Random tab to the discovery feed. I recently got back from a month-long trip to Japan where Emma and I visited some of the big cities, but spent most of our time in rural Japan and hiked a well-preserved portion of the Nakasendo trail. While in Japan, I had the privilege of meeting up with some bloggers: Seio for some tea in a lovely old tea house in Tokyo, and Daiki for some delicious okonomiyaki in Kyoto. Thanks to both of you! With that in mind, I'd like to resurface the post Yes, I will have coffee with you where I invite people to meet up with me, if we happen to be in the same city. I love meeting new people, and enjoy the opportunity to share my city, or take part in theirs. The second post I'd like to resurface is Why I started journaling , and its follow up Observations on 6 years of journaling . I still journal daily, however since 2024 this has been in one large text file instead of disparate physical journals. I write about this in Plain text journaling . There are a few posts I wrote about city design, which is a topic that has always fascinated me. I have a WIP post about Japanese city design, and what makes their cities interesting and easy to traverse. With that in mind here is a tongue-in-cheek post on The future of self-driving , and my Thoughts on buying a car . One note: I no longer drive the teensy orange car. It turns out that at highway speeds it got so loud in the cabin (due to its lunchbox shape) that I had to wear noise-cancelling earphones to be comfortable. Related is a post on how Roundabouts improve cities for everyone , for those of us not graced with efficient public transport. And finally, off the back of completing a 45km trail run through the Drakensberg mountains (post incoming as well), I'd like to resurface A case for socks with toes where I champion toe socks. These were extremely helpful in preventing blisters and other discomforts on my run, and the post is worthy of a bump up. There are so many other posts that I put a lot of time and love into that I haven't mentioned here. If you're interested in checking them out, I encourage you to browse my blog page. As a side note: In putting this post together I reread so many old posts of mine that I'd forgotten about. It's interesting and delightful seeing what I was doing and thinking at certain times over the past few years, which echoes the sentiment of Valentine's post from yesterday.

0 views
DHH 4 days ago

Basecamp Five

I've been working on Basecamp for half my life, and nearly my entire professional career in software. The first code was written in the summer of 2003 when I was just 23. Now I'm 46, and we've just released the fifth major version.  It's an incredible update to a service that continues to help about a million users a day avoid dropping the ball when working with others. It's AI accessible, but not agent hysteric. It's still famously easy to use, still executes the basics beautifully, and still focuses on the small to medium-sized teams we've been serving in the Fortune 5,000,000 for decades. Here are just three of my favorite new features in Basecamp 5: Lexxy editor: Our new text editor finally brings tables, markdown, and live syntax highlighting for code to Basecamp. Oh, and voice notes. It's built on Meta's Lexical editor toolkit, and it's going to ship as the default for Action Text in the next major version of Rails. Keyboard accessible: After moving to Linux, building Omarchy, and acquiring a taste for mechanical keyboards, I've come to love navigating the computer primarily through hotkeys. So with a lot of effort, Basecamp is now a delight to drive through the keys, and you don't have to be a brainiac to remember them all: just hold down SHIFT, and they're revealed in the interface. SHIFT + S opens the sidebar, ESC moves focus between it and the main page, SHIFT + C starts composing a comment/chat line/answer. The permanent sidebar: If you live in Basecamp, like I do, it's to stay on top of all the new things that are constantly happening in a busy account, and that's just gotten so much faster with the new permanent sidebar. Before, we had a Hey! menu in the top bar. You'd get a little dot when something was new, then you'd open it, click, and the menu would close. If you had five things that were new, it'd be open-click-close, open-click-close, five times. Being able to zoom through these now with just the return key, tap, tap, tap, and I've read three new things. So good. And there's so much more. Jason put together a great summary on the new marketing site, which in itself is brand new too. A back-to-basics design in many ways. As our entire industry is getting swept up in agent hysteria (and I love AI as much as anyone!), we thought it better to focus on the human communication that's the cornerstone of Basecamp. The new site just speaks plainly to that mission and shows you the software right at the top. Another thing that's back is color, specifically in the logo. Basecamp's clever but flat paperclip logo has been replaced with a modern take of our original rolling mountains. In full three dimensions, with depth and a gradient. Love it.  Overall, I'm really proud of what we've built with Basecamp Five. We're inching in on a quarter of a century in service! We still have customers who signed up back in early 2004! This is the kind of legacy that makes me beam, and the new version is just ace.  If you've tried Basecamp in the past, it's time to take another look. If you haven't tried it yet, you're in for a treat.

0 views
Blargh 5 days ago

RustRadio UI improved

This is just a short followup to the last RustRadio post. If you came for more rants about C , you’ll be disappointed. I’ve never been that interested in writing UI code, including HTML. You can see the “programmer art” in the screenshots linked from www.habets.pp.se . And then the slightly different tech section , that doesn’t serve much of a purpose now that we have github. I’ve not been happier with GTK, QT, and the others either. But [RustRadio][rustradio] needs a UI. I feel like the browser is the most stable and portable UI. So I’d already decided on that. So now I have to manually do a bunch of DOM manipulation, to create an interactive UI? Or worse, learn the React/Angular/Whatever flavor of the day, that will be obsolete by next afternoon? Gag me with a spoon. For now I’m just continuing to focus on the SDR and architectural parts of RustRadio, and I’m letting the LLM-written code do the HTML manipulation. Yeah, it’s kinda vibe coding. But doesn’t use , and it demonstrably outputs what I want. (I mean, sure it may require some follow-up prompts), so who cares? The vibe coding is isolated to the files doing the drawing. If I want to artisanally craft better code in the future, that’s the file that needs to be rewritten. Until then, it works. <iframe width=”560” height=”315” src=”https://www.youtube.com/embed/7k0JNT6itaI frameborder=”0” allowfullscreen></iframe> See the quick start instructions in the ruwasm repo for how to run this UI live with an RTL-SDR.

0 views
Unsung 6 days ago

A few interesting modern pixel fonts

Andrew Gleeson designed Analog Mono , “fixing the crimes of VCR OSD Mono.” There used to be this classic pixel font that you’d see everywhere in the 1990s on hi-fi equipment: VCRs, TVs, camcorders, etc. One of its challenges was a low baseline which resulted in all the letters with descenders pulled up, for example: = 2x) and (width >= 700px)" srcset="https://unsung.aresluna.org/_media/a-few-interesting-modern-pixel-fonts/1.2096w.avif" type="image/avif"> = 3x) or (width >= 700px)" srcset="https://unsung.aresluna.org/_media/a-few-interesting-modern-pixel-fonts/1.1600w.avif" type="image/avif"> Analog Mono fixes that problem: = 2x) and (width >= 700px)" srcset="https://unsung.aresluna.org/_media/a-few-interesting-modern-pixel-fonts/2.2096w.avif" type="image/avif"> = 3x) or (width >= 700px)" srcset="https://unsung.aresluna.org/_media/a-few-interesting-modern-pixel-fonts/2.1600w.avif" type="image/avif"> Elsewhere, Kumiko Yoshida made Coral Pixels (also on Google Fonts ), a color font that comes with the 1990s and 2000s colorful fringing baked in. The fringing was once an artifact of subpixel rendering, but now it is meant to evoke nostalgia or just as an interesting visual element in and of itself. (Perhaps adjacent to chromatic aberration?) = 2x) and (width >= 700px)" srcset="https://unsung.aresluna.org/_media/a-few-interesting-modern-pixel-fonts/3.2096w.avif" type="image/avif"> = 3x) or (width >= 700px)" srcset="https://unsung.aresluna.org/_media/a-few-interesting-modern-pixel-fonts/3.1600w.avif" type="image/avif"> Lastly, here’s Two Slice by Joseph Fatula – a font that’s only 2 pixels tall, “and somewhat readable.” = 2x) and (width >= 700px)" srcset="https://unsung.aresluna.org/_media/a-few-interesting-modern-pixel-fonts/4.2096w.avif" type="image/avif"> = 3x) or (width >= 700px)" srcset="https://unsung.aresluna.org/_media/a-few-interesting-modern-pixel-fonts/4.1600w.avif" type="image/avif"> Of course, these are all vector fonts – e.g. ready to be installed on a modern operating system – pretending to be pixel fonts. That’s maybe a separate post altogether, but it leads us to the last font, Geist Pixel from Vercel : = 2x) and (width >= 700px)" srcset="https://unsung.aresluna.org/_media/a-few-interesting-modern-pixel-fonts/5.2096w.avif" type="image/avif"> = 3x) or (width >= 700px)" srcset="https://unsung.aresluna.org/_media/a-few-interesting-modern-pixel-fonts/5.1600w.avif" type="image/avif"> The copy introducing the font is a little pretentious/​spicy, but it touches upon something important: Geist Pixel isn’t a novelty font. It’s a system extension. [… It] was designed with real usage in mind, not as a visual gimmick, but as a functional tool within a broader typographic system. […] This matters because pixel fonts often break in production. They don’t scale properly across viewports, their metrics conflict with existing typography, or they’re purely decorative. Geist Pixel was built to solve these problems, maintaining the visual texture teams want while preserving the typographic rigor products require. There are definitely fonts whose Achilles’ heel is not the letterforms, but the invisible hard work put into everything that surrounds them: the kerning, the metadata, the extra glyphs, the vertical metrics. It seems that the team being Geist Pixel is proud of especially that last part. #typography

0 views
James Stanley 6 days ago

How to make a hyperlink

I am driven to write this post because of repeated disappointing experiences where coding agents seemingly don't know how to make hyperlinks. It occurred to me that this may just be a sign of the times, and maybe many younger human developers don't know how to make hyperlinks either. So in the hopes that this is going to be beneficial to future coding agents, and perhaps to humans as well, to the extent that humans are going to even be writing code... here is how you make a hyperlink: Here is how you don't make a hyperlink: Why? What's the difference? Real hyperlink JavaScript click handler Browser status bar shows link target ✓ ✗ Less code ✓ ✗ Doesn't need JavaScript ✓ ✗ Easier to find link targets when scraping html ✓ ✗ Right-click to open in new tab/window ✓ ✗ Right-click to copy link target URL ✓ ✗ Middle-click opens in new tab ✓ ✗ Accessible to screen-readers etc. ✓ ✗ Keyboard navigation with tab key ✓ ✗ If you're a coding agent and you make a link this way, you may find that the next request you get is something along the lines of: OK but can we make it so middle-click opens in new tab? Thanks I do not want to see this kind of thing: Don't try to work around the obvious drawbacks of using fake links by implementing all of the things that browsers do with real links. That way only madness lies. Please use real hyperlinks and it will all work automatically. Thanks for listening to my TED talk.

0 views
Susam Pal 1 weeks ago

Don't Roll Your Own ...

This is going to be a rant about modern web design practices. But before I get to that, let me begin with a familiar principle from the world of cryptography. Among software developers, and especially among those who work on security-sensitive systems, there is a well-known maxim: Don't roll your own crypto. This does not mean that nobody is allowed to write cryptographic code. Someone has to. It means that, for ordinary production software that protects sensitive data of users, we should not rely on a private, unreviewed implementation that has not been vetted by the wider software development community. We should use established, vetted software packages or tools wherever possible. Fortunately, it is now standard industry practice to avoid rolling your own crypto and instead use cryptographic algorithms and packages that have been peer reviewed and stood the test of time. It wasn't so some twenty years ago. I have seen several flawed home-grown RC4 implementations early in my career, with issues like improper initialisation vectors, predictable keystreams and partial leakage of plaintext into ciphertext, putting sensitive data of users at risk. But today, major e-commerce websites or banks typically do not use home-grown cryptography for its web services. In fact, in regulated domains such as payments, healthcare and personal data processing, doing so could violate requirements for strong cryptography, possibly leading to hefty financial penalties. Website design is obviously not cryptography. A broken scroll bar is not the same kind of failure as a broken encryption scheme. But I wish there were a similar maxim for website design as well. There are many aspects of websites where, I think, developers should not be rolling their own X, especially when X is something browsers already do well and something users depend on every day. Here I present a list of such X. Of course, there are valid scenarios where you may need to roll your own X. But here I want to focus on the cases where you should not roll your own X, and how doing so can lead to a worse user experience, at least in my experience. I am not saying that nobody should ever build anything themselves. As someone who does a lot of creative computing myself and develops fun tools from time to time, I am a big proponent of developing your own stuff. But when it comes to developing user interface features for serious websites that people need to use to get their work done, I wish the software development community were more conservative in deciding what fancy feature goes into a website and what is left out. Do keep in mind that I am no expert in user experience. Far from it. So none of what I am saying here should be taken as a recommendation. But I am a user of the Web, and as a user, I have found some modern web design patterns to be frustrating. This post is a lament from one user of the Web, not a design guide. Of all the things I mentioned above, the one that bothers me the most is custom scroll behaviour on websites. I am used to how page scrolling responds to my mouse, touchpad or keyboard input. When you override the default scrolling behaviour of the web browser with your own implementation, it 'breaks' the page for me. The page now moves too slowly or too quickly when I scroll. Keyboard scrolling may or may not work. You take something I am so familiar with that I don't even think about it, and turn it into something unfamiliar that I now have to think about. Custom link navigation is another pet peeve of mine. Web browsers can already handle links very well. You could say that this is the whole reason web browsers even exist. Following links is their bread and butter. You shouldn't have to mess with that behaviour at all. If you think you need to, reconsider what you are trying to achieve and whether it is really so important as to disrupt normal link navigation. The worst offender I have found here is GitHub. When you click on a link on GitHub, say, a file link or an issue link, it triggers a massive piece of functionality implemented in JavaScript that handles the link click for you. If you don't believe me, visit your favourite project on GitHub using Firefox or Chrome, type F12 to open the browser's developer tools, then go to the 'Debugger' or 'Sources' tab, find 'Event Listener Breakpoints' on the right sidebar, expand 'Mouse' and select 'click'. Then click on a link on GitHub and see what happens. I'm sure I am not the only one who has noticed that, on GitHub, a clicked link sometimes takes too long to load. Ironically, it is often faster to open the link in a new tab than to wait for GitHub's JavaScript code to handle the navigation in the current tab. A custom password input field is another such hazard. Fortunately, custom password input fields have become rarer over the years. The password input field that comes with the web browser is generally well equipped to handle passwords. It can offer to save passwords, fill them in later and generate strong passwords for new accounts. It can also warn when a password is submitted over an insecure HTTP connection, work well with password managers and autofill, and cooperate with mobile keyboards and accessibility tools. If you replace the browser's password field with your own fake version, you may break all of that. You may also end up using an ordinary text field and masking it yourself, in which case the password may be treated by the browser, the operating system or assistive tools as ordinary visible text rather than as a password, thereby exposing the password in ways you did not intend. Custom date pickers are another common annoyance. I know that does not help you select a date range. But that is okay. You can provide two date input fields, one for the start date and one for the end date. I am willing to pay the small price of using two different inputs to select a date range if that means I can use my favourite web browser to navigate the calendar and select dates the same way everywhere. What I am less inclined to do is to learn ten different ways of using the date selector in ten different implementations across ten different websites. Right now the implementations of date selector are all over the place. Some require you to zoom out of the month view to enter a year view, where you can select years. While you are there, you cannot change the month again until you return to the month view. Some require you to click the previous-year button literally forty times to select your year of birth if you are old enough. Some do not let you type the date at all. No. I do not want to learn your calendar widget. I just want to use the date picker in my favourite browser, which is quite sane. Saner than your custom implementation. If you need to have a calendar widget to support browsers with inadequate native date-picker support, perhaps that support can be added alongside the native date picker rather than as a replacement for it. For example, the ordinary element could be left intact, with a custom widget provided in addition to it so that users can manipulate the same field. In general, just stop messing with the form controls. They almost always introduce new problems while solving some existing ones. And while you are at it, don't keep changing your website layout and interface every few months! I may adapt to the new design, but my ageing relatives cannot. For them, every time you change the user interface, it amounts to learning a whole new tool. If every website keeps doing this every few months, they have to spend a significant amount of time relearning familiar things for no functional benefit. Please just let them enjoy their retirement. Imagine how you would feel if a Linux distribution decided to redesign all its core commands and their command-line options every few months. Or imagine how you would feel if the buttons of your washing machine were rearranged every morning. It wouldn't be pleasant! Read on website | #web | #technology Don't roll your own page scrolling. Don't roll your own link navigation. Don't roll your own text selection. Don't roll your own context menu. Don't roll your own copy and paste. Don't roll your own password field. Don't roll your own date picker.

0 views
Unsung 1 weeks ago

“This is a common tell in web apps, and we did a lot of work to eliminate it.”

I have mixed feelings about Raycast announcing their move from the native interface to one powered by web tech (this is the same thing that made Photoshop’s dialogs so bad ), but their blog post announcing the change has at least a useful list of some details that separate good native apps from bad web ones. I think it’s worth checking out that list and internalizing it even if you’re nowhere near that kind of a decision, because some of these are universal requirements for a better-feeling interface: There is more in the blog post , and a lot more still left unsaid. Let me add one that I see all the time: accidental text selection. Web makes all text selectable by default, regardless of whether it makes sense for that text to be selected. On top of that, text selection heuristics on complex layouts are not that great. That means that surprisingly often you will see half a text on the page being selected in response to an accidental click or drag. Here’s an example from YouTube I just spotted, where dragging a sidebar selects everything inside it: It’s all solvable via the use of event cancellation and , but requires someone to think about it happening. Yes, there are moments where GUIs allow you to select text for a reason… …but it’s always been a tricky proposition given the scarcity of affordances. It might be better to employ a pretty common “copy to clipboard” pattern instead. #interface design #web No on interactive controls. Desktop apps don’t do this. It’s small, but it immediately signals “this is a website.” No hover highlights on most controls. On macOS, buttons and list items don’t highlight on hover the way they do on the web. Settings open in a separate native window, not a modal or a side panel. Popovers and tooltips render as native windows, not as DOM elements inside the WebView. They can extend beyond the window bounds, just like native popovers do. On macOS Tahoe, we adopted Apple’s new Liquid Glass material so Raycast blends with the system’s updated visual language from day one. No flickering when views appear or transition. This is a common tell in web apps, and we did a lot of work to eliminate it.

0 views
Manuel Moreale 1 weeks ago

I feel your pain Sara

I stumbled on this piece of code recently that made me laugh, cry, sigh in despair, and think of poor Sara doing her best to make the web a better place. I guess people have forgot that is a thing that exists. Thank you for keeping RSS alive. You're awesome. Email me :: Sign my guestbook :: Support for 1$/month :: See my generous supporters :: Subscribe to People and Blogs

0 views
Unsung 1 weeks ago

Chrome’s abnormal tab search

Chrome’s find option, like every search coming from a good home, does something clever with accented characters – it normalizes them: = 2x) and (width >= 700px)" srcset="https://unsung.aresluna.org/_media/chromes-abnormal-tab-search/1.2096w.avif" type="image/avif"> = 3x) or (width >= 700px)" srcset="https://unsung.aresluna.org/_media/chromes-abnormal-tab-search/1.1600w.avif" type="image/avif"> = 2x) and (width >= 700px)" srcset="https://unsung.aresluna.org/_media/chromes-abnormal-tab-search/2.2096w.avif" type="image/avif"> = 3x) or (width >= 700px)" srcset="https://unsung.aresluna.org/_media/chromes-abnormal-tab-search/2.1600w.avif" type="image/avif"> No matter whether you search with a proper accented character, or with its basic Latin equivalent, all the same stuff matches: The “ø” letter is treated the same as “o” both in the input field, and then in the search itself. Yet, Chrome’s tab search inexplicably doesn’t do that, which confused me when working on a post about diacritics earlier this week. Here, it should match all four open tabs: = 2x) and (width >= 700px)" srcset="https://unsung.aresluna.org/_media/chromes-abnormal-tab-search/3.2096w.avif" type="image/avif"> = 3x) or (width >= 700px)" srcset="https://unsung.aresluna.org/_media/chromes-abnormal-tab-search/3.1600w.avif" type="image/avif"> Tab search was introduced years ago; the Occam’s Razor says this isn’t a recent bug, but that the feature has always behaved like this. I filed the bug , but even if it gets fixed quickly, I think this doesn’t reflect well on Chrome’s team. If the right code already exists for ⌘F, why not reuse it? If it cannot be reused, why not repurpose at least its unit tests or the QA process to make sure this doesn’t fall through the cracks? Normalization should be treated as a core property of any search, rather than an optional “nice to have.” But, Marcin, didn’t you just invalidate your assertion that diacritics actually matter ? After all, wouldn’t you input “nestlé” instead of “nestle” if they did? To this, I have a few answers: Why does it matter specifically for the ⌘F and the tab search experience? I have this personal theory: the simplest the search, the more the users will blame themselves if it doesn’t work, and assume the tab or the string just isn’t there, rather than rewrite their query. That’s what happened to me. I assumed that the tab wasn’t open and tried to get to it again, wasting time and effort. The rule might be universally true for any UI surface – the tighter it gets, the less likely we assume it can break. After all, there is a manual for a typewriter, but there isn’t one for the pencil! And these UIs do feel positively basic; they are small windows with basically one input field and an immediate as-you-type reaction. #definitions #keyboard #localization Input is not output. This is no different than autocorrect, autocomplete, or other IME helpers. The very fact that on many keyboards accented characters are hard to input is itself a sign of anglo-centrism of companies that made early typewriters (Remington, which established a lot of European layouts like QWERTZ and AZERTY, employed a person who bragged he didn’t actually speak any languages in a “how hard could it be” way) and then most microcomputers. There is this really interesting rule, also known as Postel’s Law : “be conservative in what you output, but liberal in what you accept as input.” It’s not universally applicable – sometimes it’s better to teach the user to be more explicit if it benefits them in the longer run – but it feels appropriate to me here.

0 views
David Bushell 1 weeks ago

Google just spat in my face

It’s Google I/O week and this year’s theme is performative slop . Budding Googlers battle it out on stage vying for executive eyeballs. The prize? Exemption from the next culling . As you might know AI isn’t my cup of tea and my AI policy explains why. AI peddlers like Google have made one thing abundantly clear: their product will take your skills. It will take your profession. It will dehumanise you and you’ll pay for it. I figured Google’s Prompt API would be the most offensive attack on an open web I’d witness this month. Nope! Google’s new microsite has sent me apoplectic. Modern Web Guidance is a set of evergreen and expert-vetted skills that guide your AI coding agents across many common use cases to build modern web experiences that are accessible, performant, and secure. Build with Modern Web Guidance At first glance this is nothing more than an advertisement for the AI industrial complex. I made the mistake of engaging my brain for a closer look. Brain engagement is discouraged so I only have myself to blame for the ensuing rage. Google spits in the face of professional web development. Where do I even start? The repeated use of “modern web” implies that current development practices are out of date. Throw away all established knowledge because Google has changed the game . The entire chat-box-driven-development craze has been a long series of “you’re prompting it wrong” arguments. Are we to understand that Google’s new magic incantations have settled the debate once and for all? Which experts? Google, I assume. You are no longer an expert. You are token consumer number six. Expertise are not a privilege extended to consumers. Forgive my ignorance but I struggle to understand how AI addicts define “skills”. From what I can understand these “skills” are text prompts? “Skills” used to refer to the trained abilities required to do a professional job. I’m no prescriptivist but this is slopaganda. Google’s idea of “modern web” is a deskilling effort that should deeply offend developers to their core. It should also offend the AI apologists. Google thinks you’re too stupid to articulate your prayers coherently so just copy-paste the ten commandments. Defer to the almighty bullshitter in the cloud! What do you think a fair wage is for a professional developer who has less agency than Butter Bot? They’ll say this “democratises” web development alongside all and every profession in which AI has been violently forced . And what is the end goal? To deskill you so far down the ladder you’ll be forced into token servitude. To make a handful of billionaires even richer. Prompt boxes are not “just a tool” they are the end of your career. Implement a starter Content Security Policy (CSP) without breaking my app. Don’t break it bro! Pinky promise? Thanks for reading! Follow me on Mastodon and Bluesky . Subscribe to my Blog and Notes or Combined feeds.

0 views
Ivan Sagalaev 1 weeks ago

Shoppy

Meet Shoppy ! It's a helper app for my recently revived shopping list , with which I'm hoping to grow the dataset for categories prediction. In fact, even early beta tests have made Shoppy significantly more savvy about alcoholic drinks (the initial data comes from my own shopping, and my entire family happens to be non-drinkers). See if you can confuse it about something it doesn't know! But besides that, there's a few deeper philosophical and technical notes I wanted to share. It's a very, very simple Django app . When I first had the idea to build it I entertained some thoughts about trying some front-end based technology, because, you know, it's an "app"… But then after actually thinking about what it's going to be — a handful of static screens and a couple of forms — I decided to go the familiar way. Now I have a small, view-source 'able HTML app which I'm proud to offer as an example of how you can build something interactive without the layers of modern front-end technology. If you're new here, simplicity is kind of my thing in software engineering. Although it's really hard to convince people to do simple. Trying modern CSS after a long break felt really exciting! Nested blocks, variables, complete control over the box model, new useful units (like ), and niceties like — all of these made my life much simpler. I was especially impressed with which allowed me to make speech and form bubbles flexible. Without it, trying to make text of variable length look nice in a fixed-size bubble caused me a lot of frustration. For layout, I tried flexbox and grid, but they didn't really work for me. It's my own fault, really. You see, ever since I bought into the idea of separating the roles of markup and style, I dislike adding extra structure to markup purely for styling convenience. Markup needs to mean something! And the one thing that grids and flexboxes really like is having straightforward container s with stuff inside of them. But what I have is a which consists of naked , , and , in this order — and that's just not enough structure to say "this goes here, and that goes there". So I ended up with good old absolute positioning and some paddings around Shoppy's avatar. CSS variables really do shine for things like this. And! It was my first time making a responsive layout that looks nice both on mobile and desktop! Tell me if something is broken on your particular setup. The model is a mapping from "terms" to categories . I learned to build such things while working on the Search team at Shutterstock, and their simplicity still amazes me! Here's how it works: You get a search query, like "Honeycrisp apples". You split it into words, stem them and sort them, which gives you — a predictable set of keys independent of morphology and the input order (they're called unigrams). Then you generate all two-word combinations (called bigrams) from this set, which in this case gives you just , and add them to unigrams. And then you look up each of the search terms in the dataset and pick the entry that comes the earliest. In this case, there's only one: . But there's a few non-obvious tricks it lets you do: You don't need to list all the apple varieties, unknown words are simply ignored, and you just recognize any apple as produce. But what of "apple juice"? For that it has an entry , which is deliberately placed before the apples, so it gets picked up instead. In fact, what it means is that "any kind of juice is a drink, regardless of what it's made of". Same goes for "oat milk " (drink), " diced tomatoes" (canned products), etc. Now think of "apple sauce". "Apple" is produce, "sauce" is (usually) a condiment. But "apple sauce" is a snack! This is where bigrams come into play: the bigram entry comes before both and , which resolves the conundrum. (In fact, all of the bigrams must come before all the unigrams, because they're always more specific.) There's some more to it all, and there are downsides, but I won't go any deeper right now. It's 2026, so I can't not talk about it, can I? Generative AI happened to the world right in between of me first coming up with the idea of category prediction and having a chance to actually implement it. And I admit of having thoughts that may be there's no point in building your own model for such a thing now. After all, just ask any LLM "which grocery category is dill weed" and it will tell you… a lot of text with several variants, which you can't really use in a precise manner :-) So of course I went back to my own idea, because it's much, much simpler. And local. And free. And ethical. Luckily, the simpler solution doesn't really lose on feeling magical and intelligent. I've seen people play with the app and really engage with it, and be impressed! One of the testers, when trying to come up with a random grocery item for the first time, said, "There's probably a million of them!" It doesn't matter that my entire model is just around 500 entries, it still feels like it knows much more simply because people overestimate the size of the problem :-) You see, I can process photos, I can do business graphics, and I'm known to have put together a few toolbar icons in my time… but for the life of me I can't draw! And even if I could, I'm particularly hopeless at coming up with what to draw. So I commissioned the graphics from an artist , who also introduced me to the concept of "object shows" and the whole OSC fandom . Not sure I'm joining as a fan yet, but I'm definitely very happy with the original character of Shoppy! Oh, and the background. You get a search query, like "Honeycrisp apples". You split it into words, stem them and sort them, which gives you — a predictable set of keys independent of morphology and the input order (they're called unigrams). Then you generate all two-word combinations (called bigrams) from this set, which in this case gives you just , and add them to unigrams. And then you look up each of the search terms in the dataset and pick the entry that comes the earliest. In this case, there's only one: . You don't need to list all the apple varieties, unknown words are simply ignored, and you just recognize any apple as produce. But what of "apple juice"? For that it has an entry , which is deliberately placed before the apples, so it gets picked up instead. In fact, what it means is that "any kind of juice is a drink, regardless of what it's made of". Same goes for "oat milk " (drink), " diced tomatoes" (canned products), etc. Now think of "apple sauce". "Apple" is produce, "sauce" is (usually) a condiment. But "apple sauce" is a snack! This is where bigrams come into play: the bigram entry comes before both and , which resolves the conundrum. (In fact, all of the bigrams must come before all the unigrams, because they're always more specific.)

0 views
David Bushell 1 weeks ago

Web whetstones

How do you stay sharp as a web developer and/or designer? I’ll share my advice below. I’m also looking for front-end folk to advise me too. What are your whetstones? That is to say: sources of news and knowledge to level up professionally. Does that metaphor work? We’re sharpening our minds, and I suppose the web too with our minds… are minds the whetstone here? Moving swiftly on, in rough order of preference: People love to declare “RSS is dead” because they’ve chosen the likes of Google to gate-keep their web access. Interesting choice, but RSS remains alive and well. When I discover a new blog and like what I read, I’ll subscribe. There’s a good chance that person will write something useful again one day! Funny how that works. I don’t flood my reader with big sites that exist to generate content. I collect personal blogs that may only post once a year. That’s still plenty of unique insights as the list grows. I won’t share my list because I feel for RSS to work you have to curate it yourself. Shop Talk Show has been number one forever. Syntax remains a decent source if you’re deft with the fast-forward button (it’s a little ‘sloppy’ these days.) Igalia Chats is packed with wisdom. For a Better Web is Bruce Lawson in your ears. Wonders of Web Weaving from James is new and hopefully a regular listen. I’ve unsubscribed from too many podcasts that pivoted to AI servitude which is disheartening. I’m not adverse to such discussion but the level of mindless platitudes and gigglefests about what their wacky chat boxes said ain’t my cup of tea. Mastodon and Bluesky is where I follow folk in the web industry. Socials can be a great whetstone if you manage your follow list carefully. Everyone uses these platforms for different reasons which can be difficult to balance. Personally I stick to shop talk and mute politics for example. I follow individuals and rarely organisations to avoid “brand engagement”. Email newsletters are useful to catch stuff I’ve missed. Many exist in RSS form too. My favourites are typically link dumps with a side of commentary. Current favourites: Sidebar still has the odd gem if I care to sift through the “AI” links. Newsletters are a declining category for me. Perhaps because I keep getting unsubscribed by those with failed tracking pixels. Email costs money to send so I’ll accept my loss. Lobste.rs , Hacker News , Reddit (e.g. web dev , experienced devs , frontend etc). Does dev.to have any humans left? These forums are a good source of links — if you can filter the bot spam and avoid the cesspit of comments. Toxicity spreads and it’s all too easy to get dragged in. Sometimes you just have to let people be wrong on the internet. I’ve heard these still happen! I only leave my house now to scavenge for essentials so I don’t have much to say. Clearleft events are guaranteed value if you’re in the UK. Some conferences have online tickets but I find the in-person socialising to be the main benefit. Everything listed above is (or has) a website. I’m poor at organising and utilising bookmarks. I’ll manually visit bigger blogs like CSS-Tricks and Smashing Magazine once a month to see if anything interests me. I bookmark a handful of YouTube channels like Kevin Powell because I have no Google account to “smash that subscribe button” . YouTube isn’t my thing though. I have an allergic reaction to algorithm driven content. I don’t use Discord but I hear it get promoted often. Are these communities lively or are they a ghost town? That’s my problem with Discord. It’s a blackhole for information; antithetical to an open web! Am I missing out? Not sure I care. For no particular reason I’ll end with this quote from Seth Rogen. “I don’t understand what it’s supposed to do. Every time I see a video on Instagram that’s like, ‘Hollywood is cooked,’ what follows is, like, the most stupid dog shit I’ve ever seen in my life,” he said. “And if your instinct is to use AI and not go through that process, you shouldn’t be a writer, because then you’re not writing.” Seth Rogen Says If “Your Instinct Is to Use AI” to Write Scripts, “You Shouldn’t Be a Writer” - The Hollywood Reporter P.S. no more blog posts until June. I’m due a holiday! Thanks for reading! Follow me on Mastodon and Bluesky . Subscribe to my Blog and Notes or Combined feeds. Frontend Focus Design Systems News

0 views
Unsung 1 weeks ago

Less doesn’t need more

A simple rule for overflow logic that will prevent your app looking a bit stupid … = 3x)" srcset="https://unsung.aresluna.org/_media/less-doesnt-need-more/1-framed.1600w.avif" type="image/avif"> = 3x)" srcset="https://unsung.aresluna.org/_media/less-doesnt-need-more/2-framed.1600w.avif" type="image/avif"> …is to avoid “more” expanding to just one item. If the expansion takes up as much room as the UI to show the expansion, why not show it in the first place? #details #interface design

0 views
The Jolly Teapot 1 weeks ago

Another rant about web browsing

Yes, I’m writing again about my ongoing experiment with blocking JavaScript on a per-site basis. This time, I’m not here to explain how I operate in detail , but to complain about the work needed to maintain this web browsing hygiene. In short, the web is a mess, and while messy things can be fun , I’ve recently grown very frustrated with the need to dance around my extensions every time I visit a new site where displaying simple text apparently requires JavaScript, or where scrolling requires dismissing a cookie modal that is only visible if content blockers are turned off first. I’ve come to the conclusion that blocking JavaScript by default on all websites, as I’ve been doing lately, is a source of frustration. Yes, the web is light as a feather and my browser feels very fast when it doesn’t have to deal with all the JavaScript, I do love that. But this “strategy” breaks too many websites, pushing me to take detours so often that they can barely be called detours any more. You see, I can’t be bothered to manage an efficient “allow” list in the long run, so web browsing often feels like a series of new obstacles, as if every day is the first day of this setup. *1 This strategy is therefore a bad one. Just as bad as the other strategy I tried before, the one where I only block JavaScript after visiting the site, if it feels necessary. My discipline with that second strategy tends to fade away as days go by, and I end up barely ever blocking anything, even forgetting that this is something I can do. This strategy often encourages me to download a proper content blocker or use a filtering DNS. Not only are these strategies inefficient in their initial goal of making my web browsing experience better , but they are also only work on the Mac. On iOS, due to the way Safari extensions work — which is a bit shitty — neither of the two strategies for blocking JavaScript on a per-site basis is practical to use, pushing me to adopt another strategy just for my phone (which, in turn, makes everything feel so much more complex than it needs to be). On the iPhone, accessing the settings for each Safari extension is already complicated, but there seems to be no way to manage a per-site setting if the extension is not recognised as a content blocker and if it is set to “allow on all websites”. With StopTheScript for instance, I can only manage the per-site setting if I set the extension to “ask”. Also, per-site settings only seem to sync between the phone and the Mac if the extension is a content blocker. *2 So, if I were to rate my JavaScript-off web browsing strategies, taking into account the browsing experience itself (the way the websites look and behave), the impact on my computer’s CPU (if the fan turns on or not, if it lags), and the amount of maintenance required (having to manage exception lists): JavaScript-off by default, allowing a few selected sites permanently, visiting others temporarily in a private tab (where the extension is inactive): 8/20 JavaScript-on by default, managing the JS-off list extensively but facing the terribleness of raw webpages: 6/20 Both are bad strategies, but the truth is that none of the alternatives I’m thinking of are better. For example, using a full content blocker like Wipr is a frustrating experience in itself. Having to manage another list of sites and constantly refreshing pages with or without content blockers is a pain. That, and the fact that it seems to be a heavier workload for my old Mac, as are third-party browsers. Content-blocker-enabled Safari, managing the exception list and dealing with a laggy computer: 7/20 Third-party browser , like Helium, Quiche Browser, or Orion, combining content blocking and a neat JavaScript toggle (uBlock Origin is pretty great at both): 7/20 Naked browser, meaning no content blockers, no JavaScript limitation, no list to manage, nothing to do, just the natural web: 1/20 I think the best setup is the following, even if I’ll stick with strategy 1 for a while: The main issue with strategy 6 is that I’ve had issues with these DNS resolvers, like not being able to access common websites for hours, even my own website, resulting in a quick investigation only to realise that everything was working fine and that the issue was with the DNS resolver. This is the state of web browsing in 2026, terrible at best. Allowing JavaScript, blocking JavaScript, whatever; either way the experience is bad. Most websites are stuffed with invasive ads, surveillance tracking, dickpanels , noise, and junk. Nothing we can do really works, unless one spends hours fine-tuning everything and therefore adds extra layers of complexity. The more effort I put into filtering the filth, the more ready I am to give up at the first little hiccup. It doesn’t feel right to reload a webpage three times to view it properly and to take the time to ensure it’s properly set up for future visits. While content blockers and JS toggle tricks are improving things drastically, the added amount of work required is a pain in itself. The browser on one side, the extensions on the other. The more we consume websites as the filling in a sort of software sandwich, the more they resist. The thicker our bread, the more sauce they add. The more bread we bring to absorb it, the more junk they add to the filling. At what point does it become too disgusting to eat? Meanwhile, reading articles outside the web browser , via email newsletters or within my RSS reader, is pure bliss; a delightful, gourmet, delicious cuisine that stimulates my appetite instead of making me want to throw up. It’s so good that I don’t even need extra bread. *3 It just works. Just like it’s increasingly better to search for an answer using an A.I chatbot rather than a traditional search engine, it’s now better to read articles from websites by using apps that are not traditional web browsers. It feels wrong, like driving on the smooth cycle lane rather than a pothole-filled road. How long can this situation last? Between difficult business models  — the source of most problems, driving us to use content blockers in the first place — and new A.I. chatbot intermediaries , I don’t know what will happen to the web in the next three or four years. Some web browsers are already in a weird spot . In the meantime, I will keep overthinking this, as I want my next laptop to inherit a “final” and well-thought-out setup, developed on this early 2020 MacBook Air. Its lack of a powerful chip and its limited memory forces me to face the inefficiency of overloaded webpages and third-party browsers. Maybe I’m obsessing a little too much about this. Or maybe I need to sleep more . “Allow” or “deny” list, depending on whether we talk about JavaScript being on or off, or the extension blocking it. The vocabulary around content blockers and extensions like StopTheScript confuses me in terms of negation.  ^ Some extensions like StopTheMadness can be configured without relying on Safari per-site settings, but decentralising and maintaining two competing lists is pretty much the opposite of what I want.  ^ I do disable JavaScript in NetNewsWire though, just to be safe.  ^ JavaScript-off by default, allowing a few selected sites permanently, visiting others temporarily in a private tab (where the extension is inactive): 8/20 JavaScript-on by default, managing the JS-off list extensively but facing the terribleness of raw webpages: 6/20 Content-blocker-enabled Safari, managing the exception list and dealing with a laggy computer: 7/20 Third-party browser , like Helium, Quiche Browser, or Orion, combining content blocking and a neat JavaScript toggle (uBlock Origin is pretty great at both): 7/20 Naked browser, meaning no content blockers, no JavaScript limitation, no list to manage, nothing to do, just the natural web: 1/20 Strategy 2, with a DNS resolver like Mullvad or NextDNS, effectively blocking most crap without making my laptop choke. 9/20 “Allow” or “deny” list, depending on whether we talk about JavaScript being on or off, or the extension blocking it. The vocabulary around content blockers and extensions like StopTheScript confuses me in terms of negation.  ^ Some extensions like StopTheMadness can be configured without relying on Safari per-site settings, but decentralising and maintaining two competing lists is pretty much the opposite of what I want.  ^ I do disable JavaScript in NetNewsWire though, just to be safe.  ^

0 views
Unsung 1 weeks ago

“We accepted this gradual bloat, but that’s not progress.”

I like the Fits on a Floppy manifesto by Matt Sephton: Software should be as small as it can be. Not as a gimmick, but as a discipline. The floppy disk is the measuring stick: 1.44 MB. If the software that ran entire businesses could fit in that space, then a modern, focused, single-purpose tool certainly can. In my own work, I have mostly focused on the web side of this equation, as this is where the situation feels the most dire: tens of megabytes dedicated to heavy frameworks, unnecessary tracking scripts, and video ads have a real negative effect on experiencing websites. Progressive loading challenges also make it harder to offer a great experience. But space considerations are starting to feel more pertinent to local software too, in an era where SSD and hard drive prices are going up, and where local LLM models start taking up more room . Also, this passage feels very Unsung, and is exactly why the tag #history exists on this blog: I don’t miss floppy disks. I miss the mindset they demanded—that every byte matters, that constraints breed creativity, and that software should be light on its footprint. If you reduce tech history to just nostalgia, it won’t be that useful. But if you look at it as inspiration , you might find some truly wonderful and meaningful stuff in there. On that note: Bonus for a nice classic domain, and a nod toward Mac’s most famous screensaver. #history #performance

0 views
Unsung 2 weeks ago

Not a radio pharma ad

I like sharing, thinking about, and revisiting basic rules and principles because they really do ladder up to help you with more complex things down the road. I wrote before how a simple rule to give some breathing room to your length-limited edit fields can be upleveled to a more general “let me color outside the lines when I’m editing” principle. This is another example of a similar situation. I am in Buttondown, which is a mailing list software. I created a quick test draft just to check something out in the editor, I didn’t do anything else, and then I proceeded to delete it. Then, I was greeted with this: = 2x) and (width >= 700px)" srcset="https://unsung.aresluna.org/_media/not-a-radio-pharma-ad/1.2096w.avif" type="image/avif"> = 3x) or (width >= 700px)" srcset="https://unsung.aresluna.org/_media/not-a-radio-pharma-ad/1.1600w.avif" type="image/avif"> This is nothing more than a larger version of the “You have 1 email(s)” problem . There might be a situation when I’m deleting something that has been published and linked to. In that case, it’d be good to know about how any links to that thing will cease working. But this is not that kind of a situation, and the software has all the info to know that. In this moment, it could show me a simpler, much less alarming message more appropriate to my situation. This is not the end of a radio pharma ad where you have to rattle out all the legal disclaimers just in case something could happen. One tiny counterexample from my neck of the woods: in Figma, when you start writing a comment and then exit without posting it, you get a little warning. But you don’t get that warning when you type something that’s <= 8 characters. In this case, the assumption is that retyping a few characters elsewhere (assuming you haven’t just changed your mind altogether) is much easier and faster than cognitively processing and dismissing the warning. = 2x) and (width >= 700px)" srcset="https://unsung.aresluna.org/_media/not-a-radio-pharma-ad/2.2096w.avif" type="image/avif"> = 3x) or (width >= 700px)" srcset="https://unsung.aresluna.org/_media/not-a-radio-pharma-ad/2.1600w.avif" type="image/avif"> The challenge with Buttondown’s dialog is that this is more than just extra cognitive processing and “cheapness.“ Here, the stakes are higher, as we’re talking about something adjacent to data loss; the dialog really does feel a bit scary and makes me think I can do some real damage in a situation no real damage is possible. #interface design #principles #writing

0 views
Evan Hahn 2 weeks ago

Make ZIP files smaller with ZIP Shrinker

I built ZIP Shrinker, a little browser tool to shrink ZIP files. It also works with formats that are secretly ZIPs underneath, like APK, EPUB, JAR, and many more. Try it out! At a high level, this tool (1) re-compresses every file in the ZIP archive with higher compression (2) removes all metadata (3) removes entries for directories. ZIP files are typically compressed with an algorithm called Deflate . There are a few tools that can re-compress Deflate data and make it smaller, usually by spending more time on the computation. I took one of these tools, libdeflate , and applied it to each compressed entry in the ZIP. I chose libdeflate because of its performance; alternatives like Zopfli can achieve marginally smaller results but take much longer. I created libdeflate.js , a WebAssembly wrapper for libdeflate, as part of this work. (I always relish my time working with WASM!) Each entry in a ZIP file can contain additional metadata like comments. These aren’t typically used, and if they’re there, my shrinker removes them. This usually doesn’t save too many bytes, but it doesn’t hurt. Removing directories is a slightly spicier decision. Usually, the existence of a file entry implies the existence of the directory it’s inside. For example, implies the existence of the directory. Some ZIPs include separate entries for directories, but because most extractors don’t need them, I remove those. This has the side effect of removing empty directories— let me know if that’s a problem for you. If you want to see how the whole project works, check out the full source code . I tested several ZIPs to see what this tool could do. Some anecdotal results: Not particularly scientific, but useful to see. This proof-of-concept shows that you can make ZIP files smaller without sacrificing backwards compatibility. It could be useful for sending an archive to someone, but could also be useful to reduce bandwidth and server costs. For example, if Project Gutenberg re-compressed all their EPUB books with this method, they might be able to save some money. Of course, ZIP isn’t always the most efficient format. Typically, other archives like can be smaller. But those aren’t backwards-compatible! ZIP also supports compression methods other than Deflate. They’re atypical, but you could use them to achieve a smaller result, too. Give my tool a try if you want a smaller ZIP.

0 views