Full Width [alt+shift+f] Shortcuts [alt+shift+k] TRY SIMPLE MODE
Sign Up [alt+shift+s] Log In [alt+shift+l]
74
One of the ways I like to do development is to build something, click around a ton, make tweaks, click around more, more tweaks, more clicks, etc., until I finally consider it done. The clicking around a ton is the important part. If it’s a page transition, that means going back and forth a ton. Click, back button. Click, right-click context menu, “Back”. Click, in-app navigation to go back (if there is one). Click, keyboard shortcut to go back. Over and over and over. You get the idea. It’s kind of a QA tactic in a sense, just click around and try to break stuff. But I like to think of it as being more akin to woodworking. You have a plank of wood and you run it through the belt sander to get all the big, coarse stuff smoothed down. Then you pull out the hand sander, sand a spot, run your hand over it, feel for splinters, sand it some more, over and over until you’re satisfied with the result. With software, the fact is that sometimes there are just too many variables to know and test...
11 months ago

Improve your reading experience

Logged in users get linked directly to articles resulting in a better reading experience. Please login for free, it takes less than 1 minute.

More from Jim Nielsen’s Blog

Writing: Blog Posts and Songs

I was listening to a podcast interview with the Jackson Browne (American singer/songwriter, political activist, and inductee into the Rock and Roll Hall of Fame) and the interviewer asks him how he approaches writing songs with social commentaries and critiques — something along the lines of: “How do you get from the New York Times headline on a social subject to the emotional heart of a song that matters to each individual?” Browne discusses how if you’re too subtle, people won’t know what you’re talking about. And if you’re too direct, you run the risk of making people feel like they’re being scolded. Here’s what he says about his songwriting: I want this to sound like you and I were drinking in a bar and we’re just talking about what’s going on in the world. Not as if you’re at some elevated place and lecturing people about something they should know about but don’t but [you think] they should care. You have to get to people where [they are, where] they do care and where they do know. I think that’s a great insight for anyone looking to have a connecting, effective voice. I know for me, it’s really easily to slide into a lecturing voice — you “should” do this and you “shouldn’t” do that. But I like Browne’s framing of trying to have an informal, conversational tone that meets people where they are. Like you’re discussing an issue in the bar, rather than listening to a sermon. Chris Coyier is the canonical example of this that comes to mind. I still think of this post from CSS Tricks where Chris talks about how to have submit buttons that go to different URLs: When you submit that form, it’s going to go to the URL /submit. Say you need another submit button that submits to a different URL. It doesn’t matter why. There is always a reason for things. The web is a big place and all that. He doesn’t conjure up some universally-applicable, justified rationale for why he’s sharing this method. Nor is there any pontificating on why this is “good” or “bad”. Instead, like most of Chris’ stuff, I read it as a humble acknowledgement of the practicalities at hand — “Hey, the world is a big place. People have to do crafty things to make their stuff work. And if you’re in that situation, here’s something that might help what ails ya.” I want to work on developing that kind of a voice because I love reading voices like that. Email · Mastodon · Bluesky

2 days ago 4 votes
A Few Things About the Anchor Element’s href You Might Not Have Known

