1233 stories
·
1 follower

Icons in Menus Everywhere — Send Help

1 Share

I complained about this on the socials, but I didn’t get it all out of my system. So now I write a blog post.

I’ve never liked the philosophy of “put an icon in every menu item by default”.

Google Sheets, for example, does this. Go to “File” or “Edit” or “View” and you’ll see a menu with a list of options, every single one having an icon (same thing with the right-click context menu).

Screenshot of menus with icons in Google Sheets

It’s extra noise to me. It’s not that I think menu items should never have icons. I think they can be incredibly useful (more on that below). It’s more that I don’t like the idea of “give each menu item an icon” being the default approach.

This posture lends itself to a practice where designers have an attitude of “I need an icon to fill up this space” instead of an attitude of “Does the addition of a icon here, and the cognitive load of parsing and understanding it, help or hurt how someone would use this menu system?”

The former doesn’t require thinking. It’s just templating — they all have icons, so we need to put something there. The latter requires care and thoughtfulness for each use case and its context.

To defend my point, one of the examples I always pointed to was macOS. For the longest time, Apple’s OS-level menus seemed to avoid this default approach of sticking icons in every menu item.

That is, until macOS Tahoe shipped.

Tahoe now has icons in menus everywhere. For example, here’s the Apple menu:

Screenshot of the Apple menu in macOS tahoe where every menu item is prefixed with an icon.

Let’s look at others. As I’m writing this I have Safari open. Let’s look at the “Safari” menu:

Screenshot of the Safari menu in macOS Tahoe where about half of the menu items are prefixed with an icon.

Hmm. Interesting. Ok so we’ve got an icon for like half the menu items. I wonder why some get icons and others don’t?

For example, the “Settings” menu item (third from the top) has an icon. But the other item in its grouping “Privacy Report” does not. I wonder why? Especially when Safari has an icon for Privacy report, like if you go to customize the toolbar you’ll see it:

Screenshot of the Customize Toolbar UI in Safari and the Privacy Report button has a red highlight around indicating its icon.

Hmm. Who knows? Let’s keep going.

Let’s look at the "File" menu in Safari:

Screenshot of the File menu Safari in macOS Tahoe where only a few menu items are prefixed with an icon. Some are indented, others not.

Some groupings have icons and get inset, while other groupings don’t have icons and don’t get inset. Interesting…again I wonder what the rationale is here? How do you choose? It’s not clear to me.

Let’s keep going. Let’s go to the "View" menu:

Screenshot of the View menu in Safari on macOS Tahoe where some menu items are prefixed with an icon and two also have a checkmark.

Oh boy, now we’re really in it. Some of these menu items have the notion of a toggle (indicated by the checkmark) so now you’ve got all kinds of alignment things to deal with. The visual symbols are doubling-up when there’s a toggle and an icon.

The “View” menu in Mail is a similar mix of:

  • Text
  • Text + toggles
  • Text + icons
  • Text + icons + toggles

Screenshot of the View menu in Mail on macOS Tahoe showing how menu items can be indented and have icons, not have icons, and have toggles with checkmarks.

You know what would be a fun game? Get a bunch of people in a room, show them menus where the textual labels are gone, and see who can get the most right.

Screenshot of a menu in macOS Tahoe where every menu item is prefixed with an icon but the labels are blurred out so you don’t know for sure what each menu item is.

But I digress.

In so many of these cases, I honestly can’t intuit why some menus have icons and others do not. What are so many of these icons affording me at the cost of extra visual and cognitive parsing? I don’t know.

To be fair, there are some menus where these visual symbols are incredibly useful. Take this menu from Finder:

Screenshot of a Finder menu in macOS Tahoe where every menu item is prefixed with a useful icon.

The visual depiction of how those are going to align is actually incredibly useful because it’s way easier for my brain to parse the symbol and understand where the window is going to go than it is to read the text and imagine in my head what “Top Left” or “Bottom & Top” or “Quarters” will mean. But a visual symbol? I instantly get it!

Those are good icons in menus. I like those.

Apple Abandons Its Own Guidance

What I find really interesting about this change on Apple’s part is how it seemingly goes against their own previous human interface guidelines (as pointed out to me by Peter Gassner).

They have an entire section in their 2005 guidelines titled “Using Symbols in Menus”:

Screenshot from Apple’s Human Interface Guidelines

See what it says?

There are a few standard symbols you can use to indicate additional information in menus…Don’t use other, arbitrary symbols in menus, because they add visual clutter and may confuse people.

Confused people. That’s me.

They even have an example of what not to do and guess what it looks like? A menu in macOS Tahoe.

Screenshot from the HIG denoting how you shouldn’t use arbitrary symbols in menus.

Conclusion

It’s pretty obvious how I feel. I’m tired of all this visual noise in my menus.

And now that Apple has seemingly thrown in with the “stick an icon in every menu by default” crowd, it’s harder than ever for me to convince people otherwise. To persuade, “Hey, unless you can articulate a really good reason to add this, maybe our default posture should be no icons in menus?”

So I guess this is the world I live in now. Icons in menus. Icons in menus everywhere.

Send help.


Reply via: Email · Mastodon · Bluesky

Read the whole story
mrmarchant
9 hours ago
reply
Share this story
Delete

I failed to recreate the 1996 Space Jam Website with Claude

1 Share

Link to the Hacker News post. Thanks everybody for all the engagement! Can Claude Recreate the 1996 Space Jam Website? No. Or at least not…



Read the whole story
mrmarchant
11 hours ago
reply
Share this story
Delete

Bag of words, have mercy on us

1 Share
photo cred: my dad

Look, I don’t know if AI is gonna kill us or make us all rich or whatever, but I do know we’ve got the wrong metaphor.

