More from Jim Nielsen’s Blog
I really enjoyed watching Python: The Documentary (from CultRepo, formerly Honeypot, same makers as the TypeScript documentary). Personally, I don’t write much Python and am not involved in the broader Python community. That said, I love how this documentary covers a lot of the human problems in tech and not just the technical history of Python as language. For example: How do you handle succession from a pivotal creator? How do you deal with poor representation? How do you fund and steer open projects? How do you build community? How do you handle the fallout of major version changes? And honestly, all the stories around these topics as told from the perspective of Python feel like lessons to learn from. Here are a few things that stood out to me. Guido van Rossum, Creator of Python, Sounds Cool The film interviews Drew Houston, Founder/CEO at Dropbox, because he hired Python’s creator Guido van Rossum for a stint. This is what Drew had to say about his time working with Guido: It’s hard for me to think of someone who has had more impact with lower ego [than Guido] For tech, that’s saying something! Now that is a legacy if you ask me. The Python Community Sounds Cool Brett Cannon famously gave a talk at a Python conference where he said he “came for the language, but stayed for the community”. In the documentary they interview him and he adds: The community is the true strength of Pyhon. It’s not just the language, it’s the people. ❤️ This flies in the face of the current era we’re in, where it’s the technology that matters. How it disrupts or displaces people is insignificant next to the fantastic capabilities it purports to wield. But here’s this language surrounded by people who acknowledge that the community around the language is its true strength. People are the true strength. Let me call this out again, in case it’s not sinking in: Here’s a piece of technology where the people around it seem to acknowledge that the technology itself is only secondary to the people it was designed to serve. How incongruous is that belief with so many other pieces of technology we’ve seen through the years? What else do we have, if not each other? That’s something worth amplifying. Mariatta, Python Core Developer, Sounds Cool I absolutely loved the story of @mariatta@fosstodon.org. If you’re not gonna watch the documentary, at least watch the ~8 minutes of her story. Watched it? Ok, here’s my quick summary: She loves to program, but everywhere she looks it’s men. At work. At conferences. On core teams. She hears about pyladies and wants to go to Pycon where she can meet them. She goes to Pycon and sees Guido van Rossum stand up and say he wants 2 core contributors to Python that are female. She thinks, “Oh that’s cool! I’m not good enough for that, but I bet they’ll find someone awesome.” The next year she goes to the conference and finds out they’re still looking for those 2 core contributors. She thinks “Why not me?” and fires off an email to Guido. Here’s her recollection on composing that email: I felt really scared. I didn’t feel like I deserved mentorship from Guido van Rossum. I really hesitated to send this email to him, but in the end I realized I want to try. This was a great opportunity for me. I hit the send button. And later, her feelings on becoming the first female core contributor to Python: When you don’t have role models you can relate to, you don’t believe you can do it. ❤️ Mad respect. I love her story. As Jessica McKellar says in the film, Mariatta’s is an inspiring story and “a vision of what is possible in other communities”. Python Is Refreshing I’ve spent years in “webdev” circles — and there are some great ones — but this Python documentary was, to me, a tall, refreshing glass of humanity. Go Python! Email · Mastodon · Bluesky
(I present to you my stream of consciousness on the topic of casing as it applies to the web platform.) I’m reading about the new command and commandfor attributes — which I’m super excited about, declarative behavior invocation in HTML? YES PLEASE!! — and one thing that strikes me is the casing in these APIs. For example, the command attribute has a variety of values in HTML which correspond to APIs in JavaScript. The show-popover attribute value maps to .showPopover() in JavaScript. hide-popover maps to .hidePopover(), etc. So what we have is: lowercase in attribute names e.g. commandfor="..." kebab-case in attribute values e.g. show-popover camelCase for JS counterparts e.g. showPopover() After thinking about this a little more, I remember that HTML attributes names are case insensitive, so the browser will normalize them to lowercase during parsing. Given that, I suppose you could write commandFor="..." but it’s effectively the same. Ok, lowercase attribute names in HTML makes sense. The related popover attributes follow the same convention: popovertarget popovertargetaction And there are many other attribute names in HTML that are lowercase, e.g.: maxlength novalidate contenteditable autocomplete formenctype So that all makes sense. But wait, there are some attribute names with hyphens in them, like aria-label="..." and data-value="...". So why isn’t it command-for="..."? Well, upon further reflection, I suppose those attributes were named that way for extensibility’s sake: they are essentially wildcard attributes that represent a family of attributes that are all under the same namespace: aria-* and data-*. But wait, isn’t that an argument for doing popover-target and popover-target-action? Or command and command-for? But wait (I keep saying that) there are kebab-case attribute names in HTML — like http-equiv on the <meta> tag, or accept-charset on the form tag — but those seem more like legacy exceptions. It seems like the only answer here is: there is no rule. Naming is driven by convention and decisions are made on a case-by-case basis. But if I had to summarize, it would probably be that the default casing for new APIs tends to follow the rules I outlined at the start (and what’s reflected in the new command APIs): lowercase for HTML attributes names kebab-case for HTML attribute values camelCase for JS counterparts Let’s not even get into SVG attribute names We need one of those “bless this mess” signs that we can hang over the World Wide Web. Email · Mastodon · Bluesky
Dismissing an idea because it doesn’t work in your head is doing a disservice to the idea. (Same for dismissing someone else’s idea because it doesn’t work in your head.) The only way to truly know if an idea works is to test it. The gap between an idea and reality is the work. You can’t dismiss something as “not working” without doing the work. When collaborating with others, different ideas can be put forward which end up in competition with each other. We debate which is best, but verbal descriptions don’t do justice to ideas — so the idea that wins is the one whose champion is the most persuasive (or has the most institutional authority). You don’t want that. You want an environment where ideas can be evaluated based on their substance and not on the personal attributes of the person advocating them. This is the value of prototypes. We can’t visualize or predict how our own ideas will play out, let alone other people’s. This is why it’s necessary to bring them to life, have them take concrete form. It’s the only way to do them justice. (Picture a cute puppy in your head. I’ve got one too. Now how do we determine who’s imagining the cuter puppy? We can’t. We have to produce a concrete manifestation for contrast and comparison.) Prototypes are how we bridge the gap between idea and reality. They’re an iterative, evolutionary, exploratory form of birthing ideas that test their substance. People will bow out to a good persuasive argument. They’ll bow out to their boss saying it should be one way or another. But it’s hard to bow out to a good idea you can see, taste, touch, smell, or use. Email · Mastodon · Bluesky
I refreshed the little thing that let’s you navigate consistently between my inconsistent subdomains (video recording). Here’s the tl;dr on the update: I had to remove some features on each site to make this feel right. Takeaway: adding stuff is easy, removing stuff is hard. The element is a web component and not even under source control (🤫). I serve it directly from my cdn. If I want to make an update, I tweak the file on disk and re-deploy. Takeaway: cowboy codin’, yee-haw! Live free and die hard. So. Many. Iterations. All of which led to what? A small, iterative evolution. Takeaway: it’s ok for design explorations to culminate in updates that look more like an evolution than a mutation. Want more info on the behind-the-scenes work? Read on! Design Explorations It might look like a simple iteration on what I previously had, but that doesn’t mean I didn’t explore the universe of possibilities first before coming back to the current iteration. v0: Tabs! A tab-like experience seemed the most natural, but how to represent it? I tried a few different ideas. On top. On bottom. Different visual styles, etc. And of course, gotta explore how that plays out on desktop too. Some I liked, some I didn’t. As much as I wanted to play with going to the edges of the viewport, I realized that every browser is different and you won't be able to get a consistent “bleed-like” visual experience across browsers. For example, if you try to make tabs that bleed to the edges, it looks nice in a frame in Figma, and even in some browsers. But it won’t look right in all browser, like iOS Safari. So I couldn’t reliably leverage the idea of a bounded canvas as a design element — which, I should’ve known, has always been the case with the web. v1: Bottom Tabs With a Site Theme I really like this pattern on mobile devices, so I thought maybe I’d consider it for navigating between my sites. But how to theme across differently-styled sites? The favicon styles seemed like a good bet! And, of course, what do to on larger devices? Just stacking it felt like overkill, so I explored moving it to the edge. I actually prototyped this in code, but I didn’t like how it felt so I scratched the idea and went other directions. v2: The Unification The more I explored what to do with this element, the more it started taking on additional responsibility. “What if I unified its position with site-specific navigation?” I thought. This led to design explorations where the disparate subdomains began to take on not just a unified navigational element, but a unified header. And I made small, stylistic explorations with the tabs themselves too. You can see how I played toyed with the idea of a consistent header across all my sites (not an intended goal, but ya know, scope creep gets us all). As I began to explore more possibilities than I planned for, things started to get out of hand. v3: Do More. MORE. MORE!! Questions I began asking: Why aren’t these all under the same domain?! What if I had a single domain for feeds across all of them, e.g. feeds.jim-nielsen.com? What about icons instead of words? Wait, wait, wait Jim. Consistent navigation across inconsistent sites. That’s the goal. Pare it back a little. v4: Reigning It Back In To counter my exploratory ambitions, I told myself I needed to ship something without the need to modify the entire design style of all my sites. So how do I do that? That got me back to a simpler premise: consistent navigation across my inconsistent sites. Better — and implementable. Technical Details The implementation was pretty simple. I basically just forked my previous web component and changed some styles. That’s it. The only thing I did different was I moved the web component JS file from being part of my www.jim-nielsen.com git repository to a standalone file (not under git control) on my CDN. This felt like one of the exceptions to the rule of always keeping stuff under version control. It’s more of the classic FTP-style approach to web development. Granted, it’s riskier, but it’s also way more flexible. And I’m good with that trade-off for now. (Ask me again in a few months if I’ve done anything terrible and now have regrets.) Each site implements the component like this (with a different subdomain attribute for each site): <script type="module" src="https://cdn.jim-nielsen.com/shared/jim-site-switcher.js"></script> <jim-site-switcher subdomain="blog"></jim-site-switcher> That’s really all there is to say. Thanks to Zach for prodding me to make this post. Email · Mastodon · Bluesky
Jason Fried writes in his post “Knives and battleships”: Specific tools and familiar ingredients combined in different ratios, different molds, for different purposes. Like a baker working from the same tight set of pantry ingredients to make a hundred distinct recipes. You wouldn't turn to them and say "enough with the butter, flour, sugar, baking powder, and eggs already!" Getting the same few things right in different ways is a career's worth of work. Mastery comes from a lifetime of putting together the basics in different combinations. I think of Beethoven’s 5th and its famous “short-short-short-long” motif. The entire symphony is essentially the same core idea repeated and developed relentlessly! The same four notes (da-da-da-DAH!) moving between instruments, changing keys, etc. Beethoven took something basic — a four note motif — and extracted an enormous set of variations. Its genius is in illustrating how much can be explored and expressed within constraints (rather than piling on “more and more” novel stuff). Back to Jason’s point: the simplest building blocks in any form — music, code, paint, cooking — implemented with restraint can be combined in an almost infinite set of pleasing ways. As Devine noted (and I constantly link back to): we haven’t even begun to scratch the surface of what we can do with less. Email · Mastodon · Bluesky
More in literature
Poems read aloud, beautifully The post “Dear Possible” by Laura Riding appeared first on The American Scholar.
“[M]y life has been far less roiled by external events than most lives. The death of those dear to me I have usually been able to take in stride, although the last dozen years have become heavier and gloomier with such loss and the loss of the familiar, comforting world of which they were components.” Loss and pain are inevitable, regardless of whatever virtues we may possess, a truth never suspected by children, so we persist in thinking the good are rewarded and the bad are punished. It’s complicated because our nature mingles the good and the bad. While in Cleveland I spoke with two women and a man whose lives were radically “roiled by external events,” unlike my own. The man was severely wounded in Vietnam. One of the women was raped decades ago and tears came to her eyes as she described the attack. All managed to simulate “ordinary life,” whatever that means. They married, had jobs, two had children, all dabbled with but none descended into drug and alcohol addiction. They paid their taxes, committed no significant crimes and persevered. The late American novelist Richard G. Stern wrote the passage at the top in his final book, Still on Call, published in 2010, three years before his death at age eighty-four. I have a soft spot for Stern. His fiction is thoroughly human. It sometimes reminds me of his friend’s, Saul Bellow. He is devoted to the ordinariness of an American life. In the piece quoted above, “How I Think I Got to Think the Way I Think,” Stern writes for me: “I have never been a soldier, never been in prison, never lived in a city being bombed, never been longer than three days without electricity and plumbing, have never lived under tyranny – except during brief lecturing or tourist visits -- never been threatened by arrest because of my opinions, and never been restrained from expressing political sentiments . . .” In short, a typical American life, like my own. Cause only for thankfulness. Another American writer who embodies a similar sense of realism and gratitude for life in America is the late John Updike. I read most of his books as they appeared, starting in the sixties. Today, his novels mean little to me but I frequently return to his poetry, essays and criticism. and a handful of his early short stories. This is taken from “Spirit of ’76,” collected in the posthumously published Endpoint and Other Poems (2009): “Be with me, words, a little longer; you have given me my quitclaim in the sun, sealed shut my adolescent wounds, made light of grownup troubles, turned to my advantage what in most lives would be pure deficit, and formed, of those I loved, more solid ghosts.”
Are we doomed to repeat history—or can we build something better first?
Gammer Gurton loses her needle (solution to the mystery: distracted by her cat she forgets it in her servant Hodge’s pants). A wandering stranger uses the hubbub to sow chaos for some reason, which gives the play a kind of plot, which for something like this is just a way to give the gags some order. The stranger wants chaos but of course so do we, the readers, the audience. That is the point of comedy. Such is Gammer Gurton’s Needle. I date it near but somewhat after Ralph Roister Doister, so mid-1550s. It was possibly printed in 1563 and certainly printed in 1575. There we go. The authorship is a total hash. The author is one or another Cambridge do, writing a holiday entertainment performed by and for an audience of teenage boys. They presumably found it hilarious. Tib. See, Hidge, what’s this may it not be within it? Hodge. Break it, fool, with thy hand, and see an thou canst find it. Tib. Nay, break it you, Hodge, according to your word. Hodge. Gog’s sides! Fie! It stinks; it is a cat’s turd! (Act !, Scene v) As a character says later, “An thadst seen him, Diccon, it would have made thee beshit thee / For laughter” (IV.iii). Gammer Gurton’s Needle is rather more earthy than the English comedies that would follow it. The student of Shakespeare soon learns that anything that looks like a dirty joke probably is. Such is true here, too. Gammer. For these and ill luck together, as knoweth Cock, my boy, Have stuck away my dear neele, and robber me of my joy, My fair long straight neele, that was mine only treasure; The first day of my sorrow is, and last end of my pleasure! (I.iv) The play has an outstanding cat, Gib, who sadly never appears on stage, such were the limits of mid-16th century theatrical special effects. In Act III, scene iv, for example, Gib “stands me gasping behind the door, as though her wind hath faileth” – has she swallowed the lost needle! The characters debate what to do – “Groper her, ich say, methinks ich feel it; does not prick your hand?” – but the cat stays behind the door the whole time. Whoever the author was, he knew how to have some fun with the language, which is again in rhyming couplets but with more North English rural dialect. My guts they yawl-crawl, and all my belly rumbleth; The puddings cannot lie still, each one over other tumbleth. (II.i.) Or these two old ladies screaming at each other: Gammer. Thou wert as good as kiss my tail! Thou slut, thou cut, thou rakes, thou jakes! Will not shame make thee hide thee? Chat. Thou scald, thou bald, thou rotten, thou glutton! I will no longer chide thee, But I will teach thee to keep home. (III.iii) And the humor deepens when I remember that these are two teenage boys dressed as old women shouting these lines for an audience of teenage boys. This is what we call classic humor. Next week I switch to tragedy, with Gorboduc (1561) by Thomas Norton and Thomas Sackville, written and performed for young lawyers and full of important lessons and Classical learning and so on. It will be a tonal shift.
Dana Gioia speaks for me, though he has another sort of reunion in mind: “This is my past where no one knows me. These are my friends whom I can’t name— Here in a field where no one chose me, The faces older, the voices the same.” Our fifty-fifth high-school reunion was held at the Cleveland Yachting Club, about as alien an environment as I can imagine. The guard at the front gate asked if I knew where to go. Had I been there before? “I didn’t come from a yachting family,” I explained. I entered a dining room full of strangers, “my friends whom I can’t name,” some of whom were classmates for thirteen years. Slowly I started recognizing a few people, or at least figured out who they were by reading name tags. Youth and old age are like foreign countries often suspending diplomatic relations. The person I most hoped would attend walked in. I wrote about Lynn Kilbane four years ago after our previous reunion. She has retired after forty-five years as a registered nurse and lives in Cincinnati. We resumed that earlier conversation, and Lynn answered questions that had puzzled me for decades. A guy I had known since kindergarten, Norm Kuhar, died in 1974, just four years after we graduated. Vietnam, drugs, cancer? Lynn told me he committed suicide. Louise Koch died in 1972 of an undiagnosed blood disease. These are people whose images I carry in memory. I would recognize them, or at least their younger selves, if they walked in the room. From Lynn, after sixty-four years, I got a second kiss. “Must I at last solve my confusion, Or is confusion all I can feel?”