I’ve written previously about reloading a document using only HTML but that got me thinking: What are all the values you can put in an anchor tag’s href attribute? Well, I looked around. I found some things I already knew about, e.g. Link protocols like mailto:, tel:, sms: and javascript: which deal with specific ways of handling links. Protocol-relative links, e.g. href="//" Text fragments for linking to specific pieces of text on a page, e.g. href="#:~:text=foo" But I also found some things I didn’t know about (or only vaguely knew about) so I wrote them down in an attempt to remember them. href="#" Scrolls to the top of a document. I knew that. But I’m writing because #top will also scroll to the top if there isn’t another element with id="top" in the document. I didn’t know that. (Spec: “If decodedFragment is an ASCII case-insensitive match for the string top, then return the top of the document.”) href="" Reloads the current page, preserving the search string but removing the hash string (if present). URL href="" resolves to /path/ /path/ /path/#foo /path/ /path/?id=foo /path/?id=foo /path/?id=foo#bar /path/?id=foo href="." Reloads the current page, removing both the search and hash strings (if present). Note: If you’re using href="." as a link to the current page, ensure your URLs have a trailing slash or you may get surprising navigation behavior. The path is interpreted as a file, so "." resolves to the parent directory of the current location. URL href="." resolves to /path / /path#foo / /path?id=foo / /path/ /path/ /path/#foo /path/ /path/?id=foo /path/ /path/index.html /path/ href="?" Reloads the current page, removing both the search and hash strings (if present). However, it preserves the ? character. Note: Unlike href=".", trailing slashes don’t matter. The search parameters will be removed but the path will be preserved as-is. URL href="?" resolves to /path /path? /path#foo /path? /path?id=foo /path? /path?id=foo#bar /path? /index.html /index.html? href="data:" You can make links that navigate to data URLs. The super-readable version of this would be: <a href="data:text/plain,hello world"> View plain text data URL </a> But you probably want data: URLs to be encoded so you don’t get unexpected behavior, e.g. <a href="data:text/plain,hello%20world"> View plain text data URL </a> Go ahead and try it (FYI: may not work in your user agent). Here’s a plain-text file and an HTML file. href="video.mp4#t=10,20" Media fragments allow linking to specific parts of a media file, like audio or video. For example, video.mp4#t=10,20 links to a video. It starts play at 10 seconds, and stops it at 20 seconds. (Support is limited at the time of this writing.) See For Yourself I tested a lot of this stuff in the browser and via JS. I think I got all these right. Thanks to JavaScript’s URL constructor (and the ability to pass a base URL), I could programmatically explore how a lot of these href’s would resolve. Here’s a snippet of the test code I wrote. You can copy/paste this in your console and they should all pass 🤞 const assertions = [ // Preserves search string but strips hash // x -> { search: '?...', hash: '' } { href: '', location: '/path', resolves_to: '/path' }, { href: '', location: '/path/', resolves_to: '/path/' }, { href: '', location: '/path/#foo', resolves_to: '/path/' }, { href: '', location: '/path/?id=foo', resolves_to: '/path/?id=foo' }, { href: '', location: '/path/?id=foo#bar', resolves_to: '/path/?id=foo' }, // Strips search and hash strings // x -> { search: '', hash: '' } { href: '.', location: '/path', resolves_to: '/' }, { href: '.', location: `/path#foo`, resolves_to: `/` }, { href: '.', location: `/path?id=foo`, resolves_to: `/` }, { href: '.', location: `/path/`, resolves_to: `/path/` }, { href: '.', location: `/path/#foo`, resolves_to: `/path/` }, { href: '.', location: `/path/?id=foo`, resolves_to: `/path/` }, { href: '.', location: `/path/index.html`, resolves_to: `/path/` }, // Strips search parameters and hash string, // but preserves search delimeter (`?`) // x -> { search: '?', hash: '' } { href: '?', location: '/path', resolves_to: '/path?' }, { href: '?', location: '/path#foo', resolves_to: '/path?' }, { href: '?', location: '/path?id=foo', resolves_to: '/path?' }, { href: '?', location: '/path/', resolves_to: '/path/?' }, { href: '?', location: '/path/?id=foo#bar', resolves_to: '/path/?' }, { href: '?', location: '/index.html#foo', resolves_to: '/index.html?'} ]; const assertions_evaluated = assertions.map(({ href, location, resolves_to }) => { const domain = 'https://example.com'; const expected = new URL(href, domain + location).toString(); const received = new URL(domain + resolves_to).toString(); return { href, location, expected: expected.replace(domain, ''), received: received.replace(domain, ''), passed: expected === received }; }); console.table(assertions_evaluated); Email · Mastodon · Bluesky

5 days ago 13 votes
How to Make Websites That Will Require Lots of Your Time and Energy