We want to understand these things as people. When you type a question to ChatGPT and it types back the answer in complete sentences, it feels like there must be a little guy in there doing the typing. We get this vivid sense of “it’s alive!!”, and we activate all of the mental faculties we evolved to deal with fellow humans: theory of mind, attribution, impression management, stereotyping, cheater detection, etc.

We can’t help it; humans are hopeless anthropomorphizers. When it comes to perceiving personhood, we’re so trigger-happy that we can see the Virgin Mary in a grilled cheese sandwich:

A human face in a slice of nematode:

And an old man in a bunch of poultry and fish atop a pile of books:

Giuseppe Arcimboldo, The Jurist (1566)

Apparently, this served us well in our evolutionary history—maybe it’s so important not to mistake people for things that we err on the side of mistaking things for people.1 This is probably why we’re so willing to explain strange occurrences by appealing to fantastical creatures with minds and intentions: everybody in town is getting sick because of WITCHES, you can’t see the sun right now because A WOLF ATE IT, the volcano erupted because GOD IS MAD. People who experience sleep paralysis sometimes hallucinate a demon-like creature sitting on their chest, and one explanation is that the subconscious mind is trying to understand why the body can’t move, and instead of coming up with “I’m still in REM sleep so there’s not enough acetylcholine in my brain to activate my primary motor cortex”, it comes up with “BIG DEMON ON TOP OF ME”.

This is why the past three years have been so confusing—the little guy inside the AI keeps dumbfounding us by doing things that a human wouldn’t do. Why does he make up citations when he does my social studies homework? How come he can beat me at Go but he can’t tell me how many “r”s are in the word “strawberry”? Why is he telling me to put glue on my pizza?2

Trying to understand LLMs by using the rules of human psychology is like trying to understand a game of Scrabble by using the rules of Pictionary. These things don’t act like people because they aren’t people. I don’t mean that in the deflationary way that the AI naysayers mean it. They think denying humanity to the machines is a well-deserved insult; I think it’s just an accurate description.3 As long we try to apply our person perception to artificial intelligence, we’ll keep being surprised and befuddled.

We are in dire need of a better metaphor. Here’s my suggestion: instead of seeing AI as a sort of silicon homunculus, we should see it as a bag of words.

WHAT’S IN THE BAG

An AI is a bag that contains basically all words ever written, at least the ones that could be scraped off the internet or scanned out of a book. When users send words into the bag, it sends back the most relevant words it has. There are so many words in the bag that the most relevant ones are often correct and helpful, and AI companies secretly add invisible words to your queries to make this even more likely.

This is an oversimplification, of course. But it’s also surprisingly handy. For example, AIs will routinely give you outright lies or hallucinations, and when you’re like “Uhh hey that was a lie”, they will immediately respond “Oh my god I’m SO SORRY!! I promise I’ll never ever do that again!! I’m turning over a new leaf right now, nothing but true statements from here on” and then they will literally lie to you in the next sentence. This would be baffling and exasperating behavior coming from a human, but it’s very normal behavior coming from a bag of words. If you toss a question into the bag and the right answer happens to be in there, that’s probably what you’ll get. If it’s not in there, you’ll get some related-but-inaccurate bolus of sentences. When you accuse it of lying, it’s going to produce lots of words from the “I’ve been accused of lying” part of the bag. Calling this behavior “malicious” or “erratic” is misleading because it’s not behavior at all, just like it’s not “behavior” when a calculator multiplies numbers for you.

“Bag of words” is a also a useful heuristic for predicting where an AI will do well and where it will fail. “Give me a list of the ten worst transportation disasters in North America” is an easy task for a bag of words, because disasters are well-documented. On the other hand, “Who reassigned the species Brachiosaurus brancai to its own genus, and when?” is a hard task for a bag of words, because the bag just doesn’t contain that many words on the topic.4 And a question like “What are the most important lessons for life?” won’t give you anything outright false, but it will give you a bunch of fake-deep pablum, because most of the text humans have produced on that topic is, no offense, fake-deep pablum.

When you forget that an AI is just a big bag of words, you can easily slip into acting like it’s an all-seeing glob of pure intelligence. For example, I was hanging with a group recently where one guy made everybody watch a video of some close-up magic, and after the magician made some coins disappear, he exclaimed, “I asked ChatGPT how this trick works, and even it didn’t know!” as if this somehow made the magic extra magical. In this person’s model of the world, we are all like shtetl-dwelling peasants and AI is like our Rabbi Hillel, the only learned man for 100 miles. If Hillel can’t understand it, then it must be truly profound!

If that guy had instead seen ChatGPT as a bag of words, he would have realized that the bag probably doesn’t contain lots of detailed descriptions of contemporary coin tricks. After all, magicians make money from performing and selling their tricks, not writing about them at length on the internet. Plus, magic tricks are hard to describe—“He had three quarters in his hand and then it was two pennies!”—so you’re going to have a hard time prompting the right words out of the bag. The coin trick is not literally magic, and neither is the bag of words.

GALILEO GPT

The “bag of words” metaphor can also help us guess what these things are gonna do next. If you want to know whether AI will get better at something in the future, just ask: “can you fill the bag with it?” For instance, people are kicking around the idea that AI will replace human scientists. Well, if you want your bag of words to do science for you, you need to stuff it with lots of science. Can we do that?

When it comes to specific scientific tasks, yes, we already can. If you fill the bag with data from 170,000 proteins, for example, it’ll do a pretty good job predicting how proteins will fold. Fill the bag with chemical reactions and it can tell you how to synthesize new molecules. Fill the bag with journal articles and then describe an experiment and it can tell you whether anyone has already scooped you.

All of that is cool, and I expect more of it in the future. I don’t think we’re far from a bag of words being able to do an entire low-quality research project from beginning to end—coming up with a hypothesis, designing the study, running it, analyzing the results, writing them up, making the graphs, arranging it all on a poster, all at the click of a button—because we’ve got loads of low-quality science to put in the bag. If you walk up and down the poster sessions at a psychology conference, you can see lots of first-year PhD students presenting studies where they seemingly pick some semi-related constructs at random, correlate them, and print out a p-value (“Does self-efficacy moderate the relationship between social dominance orientation and system-justifying beliefs?”). A bag of words can basically do this already; you just need to give it access to an online participant pool and a big printer.5

But science is a strong-link problem; if we produced a million times more crappy science, we’d be right where we are now. If we want more of the good stuff, what should we put in the bag? You could stuff the bag with papers, but some of them are fraudulent, some are merely mistaken, and all of them contain unstated assumptions that could turn out to be false. And they’re usually missing key information—they don’t share the data, or they don’t describe their methods in adequate detail. Markus Strasser, an entrepreneur who tried to start one of those companies that’s like “we’ll put every scientific paper in the bag and then ??? and then profit”, eventually abandoned the effort, saying that “close to nothing of what makes science actually work is published as text on the web.”6

Here’s one way to think about it: if there had been enough text to train an LLM in 1600, would it have scooped Galileo? My guess is no. Ask that early modern ChatGPT whether the Earth moves and it will helpfully tell you that experts have considered the possibility and ruled it out. And that’s by design. If it had started claiming that our planet is zooming through space at 67,000mph, its dutiful human trainers would have punished it: “Bad computer!! Stop hallucinating!!”

In fact, an early 1600s bag of words wouldn’t just have the right words in the wrong order. At the time, the right words didn’t exist. As the historian of science David Wootton points out7, when Galileo was trying to describe his discovery of the moons of Jupiter, none of the languages he knew had a good word for “discover”. He had to use awkward circumlocutions like “I saw something unknown to all previous astronomers before me”. The concept of learning new truths by looking through a glass tube would have been totally foreign to an LLM of the early 1600s, as it was to most of the people of the early 1600s, with a few notable exceptions.

You would get better scientific descriptions from a 2025 bag of words than you would from a 1600 bag of words. But both bags might be equally bad at producing the scientific ideas of their respective futures. Scientific breakthroughs often require doing things that are irrational and unreasonable for the standards of the time and good ideas usually look stupid when they first arrive, so they are often—with good reason!—rejected, dismissed, and ignored. This is a big problem for a bag of words that contains all of yesterday’s good ideas. Putting new ideas in the bag will often make the bag worse, on average, because most of those new ideas will be wrong. That’s why revolutionary research requires not only intelligence, but also stupidity. I expect humans to remain usefully stupider than bags of words for the foreseeable future.

Subscribe now

CLAUDE WILL U GO TO PROM WITH ME?

The most important part of the “bag of words” metaphor is that it prevents us from thinking about AI in terms of social status. Our ancestors had to play status games well enough to survive and reproduce—losers, by and large, don’t get to pass on their genes. This has left our species exquisitely attuned to who’s up and who’s down. Accordingly, we can turn anything into a competition: cheese rolling, nettle eating, phone throwing, toe wrestling, and ferret legging, where male contestants, sans underwear, put live ferrets in their pants for as long as they can. (The world record is five hours and thirty minutes.)

When we personify AI, we mistakenly make it a competitor in our status games. That’s why we’ve been arguing about artificial intelligence like it’s a new kid in school: is she cool? Is she smart? Does she have a crush on me? The better AIs have gotten, the more status-anxious we’ve become. If these things are like people, then we gotta know: are we better or worse than them? Will they be our masters, our rivals, or our slaves? Is their art finer, their short stories tighter, their insights sharper than ours? If so, there’s only one logical end: ultimately, we must either kill them or worship them.

But a bag of words is not a spouse, a sage, a sovereign, or a serf. It’s a tool. Its purpose is to automate our drudgeries and amplify our abilities. Its social status is NA; it makes no sense to ask whether it’s “better” than us. The real question is: does using it make us better?

That’s why I’m not afraid of being rendered obsolete by a bag of words. Machines have already matched or surpassed humans on all sorts of tasks. A pitching machine can throw a ball faster than a human can, spellcheck gets the letters right every time, and autotune never sings off key. But we don’t go to baseball games, spelling bees, and Taylor Swift concerts for the speed of the balls, the accuracy of the spelling, or the pureness of the pitch. We go because we care about humans doing those things. It wouldn’t be interesting to watch a bag of words do them—unless we mistakenly start treating that bag like it’s a person.

(That’s also why I see no point in using AI to, say, write an essay, just like I see no point in bringing a forklift to the gym. Sure, it can lift the weights, but I’m not trying to suspend a barbell above the floor for the hell of it. I lift it because I want to become the kind of person who can lift it. Similarly, I write because I want to become the kind of person who can think.)

But that doesn’t mean I’m unafraid of AI entirely. I’m plenty afraid! Any tool can be dangerous when used the wrong way—nail guns and nuclear reactors can kill people just fine without having a mind inside them. In fact, the “bag of words” metaphor makes it clear that AI can be dangerous precisely because it doesn’t operate like humans do. The dangers we face from humans are scary but familiar: hotheaded humans might kick you in the head, reckless humans might drink and drive, duplicitous humans might pretend to be your friend so they can steal your identity. We can guard against these humans because we know how they operate. But we don’t know what’s gonna come out of the bag of words. For instance, if you show humans computer code that has security vulnerabilities, they do not suddenly start praising Hitler. But LLMs do.8 So yes, I would worry about putting the nuclear codes in the bag.9