Some lessons I’ve learned from experience. 1. Install Stuff Indiscriminately From npm Become totally dependent on others, that’s why they call them “dependencies” after all! Lean in to it. Once your dependencies break — and they will, time breaks all things — then you can spend lots of time and energy (which was your goal from the beginning) ripping out those dependencies and replacing them with new dependencies that will break later. Why rip them out? Because you can’t fix them. You don’t even know how they work, that’s why you introduced them in the first place! Repeat ad nauseam (that is, until you decide you don’t want to make websites that require lots of your time and energy, but that’s not your goal if you’re reading this article). 2. Pick a Framework Before You Know You Need One Once you hitch your wagon to a framework (a dependency, see above) then any updates to your site via the framework require that you first understand what changed in the framework. More of your time and energy expended, mission accomplished! 3. Always, Always Require a Compilation Step Put a critical dependency between working on your website and using it in the browser. You know, some mechanism that is required to function before you can even see your website — like a complication step or build process. The bigger and more complex, the better. This is a great way to spend lots of time and energy working on your website. (Well, technically it’s not really working on your website. It’s working on the thing that spits out your website. So you’ll excuse me for recommending something that requires your time and energy that isn’t your website — since that’s not the stated goal — but trust me, this apparent diversion will directly affect the overall amount of time and energy you spend making a website. So, ultimately, it will still help you reach our stated goal.) Requiring that the code you write be transpiled, compiled, parsed, and evaluated before it can be used in your website is a great way to spend extra time and energy making a website (as opposed to, say, writing code as it will be run which would save you time and energy and is not our goal here). More? Do you have more advice on building a website that will require a lot of your time and energy? Share your recommendations with others, in case they’re looking for such advice. Email · Mastodon · Bluesky

a week ago 13 votes
Occupation and Preoccupation

Here’s Jony Ive in his Stripe interview: What we make stands testament to who we are. What we make describes our values. It describes our preoccupations. It describes beautiful succinctly our preoccupation. I’d never really noticed the connection between these two words: occupation and preoccupation. What comes before occupation? Pre-occupation. What comes before what you do for a living? What you think about. What you’re preoccupied with. What you think about will drive you towards what you work on. So when you’re asking yourself, “What comes next? What should I work on?” Another way of asking that question is, “What occupies my thinking right now?” And if what you’re occupied with doesn’t align with what you’re preoccupied with, perhaps it's time for a change. Email · Mastodon · Bluesky

3 weeks ago 15 votes
Measurement and Numbers

Here’s Jony Ive talking to Patrick Collison about measurement and numbers: People generally want to talk about product attributes that you can measure easily with a number…schedule, costs, speed, weight, anything where you can generally agree that six is a bigger number than two He says he used to get mad at how often people around him focused on the numbers of the work over other attributes of the work. But after giving it more thought, he now has a more generous interpretation of why we do this: because we want relate to each other, understand each other, and be inclusive of one another. There are many things we can’t agree on, but it’s likely we can agree that six is bigger than two. And so in this capacity, numbers become a tool for communicating with each other, albeit a kind of least common denominator — e.g. “I don’t agree with you at all, but I can’t argue that 134 is bigger than 87.” This is conducive to a culture where we spend all our time talking about attributes we can easily measure (because then we can easily communicate and work together) and results in a belief that the only things that matter are those which can be measured. People will give lip service to that not being the case, e.g. “We know there are things that can’t be measured that are important.” But the reality ends up being: only that which can be assigned a number gets managed, and that which gets managed is imbued with importance because it is allotted our time, attention, and care. This reminds me of the story of the judgement of King Solomon, an archetypal story found in cultures around the world. Here’s the story as summarized on Wikipedia: Solomon ruled between two women who both claimed to be the mother of a child. Solomon ordered the baby be cut in half, with each woman to receive one half. The first woman accepted the compromise as fair, but the second begged Solomon to give the baby to her rival, preferring the baby to live, even without her. Solomon ordered the baby given to the second woman, as her love was selfless, as opposed to the first woman's selfish disregard for the baby's actual well-being In an attempt to resolve the friction between two individuals, an appeal was made to numbers as an arbiter. We can’t agree on who the mother is, so let’s make it a numbers problem. Reduce the baby to a number and we can agree! But that doesn’t work very well, does it? I think there is a level of existence where measurement and numbers are a sound guide, where two and two make four and two halves make a whole. But, as humans, there is another level of existence where mathematical propositions don’t translate. A baby is not a quantity. A baby is an entity. Take a whole baby and divide it up by a sword and you do not half two halves of a baby. I am not a number. I’m an individual. Indivisible. What does this all have to do with software? Software is for us as humans, as individuals, and because of that I believe there is an aspect of its nature where metrics can’t take you.cIn fact, not only will numbers not guide you, they may actually misguide you. I think Robin Rendle articulated this well in his piece “Trust the vibes”: [numbers] are not representative of human experience or human behavior and can’t tell you anything about beauty or harmony or how to be funny or what to do next and then how to do it. Wisdom is knowing when to use numbers and when to use something else. Email · Mastodon · Bluesky