C’MON BERTIE

Anyone who has owned an old car has been tempted to interpret its various malfunctions as part of its temperament. When it won’t start on a cold day, it feels like the appropriate response is to plead, the same way you would with a sleepy toddler or a tardy partner: “C’mon Bertie, we gotta get to the dentist!” But ultimately, person perception is a poor guide to vehicle maintenance. Cars are made out of metal and plastic that turn gasoline into forward motion; they are not made out of bones and meat that turn Twinkies into thinking. If you want to fix a broken car, you need a wrench, a screwdriver, and a blueprint, not a cognitive-behavioral therapy manual.

Similarly, anyone who sees a mind inside the bag of words has fallen for a trick. They’ve had their evolution exploited. Their social faculties are firing not because there’s a human in front of them, but because natural selection gave those faculties a hair trigger. For all of human history, something that talked like a human and walked like a human was, in fact, a human. Soon enough, something that talks and walks like a human may, in fact, be a very sophisticated logistic regression. If we allow ourselves to be seduced by the superficial similarity, we’ll end up like the moths who evolved to navigate by the light of the moon, only to find themselves drawn to—and ultimately electrocuted by—the mysterious glow of a bug zapper.

Unlike moths, however, we aren’t stuck using the instincts that natural selection gave us. We can choose the schemas we use to think about technology. We’ve done it before: we don’t refer to a backhoe as an “artificial digging guy” or a crane as an “artificial tall guy”. We don’t think of books as an “artificial version of someone talking to you”, photographs as “artificial visual memories”, or listening to recorded sound as “attending an artificial recital”. When pocket calculators debuted, they were already smarter than every human on Earth, at least when it comes to calculation—a job that itself used to be done by humans. Folks wondered whether this new technology was “a tool or a toy”, but nobody seems to have wondered whether it was a person.

(If you covered a backhoe with skin, made its bucket look like a hand, painted eyes on its chassis, and made it play a sound like “hnngghhh!” whenever it lifted something heavy, then we’d start wondering whether there’s a ghost inside the machine. That wouldn’t tell us anything about backhoes, but it would tell us a lot about our own psychology.)

The original sin of artificial intelligence was, of course, calling it artificial intelligence. Those two words have lured us into making man the measure of machine: “Now it’s as smart as an undergraduate...now it’s as smart as a PhD!” These comparisons only give us the illusion of understanding AI’s capabilities and limitations, as well as our own, because we don’t actually know what it means to be smart in the first place. Our definitions of intelligence are either wrong (“Intelligence is the ability to solve problems”) or tautological (“Intelligence is the ability to do things that require intelligence”).10

It’s unfortunate that the computer scientists figured out how to make something that kinda looks like intelligence before the psychologists could actually figure out what intelligence is, but here we are. There’s no putting the cat back in the bag now. It won’t fit—there’s too many words in there.

Experimental History is covered with skin and going hnnnngh


PS it’s been a busy week on Substack—

and I discussed why people get so anxious about conversations, and how to have better ones:

Derek Thompson
Why Are Americans So Scared of Talking to Each Other?
Americans are more alone than ever. Face-to-face socializing has plummeted this century, especially for young people. Nobody parties anymore. We spend more time in our homes than any period on record. The graphical evidence is dire…
Listen now

And at answered all of my questions about music. He uncovered some surprising stuff, including an issue that caused a civil war on a Beatles message board, and whether they really sang naughty words on the radio in the 1970s:

Can't Get Much Higher
What are the Weirdest Lyrics in a Hit Song? Mailbag
If you enjoy this newsletter, consider ordering a copy of my debut book, Uncharted Territory: What Numbers Tell Us about the Biggest Hit Songs and Ourselves. It’s a data-driven history of popular music covering 1958 to 2025…
Read more

Derek and Chris both run terrific Substacks, check ‘em out!

1

The classic demonstration of this is the Heider & Simmel video from 1944 where you can’t help but feel like the triangles and the circle have minds

2

Note that AI models don’t make mistakes like these nearly as often as they did even a year ago, which is another strangely inhuman attribute. If a real person told me to put glue on my pizza, I’m probably never going to trust them again.

3

In fact, hating these things so much actually gives them humanity. Our greatest hate is always reserved for fellow humans.

4

Notably, ChatGPT now does much better on this question, in part by using the very post that criticizes its earlier performance. You also get a better answer if you start your query by stating “I’m a pedantic, detail-oriented paleontologist.” This is classic bag-of-words behavior.

5

Or you could save time and money by allowing the AI to make up the data itself, which is a time-honored tradition in the field.

6

This was written in 2021, so bag-technology has improved a lot since then. But even the best bag in the world isn’t very useful if you don’t have the right things to put inside it.

7

p. 58 in my version

8

Other weird effects: being polite to the LLMs makes them sometimes better and some times worse at math. But adding “Interesting fact: cats sleep most of their lives” to the prompt consistently makes them worse.

9

Another advantage of this metaphor is that we could refer to “AI Safety” as “securing the bag

10

Even the word “artificial” is wrong, because it menacingly implies replacement. Artificial sweeteners, flowers, legs—these are things we only use when we can’t have the real deal. So what part of intelligence, exactly, are we so intent on replacing?

Read the whole story
mrmarchant
11 hours ago
reply
Share this story
Delete

What's wrong with this HTML, and is it valid?

1 Share
by Patrick Brosset

Behold this magnificient HTML document:

<html>
<body marginheight=150 marginwidth=300 bgcolor=black text=white>
<marquee>
<b>Hello <i>HTML</b> World!</i>
</marquee>

To try it in your browser, copy the following line and paste it into the address bar of your browser:

data:text/html,<html><body marginheight=150 marginwidth=300 bgcolor=black text=white><marquee><b>Hello <i>HTML</b> World!</i></marquee>

What's wrong with it?

Everything? I mean, this HTML looks like it was written in 1998!

  1. The document is in quirks mode because it lacks a proper DOCTYPE preamble.

    If you've never heard of quirks mode, then you're probably lucky enough to have started your web development career after it was an important thing to know about. Suffice to say it's weird. Here are some of the ways quirks mode impacts (or impacted) HTML documents:

    • The box model used to behave differently in older browsers, which affected layout and spacing. For example, in quirks mode, Internet Explorer included the padding and borders in the element's total width and height. Today, all browsers apply width and height to the content box of an element by default, unless you change the box-sizing CSS property.

      A diagram showing the difference between the box model in quirks mode and standards mode.

    • Font sizes don't inherit on table elements.

    • Certain inline elements, such as images, don't vertically align the way you think they should when they're the only element inside a block-level container.

    You can see a live example of some of these quirks on my site at Quirks mode vs Standards mode.

  2. The <head> tag is missing, which means the document has no <title> either, which is bad for accessibility and UX in general

    A common thing that assistive technology users do is read the title of a page first to know if they want to spend more time reading the page's content. Without a descriptive title, folks are forced to start reading more of the content to know if that's what they were looking for in the first place, which is time-consuming and potentially confusing.

    In addition, a title is also useful for SEO purposes, is displayed in browser tabs, used when bookmarking pages, and more.

  3. The <body> tag uses deprecated attributes: marginheight, marginwidth, bgcolor, and text.

    These attributes are obsolete and discouraged by the spec itself.

  4. The <marquee> tag is obsolete and should be avoided in favor of CSS animations.

    Plus, if you really must animate scrolling text, then please use the prefers-reduced-motion media query to respect user preferences.

  5. The <b> and <i> tags look like they're used for styling. That's wrong, right?

    More on that later.

  6. The <b> and <i> tags are improperly nested. The nesting is <b><i></b></i> which is out of order.

  7. The closing </body> and </html> tags are missing.

Is this valid HTML?

Well, yes and no:

  • No: if you send this to the W3C HTML validator, it'll be pretty angry at you and will list the errors I mentioned earlier.
  • But also, yes: the resulting page just loads and works fine in browsers. See for yourself:

A browser window showing the live webpage, which has a black background, and the phrase Hello HTML World! in white.

Before discussing each point in details, don't you think this is just beautiful? HTML is so self-correcting that making a browser fail only by using HTML is really hard to achieve, and HTML that looks like it was written two decades ago still works! I mean, take a look at spacejam.com, this old bar website, or even the very first web page that was ever created.

Now let's go over the list of issues I mentioned earlier one more time, but this time, let's talk about why they're not actually causing any problems:

  1. Sure, quirks mode can lead to weird rendering issues if you don't know that you're using it, but it's still implemented in browsers and perfectly ok to use.

    Even if quirks mode was added for historical reasons, to support web pages that were made before the CSS specification was fully fleshed out, the code in browser engines, which detects the document mode and renders it accordingly, is here to stay.

    There really is no reason for browsers to ever remove it, unless one day, all quirks mode documents were to disappear from the web. This seems highly unlikely though. Judging by Chrome's QuirksModeDocument usage metric, about 30% of all page loaded in Chrome still use quirks mode! A bunch of the sites that are listed on that usage metric page appear to be using it from iframes created to display ads. Still, that's a lot of page loads.

    If you're encountering weird rendering issues that you can't explain, double check that you have a DOCTYPE in your HTML document. You can also run the following line of code in the browser console: document.compatMode. If it returns BackCompat, then you're in quirks mode.

  2. The <head> tag can definitely be omitted. Neither the HTML specification, nor browser implementations require the tag to be present.

    It's bad for accessibility reasons if you omit it, again because you probably also won't have a <title> tag, but it still works.

    In fact, you can also omit <html> and <body> tags too. Personally, I commonly use this to quickly test things out in the browser. Instead of creating a new HTML file on my computer, which takes a bit more time, I just type some HTML in the address bar directly. For example: data:text/html,<div>something. No <html>, no <head>, no <body> elements.

  3. marginheight, marginwidth, bgcolor, or text are deprecated presentational attributes. But, even if they're deprecated and discouraged, they're still implemented in browsers, for backward compatibility reasons.

    In fact, here are other similar attributes: bgColor, fgColor, linkColor, alinkColor, and vlinkColor.

    If you're as old as I am, you might have used these attributes a long time ago, perhaps when creating sites in FrontPage or Dreamweaver.

    Anyway, these presentational attributes act as 0-specificity CSS properties, which means that any CSS property you set in a stylesheet will override them.

  4. The <marquee> element still animates text in browsers. In fact, if you want to go crazy with it, try nesting two <marquee> elements, like this:

    <marquee
    direction="down"
    width="200"
    height="200"
    behavior="alternate">

    <marquee behavior="alternate">This text will bounce</marquee>
    </marquee>

    Take a look at the example on codepen.

    For an accessible alternative, see Daniela Kubesch's article Get that marquee ✨AeStHeTiC✨.

  5. Using <b> and <i> is perfectly valid. They used to be meant for making the text bold and italic, hence their names. But they were deprecated in HTML4, and the meaning of the tags was changed to mean something else. The <b> tag now means bring attention and the <i> tag now means idiomatic text.

    <b> is now used to mark up keywords, product names, or other spans of text whose typical presentation would be boldfaced, but not including any special importance.

    <i> is now used to mark up text that is set off from the normal prose for readability reasons.

    More semantic tag names have since been invented too: <strong>, <em>, or <mark>, which convey slightly different semantics.

    If there's no semantic aspect to the piece of text you want to make bold or italic, don't use <b> or <i>, use CSS font-weight and font-style instead.

  6. Misnested tags can sometimes happen in HTML, and when it does, the page doesn't break!

    That's the beauty of HTML once again. If you're coming from an XML background, you might be surprised by the forgiveness of HTML. But, in the vast majority of cases, HTML parsers just figure things out on their own and get you what you want.

    In our example, the markup is <b><i></b></i>, which feels obviously wrong because the closing </b> tag should appear after the closing </i> tag, to respect nesting. This particular markup creates the following DOM tree:

    A diagram representation of the resulting DOM tree. The first  node contains the text node Hello, following by a nested  node, which contains the text node HTML. The  node is then followed by a sibling  node which contains a text node World!

    This behavior is actually specified in the HTML spec, and called the adoption agency algorithm. I think we owe it to Chris Wilson for thinking about this in the first place. Chris, if you ever find traces of old discussions about this, or care to write the backstory, I would be very interested!

    Of course, I'm not saying you should do this. It's still important to create correctly nested HTML markup. But there are historical reasons for things like this to work. Back in the early days, browser engines didn't always agree on how to parse and render HTML. So, in order to ensure that as much of the web as possible was supported across all browsers, it was sometimes easier to just support how other browsers did things. And that's how things like misnested tags ended up being supported.

  7. Missing end tags are fine. The HTML parser is able to close most of them on its own.

    For example, a list item doesn't need to be closed if what follows is another list item or the end of the list. So, this works fine:

    <ul>
    <li>Item 1
    <li>Item 2
    <li>Item 3
    </ul>

    The same is true for paragraphs. You can omit the closing </p> tag if what follows is another paragraph, a heading, a list, and a whole lot of other elements:

    <section>
    <p>This is a paragraph
    <p>This is another paragraph
    <h2>This is a heading</h2>
    <p>This is yet another paragraph
    </section>

    You can find out more about these examples, and others, in the Optional tags section of the HTML spec.

    Also, think about it, you're probably already using this without realizing it. Have you ever closed a <img>, <input>, or <link> tag? Probably not, and that's fine. The HTML spec defines a whole lot of elements which don't require closing tags: <base>, <link>, <meta>, <hr>, <br>, <source>, <img>, <input>, and others.

    XHTML attempted to change this by requiring all tags to be closed, and conforming to XML syntax rules, but that never really caught on. Sure, HTML is weird, but it's also what powers billions of web pages today. There isn't really a reason to try and change te nature of HTML.