3 weeks ago 17 votes

More in literature

What I Read in July 2025 - books are quiet and unobtrusive, and do not try to hustle the reader

In general, however, he [Louis XVI] preferred writing down his thoughts instead of uttering them by word of mouth; and he was fond of reading, for books are quiet and unobtrusive, and do not try to hustle the reader. (Stefan Zweig, Marie Antoinette, 1932, p. 77 of the 1933 American edition, tr. Eden and Cedar Paul)   Soon I will put up a schedule of my autumn Not Shakespeare reading, just in case anyone wants to join in.  In effect it will be a lot of Christopher Marlowe with a few contemporaries.  Marlowe is a lot of fun. FICTION Love, Death, and the Ladies' Drill Team (1955), Jessamyn West – Reading Salinger’s Nine Stories (1953) I wondered what else the New Yorker readers of the time were reading along with “A Perfect Day for Bananafish.”  One answer is Jessamyn West.  These stories seemed good to me.  “The Mysteries of Life in an Orderly Manner” (1948) is easy to recommend as a sample, for one thing because it is only six pages. The Holy Innocents (1981), Miguel Delibes – A famous Spanish novel, just translated, that uses its post-Franco freedom to indulge in a little revenge on the powerful.  Modernist and unconventionally punctuated, but I do not want to say it was too surprising.  New to English – what took so long? That They May Face the Rising Sun (2003), John McGahern – I am not sure what a quiet novel is but this is likely one of those.  Irish people lives their lives.  Seasons pass.  There is agriculture.  I have not read McGahern before; my understanding is that the novels that made his names are not so quiet.  But Ireland in 2003 had quieted down a lot, which I think is one of the ideas behind the novel.  Quite good.  The American version was for some reason given the accurate but dull title By the Lake. The Director (2023), Daniel Kehlmann – Discussed over here.   NON-FICTION Brazilian Adventure (1933), Peter Fleming – A jolly, self-conscious romp written in, or let’s say approaching, the style of Evelyn Waugh.  Young Fleming’s river trip in the Amazon is more dangerous and a bit more substantive than Waugh’s Mediterranean tourism in Labels (1930), but still, useless, except for the pleasures of the resulting book. Exophony: Voyages Outside the Mother Tongue (2003), Yoko Tawada – Tawada publishes fiction in both Japanese and German.  This book is an extended essay about the creative relationship between the two languages, based on Tawada’s education, travel, and writing.  It is perhaps especially fresh because English plays so little part in the book. How the Classics Made Shakespeare (2019), Jonathan Bate – Outstanding preparation for my upcoming reading.  The title describes the book exactly. Marie Antoinette (1932), Stefan Zweig – Just the first 80 or 90 pages.  I have wondered what Zweig’s biographies, still much read in France, were like, and now I know a little better.  Not for me.  Badly sourced and rhetorically dubious.  Obtrusive!  At times trying to hustle me!   POETRY Selected Poems (1952-68), Vasko Popa Helen of Troy, 1993 (2025), Maria Zoccola – This Helen lives in Sparta, Tennessee.  The up-to-date formal poems are interesting: American sonnets, and golden shovels, a form invented in 2010, incorporating lines from Robert Fagle’s Iliad.   IN FRENCH & PORTUGUESE La rage de l'expression (1952), Francis Ponge – More thing poems. Literatura Portuguesa (1971), Jorge de Sena – Long encyclopedia entries on Portuguese and Brazilian literature now published as a little book.  So useful. A Bicicleta Que Tinha Bigodes (The Bicycle that Has a Moustache, 2011), Ondjaki – An Angolan boy wants to win a bicycle by borrowing a story from his famous fiction-writing uncle.  Specifically by borrowing the letters that he combs from his moustache.  That’s not how it works, kid. A Biblioteca: Uma segunda casa (The Library: A Second Home, 2024), Manuel Carvalho Coutinho – I have now read all the books I brought home from Portugal last year.  This one is literally a series of four-page profiles of Portuguese municipal libraries.  Why did I buy it (aside from loving libraries)?  It is at times as dull as it sounds, but sometimes, caused by the authors skilled or desperate attempt to write a less dull book, shimmered with the possibility of another book, a Calvino-like book, Invisible Libraries.  Visit the library full of obsolete technology, the library with books no one wants, the library for tourists, the library, most unlikely of all, where everyone goes to read books.