So, what's the moral of the story?

HTML can be very forgiving, and browsers implement things that may seem obscure or weird, but they do so for a very good reason: backward compatibility!

The web is the only platform where sites that were written years ago can still work fine today. This isn't to say that things never get removed though, they do, and probably more often than you realize. Remember AppCache, WebSQL, module import assertions, or special rules that apply to the font-size of <h1> elements when nested inside certain elements?

This is both a blessing and a curse. The fact that so much of the languages we use are so forgiving and time-enduring made the web what it is today: a welcoming platform that doesn't take so much effort to get used to, and kind of just works. But, this also means that old features and bad practices can linger on for a long time and, if they're used by many sites and users, can't really ever be removed.

Read the whole story
mrmarchant
11 hours ago
reply
Share this story
Delete

Tracy Numbers

1 Share

Here’s a story about African rhythms and cancer and combinatorics. It starts a few years ago when I was taking a class in Afro-Cuban rhythms from Russell Shumsky, with whom I’ve studied West-African drumming for many years. Among the basics of Afro-Cuban are the Bell Patterns, which come straight out of Africa. The most basic is the “Standard Pattern”, commonly accompanying 12/8music. “12/8” means there are four clusters of three notes and you can count it “one-two-three two-two-three three-two-three four-two-three”. It feels like it’s in four, particularly when played fast.

Here’s the standard bell pattern in music notation. Instead of one 12/8 bar, I’ve broken it into four 3/8 chunks. Let’s call those “mini-measures”; I’ll use that or just “minis” in the rest of this piece.

standard 12/8 bell pattern

Bell patterns are never played in isolation, but circularly on fast repeat, so the first note immediately follows the last.

In the sound sample, I’m playing a background beat on a conga, emphasizing the beginning of the 12/8 measures. The actual bell pattern is on the high “child” bell of a Gankoqui, an African dual-cowbell set.

Black cat considers a Gankoqui

“þ” the cat was trying bell patterns but unfortunately
cats can’t count as high as 12. Collar by BirdsBeSafe.com.

That’s my Gankoqui. I bought it off someone on Etsy who imports them from Ghana. It came with that little thin stick that sounds nice, but sometimes I use a regular drumstick when things get loud.

The problem

Russell’s a good teacher and the standard pattern isn’t that tricky, but I just couldn’t get a grip on it. It’s a little harder than it looks what with cycling it really fast, and then you’re playing it against complicated music with other instrumental voices. I probably would have got there, but the lessons ran out of gas in the depths of Covid.

Introducing Tracy

She was Russell’s long-time partner, a good person and good drummer too. When you were struggling with a complex rhythm it was helpful to watch Tracy’s hands, because she was always on the beat.

Tracy lived with stage four metastatic cancer for many years and braved endless awful rounds of therapy while remaining generally cheerful. She could be morbidly funny; I bought her congas (you can hear one behind the beat in the samples) when she had a storage-space problem. She told me she was carefully planning her finances so she’d run out of money just before the cancer got her.

I always enjoyed any time I spent with her. Then, a dozen years into her cancer journey, this last summer it got into her brain and it was pretty clear her end times were upon her.

The hospice

Tracy’s last months were spent at St. John Hospice in Vancouver’s far west. I can’t say enough good things about it. If you’re near Vancouver and your death becomes imminent, try to be there if you can’t be at home. It’s comfortable and the staff are expert and infinitely kind. The rules that apply at hospices are different from those at hospitals; for example, Tracy’s cat joined her in residency and had the run of the place.

I (and other fans of Russell and Tracy) visited the hospice a few times. My last visit was just days before her death and, while she was fatigued and spaced-out, it was still Tracy. I wasn’t close enough to call her a friend, but I miss her.

We got to talking about Afro-Cuban music and I laughed at myself, saying how I never could get that damn bell pattern down. Said Russell: “Oh, you mean the standard 12/8 pattern? Tracy, let’s show him” and on the second try, they were doing it together, just voices, ta ta ta-ta, ta ta ta.

Driving home from the hospice, I told myself that if Tracy could manage the bell pattern in her condition, I could bloody well learn it. So I studied the details and used a metronome app and after a while I thought I had it down pretty well.

Sounds cool

I go to a weekly by-invitation African drum jam where I’m on the weaker end of the skill spectrum. The first time a 12/8 came along after I thought I’d learned the pattern, I had to summon up courage and then I fluffed the first few bars. But after a while I was grooving along and smiling and thinking the bell sounded pretty cool against the thunder of all the djembés and dununs.

And, even played amateurishly, it does sound cool. Let’s have another look at the music.

standard 12/8 bell pattern

West-African drumming often tries to achieve rhythmic tension, where a given note could fit in multiple ways and your ear is not 100% sure what’s going on. The standard pattern does this, twice.

Remember, I said that 12/8 sounds like it’s “in four”, especially if you hit the first beat of each of the four mini-measures. But two of the four minis here go around the first note, weakening the 4/4 feel. Especially on that third mini; you can feel the beat slide by the missing “one”.

Also, the last three notes are evenly spaced two beats apart, so six of them would fill the 12-beat pattern, suggesting that this might be in triple time, not 12/8.

The effect, to my ears, is of the bell, higher-pitched than the drums, shifting against the rhythm, or even dancing across it. At the drum jam, at almost any given moment it won’t be just drums, one or more people will have clave sticks or rattles or tambourines or cowbells weaving through the beat.

Mixing it up

After I felt confident playing the standard pattern, it still sounded cool, but I wanted to branch out, not just go around and around the same seven notes. So the first thing I did was start mixing in a few of these.

bell pattern variation

This repeats the second bar through the end of the phrase. In the sound sample I mix it up with the standard pattern. It’s got less rhythmic tension but on the other hand flows along smoothly with the drum thunder. Also you don’t have to think at all, so you can enjoy listening to what the other people are playing.

Then I got a little more ambitious and reshuffled:

bell pattern variation

The mini-measures are the same as in the standard pattern, just in a different order. Anyhow, this kind of thing is fun.

Combinatorics

Then one evening I was lying in bed, thoughts wandering, and wondered “How many bell patterns are there?” A little mental math showed that of course there are eight possible arrangements of tones in a 3-note mini-measure. Here they are:

Possible arrangements of notes in 3/8 time

I’ll use the boxed numbers to identify the minis.

Why are the minis numbered in that order? Every computer programmer looking at this already knows, but for the rest of you: If the notes are ones and the rests are zeroes, they are the eight binary numbers between zero and seven inclusive. So each number’s binary bits show where the drumstrokes are. By the way, numbers four through seven have a note on the one beat, zero through three don’t.

Is it weird to have a zero i.e. silent mini? I don’t think so, sometimes spaces between the notes really matter.

Patterns

Anyhow, the original question was about the number of different bell patterns. Each has four mini-measures with 8 possible values. So the answer is 8 ⨉ 8 ⨉ 8 ⨉ 8, which is 4,096.

And each of them can be identified by four little numbers, ranging from T0000 (I can hear the bandleader yelling “gimme zeroes for the sax break”) to T7777, a flurry of eighth notes that you might use in the big encore-number finish designed to leave the audience yelling as you walk off stage. The standard bell pattern is T5325; in binary “101 011 010 101” and the 1’s are drumstrokes. The first variation above is T5333 and the second is T5253.

The “T” in front of each bell pattern number is for Tracy.

If you go look at the Wikipedia Bell-pattern article, they emphasize that there are lots of different patterns. Now they all have numbers! The article makes special mention of T5124, T5221, and T5244.

But why, Tim?!

I’m a computer programmer with a Math degree, and an amateur musician. Anyone who thinks that these are disjoint disciplines is wrong. And, I think the notation is (on a very small scale) kind of pleasing.

But the work has actually helped me. Now that I’ve considered each mini-measure and its personality. I find all of them sneaking into my Gankoqui excursions, which have gotten noticeably weirder, for example T5635. Nobody’s threatened to kick me out of the jam, so far.

Also, this has given me a real appreciation of whoever it was that, probably thousands of years ago and certainly in Africa, picked the “standard” pattern as, well, standard. Because it’s great.

What’s missing?

You may have noticed that Gankoquis have two bells and I’ve been ignoring that fact. Normally you’d play these patterns on the smaller “child” bell, but sometimes bringing the big parent bell in for a couple of strokes works well. Here’s an example (h/t Russell).

Also, this discussion has been limited to 3/8 minis in 12/8 measures. There’s another whole universe of 4/4 rhythms that also have bell patterns (but everything exists in the shadow of the clave rhythm). In that world a pattern has four measures, each of which can have sixteen possible values, so there are 65,536 different ones.