12 hours ago 3 votes
'Hardly the Most Fashionable of Writers'

Luc de Clapiers, Marquis de Vauvenargues (1715-47), died at the age of thirty-one after a life spent mostly as a soldier, though he lived for some time in Paris and was befriended by Voltaire. His health was never good. No longer in the army, Vauvenargues died of complications from the frostbite he suffered during the War of the Austrian Succession. Not as well-known as fellow French moralist-aphorists La Bruyère, Chamfort and La Rochefoucauld, Vauvenargues’ thinking is informed by a soldier’s experience and is rooted in a pragmatic view of life:  “It is not bringing hunger and misery to foreigners that is glorious in a hero’s eyes, but enduring them for his country’s sake; not inflicting death, but courting it.”   The Reflections and Maxims of Vauvenargues (Oxford University Press, 1940) is translated from the French by F.G. Stevens. I’m using the copy borrowed from the Fondren Library. It is yet another volume previously owned by Edgar Odell Lovett, president of Rice University from 1908 to 1946. Again, one can hardly imagine an American university president today buying and reading such a book. In 1746, Vauvenargues anonymously published his only book, Introduction à la connaissance de l'esprit humain, which included Reflexions and Maximes. Here is a sampler:    “People don't say much that is sensible when they are trying to be unusual.” “We condemn strongly the least offences of the unfortunate, and show little sympathy for their greatest troubles.”   “There would be few happy people if others could determine our occupations and amusements.”   “We should expect the best and the worst from mankind, as from the weather.”   “Those whose only asset is cleverness never occupy the first rank in any walk of life.”   “We have no right to make unhappy those whom we cannot make good.”   “War is not so heavy a burden as slavery.”   Vauvenargues is often gentler, less cynical than La Rochefoucauld. One tends to think of him as a boy. C.H. Sisson published an essay on him in the Winter 1987 issue of The American Scholar (collected in In Two Minds: Guesses at Other Writers, Carcanet Press, 1990) that begins: “Vauvenargues is hardly the most fashionable of writers. He has a further distinction, that there never was a time when his work was fashionable, yet for some two hundred and fifty years there has never been a time when he might not have been said to have friends and admirers.” Sisson places him among the “observers who lived in the world and recorded their findings in more or less summary fashion.”   Sisson makes a useful comparison: “Vauvenargues is one of those writers, like George Herbert, whose life--and indeed death--cannot be satisfactorily separated from their works.” He adds: “A profound and vulnerable diffidence marks the thought of Vauvenargues as it marks his life,” and we recall how young and “unsuccessful” he was in life. Never married, no children, always fending off poverty. Sisson also wrote a forty-six-line poem titled “Vauvenargues” (Collected Poems, Carcanet, 1998), saying the aphorist “found no resting place on this earth.” He writes:   “They say the boy did not learn much Latin But got drunk on Plutarch—perhaps Amyot? How many years of barracks after that, Inspecting guards, collecting up the drunks, Trailing his pike in the muddy streets, Garrisoned at Besançon, Arras, Reims? There were campaigns, though nothing much perhaps Historians would really care much about . . .”

8 hours ago 2 votes
Streams of Consciousness

A writer’s intrepid exploration of troubled waters The post Streams of Consciousness appeared first on The American Scholar.

yesterday 4 votes
'Every Garden Is a Vast Hospital'

On Saturday I saw the first hummingbird of the season in our front garden. I’ve counted eight butterfly species there this summer and found a monarch chrysalis hanging from a tropical milkweed plant. Brown and green anoles have densely colonized the garden, which has never been so lush.  Because of the ample lighting I usually read while seated on the couch by the oversized front window. The garden is a comfort. Framed by the window, it’s like a slow-motion movie. The appeal is less aesthetic than – what? Metaphysical? I like to be reminded of life’s profusion and persistence, the opposite of sterility. There’s little difference between “weed” and “flower.” I like Louise Bogan’s endorsement of weeds in “The Sudden Marigolds” (A Poet’s Prose: Selected Writings of Louise Bogan, 2005): “What was the matter with me, that daisies and buttercups made hardly any impression at all. . . . As a matter of fact, it was weeds that I felt closest to and happiest about; and there were more flowering weeds, in those days, than flowers in gardens. . . . Yes: weeds: jill-over-the-ground and tansy and the exquisite chicory (in the terrains vagues) and a few wild flowers: lady’s slipper and the arbutus my mother showed me how to find, under the snow, as far back as Norwich. Solomon’s seal and Indian pipe. Ferns. Apple blossoms.”   A reminder that poets ought to know the names of wildflowers, according to Seamus Heaney. Not every poet would agree. I was looking for something in Zibaldone, Giacomo Leopardi’s 2,500-page commonplace book kept between 1817 and 1832, when I happened on a passage from April 1826 that only Leopardi could have written:   “Go into a garden of plants, grass, flowers. No matter how lovely it seems. Even in the mildest season of the year. You will not be able to look anywhere and not find suffering. That whole family of vegetation is in a state of souf-france [suffering], each in its own way to some degree. Here a rose is attacked by the sun, which has given it life; it withers, languishes, wilts. There a lily is sucked cruelly by a bee, in its most sensitive, most life-giving parts.”   Leopardi’s understanding of biology is limited but his Zeitgeist remains consistent. He goes on for a full page turning a mini-Eden into a raging Hell:   “The spectacle of such abundance of life when you first go into this garden lifts your spirits. And that is why you think it is a joyful place. But in truth this life is wretched and unhappy, every garden is a vast hospital (a place much more deplorable than a cemetery), and if these beings feel, or rather, were to feel, surely not being would be better for them than being.” It's almost as though Leopardi had read the crackpot bestseller The Secret Life of Plants (1973) by Peter Tompkins and Christopher Bird. I first encountered Leopardi more than half a century ago in Samuel Beckett’s Proust (1931). The Irishman refers to the Italian’s “wisdom that consists not in the satisfaction but in the ablation of desire.” Beckett quotes two lines from “A se stesso” (“To himself”): “In noi di cari inganni, / Non che la speme, il desiderio e ’spento.” (“Not only our hope / but our desire for dear illusions is gone.” Trans. Jonathan Galassi, Canti, 2010).   Melville, too, found a kindred spirit in Leopardi. In his 18,000-line Clarel: A Poem and Pilgrimage in the Holy Land (1876), Part I, Section 14, “In the Glen,” he writes:   “If Savonarola’s zeal devout But with the fagot’s flame died out; If Leopardi, stoned by Grief, A young St. Stephen of the Doubt Might merit well the martyr’s leaf.”   [Zibaldone was edited by Michael Caesar and Franco D’Intino, translated into English by seven translators, and published by Farrar, Straus and Giroux in 2013.]

2 days ago 4 votes
Horse and Runner

The post Horse and Runner appeared first on The American Scholar.

2 days ago 4 votes