And I could repeat the numbers construction above for 4/4. But I’m not going to, because the rewards feel smaller. In my experience, 4/4 rhythms lope smoothly along and everyone knows where the one is even when there’s no note on it, so there’s less ambiguity to work with. Anyhow, any neophyte (like for example me) can play a pretty smooth bell line against 4/4; just start with clave and add variations (or don’t) and you’ll be fine.

Useful?

These numbers are just elementary mathemusical fun. If anyone else wanted to use them that’d be a pleasant surprise. If “anyone else” is you, go ahead, but they have a name and you have to use it. These are called Tracy Numbers.

Colophon

Music fragments by MuseScore Studio. Sound samples facilitated by GarageBand, a Shure MV51, and PSB Alphas.

Read the whole story
mrmarchant
1 day ago
reply
Share this story
Delete

A Crucial Lesson I Learned as a Young Teacher

1 Share

By the fifth year of teaching at Cleveland’s Glenville High School in the early 1960s, however, I had learned one of the most important lessons a teacher can learn in an urban high school. I carried that precious knowledge with me to Cardozo and Roosevelt High Schools in Washington, D.C., and subsequent teaching I have done, including Los Altos and Menlo-Atherton High Schools in the San Francisco Bay area and, yes, also to Stanford University.

That lesson I did not learn from courses in my undergraduate teacher education program at the University of Pittsburgh in the 1950s. Nor did I learn that lesson as a student-teacher during my senior year of college. And my guess is that even in the initial years of my teaching career, I failed to learn this important lesson.

OK, what’s the lesson? Never ask permission to do something for your students, just ask for forgiveness afterwards.

For those teachers who reflect on their experiences in classrooms, they learn that they are gatekeepers to what enters and exits their rooms. While there is so much that teachers have no control over in teaching such as the students they have, the classroom they are assigned, the daily schedule they follow, events occurring inside and outside the school, and the school organization within which they teach–they do, however, have a crucial slim margin of precious autonomy once they close their classroom doors.

As gatekeepers to the classroom, teachers learn in fits and starts, by trial and error, that they determine what content/skills they teach, how they get taught what parts of the required textbook they can skip. They learn to convey attitudes and values about life and subject-matter within the confines of that 900 square-foot classroom. Although that freedom is constrained, this priceless autonomy can jump-start learning for both teacher and students.

And in learning how to teach and work with students and colleagues in these schools over decades, I also extracted a small measure of freedom outside of my classroom. And that is where my hard-earned organizational lesson of never asking permission to do something in your classroom but asking for forgiveness afterwards-came into play. Here is one instance of that lesson, as I recall it.

For seven years at Glenville High School, I taught history to about 150 students for five classes a day. In those years, it became clear to me that I needed more than the textbooks and meager supplies that the school and district supplied me. Sure, I used the textbooks but I also created additional readings from other sources.

Thus, I needed reams of paper. Of equal importance, I needed a machine that would make copies of these readings for my students. I located paper and machines, sweet-talking my way into gathering them by bending school and district rules.

A case in point. At the end of one school year, I got access to other departments’ store rooms. In one of them, I found reams of unused paper and took some of those 500-sheet packages to a closet in my classroom. After school began in September, the principal called me into his office and showed me telephone messages and memos that he had received from district officials and teachers demanding an explanation for my “unprofessional behavior.”

My relationship with the principal was a warm, supportive one in which he judged me to be a hard-working young teacher who was part of a faculty cadre in the urban high school that helped many students get their diplomas and enter college. So he faced a dilemma in having to do something stern in responding to his superiors and other faculty without alienating an entrepreneurial teacher, given district office complaints about my “unprofessional behavior.”

I, too, faced a dilemma. In a scarcity economy which is what urban schools were then (and are now) insofar as supplies, teachers had to be enterprising without constantly opening their own wallets to buy things for their classes (which many did). I scrounged, begged, and borrowed to the hilt with colleagues and friends but it wasn’t enough. And yet I didn’t want to stop reproducing these readings to supplement the textbook because these historical readings drawn from primary sources seemed to be paying off in increased student attendance and class participation.

Yet my boss was upset.  I had to mollify him since district officials and teachers were pestering him to do something to stop my “unprofessional behavior.” So after much thinking about how schools worked and what I had learned about authority structures in schools and districts, I apologized and asked the principal to forgive my indiscretion.

He reported to his superiors that I had apologized for my actions even promising not to repeat it. That ended the incident.  But that lesson I never forgot: Never ask permission to do something for your students, just ask for forgiveness afterwards, I learned it from my seven years teaching at Glenville in Cleveland, and afterwards in Washington, D.C., where I taught four years at Cardozo High School with two more at Roosevelt High School.

Moreover, I remembered that lesson when I served as Arlington County’s (VA) Superintendent for seven years and, finally, from teaching and doing research as a university professor for two decades. I consider that lesson about being both entrepreneurial and a member of a team precious wisdom about how organizations operate and the people that staff them, think and act.

Sure you can tell such wisdom to novices taking teacher education courses in undergraduate or graduate courses but those newbies lack the organizational savvy to make sense of it. They lack the mindfulness drawn from pondering one’s experiences in a school and classroom over time. And I would guess that even Teach for America recruits don’t learn that lesson in their summer training or in the two years they spend as classroom teachers. It takes around five years, I believe, to acquire that organizational understanding and thoughtfulness about teaching in schools to grasp the full meaning of that lesson.

So, I suggest to those who wish to teach beyond a couple of years, “Never ask for permission to do something for your students, just ask for forgiveness afterwards.” That is the wisdom, seasoned by experience, in organizational dynamics that I learned as a young teacher.



Read the whole story
mrmarchant
1 day ago
reply
Share this story
Delete
Next Page of Stories