Direct links to Apple News sections
March 12, 2025 at 7:04 AM by Dr. Drang
Yes, the ads are annoying, but I’m coming around to Apple News. And I’ve found it’s better if I don’t have to scroll to get to my favorite sections or channels. Here are a couple of Shortcuts that get me directly to places I like to go in the app when I’m on my phone or iPad. I’ve saved them both to my home screen, so I can get where I want to go with just a tap.
Let’s start with Puzzles. Some months ago, I saw either a blog post or a toot on Mastodon that explained a simple way to make this Shortcut. I’d like to credit the person who created it, but I didn’t think I’d be writing about it, so I didn’t take note. Sorry about that, whoever you are.
When I say it’s simple, I’m not kidding. It’s a single step:1
Step | Action | Comment |
---|---|---|
1 | ![]() |
Open the given URL |
The URL in the
action ishttps://apple.news/puzzles
which is a nice, readable URL. And although the “documentation” for
(it’s just one sentence in the Shortcuts app) says it opens the URL in Safari, it doesn’t. The system is smarter than the people who write the Shortcuts docs, and it knows to open a URL like this in News.Like all Shortcuts, this one can be activated by an icon on the home screen. To make the icon, follow Apple’s directions, which are, thankfully, more complete than the info on the action.
More recently, I wanted a similar way to go directly to the Scientific American channel in News. I copied the Puzzles Shortcut and tried changing the URL to something equally nice, like
https://apple.news/scientificamerican
or
https://apple.news/sciam
but none of these nice URLs worked. So I went to the SciAm channel in News, tapped on the three-dot menu in the upper right corner, and chose
from the menu.This put the rather unfriendly URL,
https://apple.news/TveHp0EHGTXenwIFMSprU9g
on my clipboard, which I pasted into the
action, giving me this Shortcut:Step | Action | Comment |
---|---|---|
1 | ![]() |
Open the given URL |
I made a home screen icon for it, too, and it works as expected. The hardest part was choosing a “scientific” icon. I thought there’d be an Ehrlenmeyer flask or microscope icon in the list of choices, but no go. Then I saw the atom icon, which is perfect.
I was a little worried that the unfriendly URL was somehow unique to me, so I asked on Mastodon for others to try it. It seems to work for everyone, even if you don’t follow the SciAm channel. Thanks to Eric Wooten, keven humdrum, and Dr. Juande Santander-Vela for testing it for me.
Obviously, this is a technique you can extend to other parts of the News app. It’s often nice to skip over the political news to get to more pleasant topics.
Update 12 Mar 2025 11:41 AM
James Fee wanted to jump immediately to the Sports section. It wasn’t as easy as finding the link to Scientific American, but he figured it out. The URL is
https://apple.news/TYOpCNr2eTWS1swf0gCKkOQ
He shared it with me, so I’m sharing it with you.
-
Which is why I’m not bothering to make an iCloud link to the Shortcut. ↩
A Mac smart quote curiosity
March 8, 2025 at 4:49 PM by Dr. Drang
I didn’t turn on the smart quotes feature on any of my Macs until earlier this week. I probably should have, but I didn’t need them when writing blog posts or reports,1 and I did virtually all of my social media posting from my phone, which has had smart quotes turned on for years. Since turning Mac smart quotes on, I’ve noticed they behave differently in different apps, even when the apps all come from Apple. I haven’t seen anyone talk about these differences, so I thought I’d do a quick post on what I’ve learned.
As far as I know, the original smart quotes algorithm was created by David Dunham for his miniWRITER desk accessory way back in the early days of classic Mac OS. Here’s Dunham’s description of the algorithm:
As the user types, the characters typed are automatically replaced, according to the context of the insertion point, before being inserted into the text. A quote is turned into its left equivalent if it is at the beginning of the text, or if it follows a space, tab, return, or left punctuation (‘(,’ ‘[,’ ‘{,’ or ‘<’). A quote is also considered an opening quote if it follows an opening quote of the opposite type (as in: “‘sorry’ is all you have to say?” she asked).
Every other quotation mark becomes its right equivalent.
Despite its simplicity, this is a remarkably robust algorithm. The only time I’ve noticed it messing up is when you need an apostrophe at the beginning of a word. If, for example, you’re typing out A Visit from St. Nicholas, what should be
’Twas the night before Christmas…
turns into
‘Twas the night before Christmas…
Fortunately, apostrophes like this are uncommon in modern writing. ’Tisn’t very likely you’ll see this unless you do a lot of dialect writing.
Here’s how Apple’s smart quotes work in a few different apps:
Pages
Here, smart quotes do exactly what you’d expect. As soon as you type either '
or "
, you’ll see the appropriate curly version appear on the screen.
TextEdit
Things are almost the same in TextEdit, but not quite. As you type, you’ll see the straight versions appear momentarily, then be replaced by the curly version a fraction of a second later. The overall effect is the same as in Pages, but the slight delay is noticeable. By the way, smart quotes in Stickies (remember Stickies? it’s still here) works the same way as TextEdit.
Safari
Now we get into something interesting. In a web page’s text field, typing '
or "
will put the straight quote on the screen and it won’t become curly until you type something else. If it’s supposed to be an opening quotation mark, the curly version won’t appear until you’ve typed the next character. If it’s supposed to be a closing quotation mark or an apostrophe, the curly version won’t appear until you’ve typed some kind of “ending” character—typically a space, a return, or some kind of punctuation. This is usually not a problem, even though it looks a little weird. But if you end on a closing quote—or you don’t put a space or punctuation character after a contraction—the final quotation mark or apostrophe will never curl. Here’s a demonstration:
If you’re sending a message via Safari (or a web app made from Safari) this lack of curl could make your message look goofy, with a bunch of typographically correct apostrophes and quotation marks finished off with a straight one.
Why do different apps from Apple handle smart quotes in slightly different ways? Maybe because the apps were written at different times by different teams and they didn’t share code because the excessively secretive Apple keeps its teams separate? Or maybe there’s a good reason for them to work differently, but I don’t know what that would be.
-
Going back to when I used Linux, which didn’t have a system-wide smart quotes setting, I’ve had filters that convert straight quotes and apostrophes to curly ones prior to publishing. ↩
Bolts in Mathematica
March 4, 2025 at 9:32 AM by Dr. Drang
Yesterday’s post included three drawings I made using a combination of Mathematica, Acorn, and OmniGraffle. The roles that Acorn and OmniGraffle played were pretty obvious, but the Mathematica1 part is worth a description.
To get the stylized images of bolts, I combined three things:
- A black helix representing the thread peak.
- A blue helix representing the thread valley.
- A translucent cylinder representing the bolt shank.
The cylinder was easy. There’s a Cylinder
function built in to Mathematica. But the helices require a little math.
A helix can be defined through a set of parametric equations:
where , , , and are constants that define the geometry of the helix and is the single parameter whose value changes as we wind around the helix. This is a more complicated set of equations than are given in MathWorld’s Helix article, but that’s because we need to account for the “handedness” and the starting angles of the threads.
Here’s the Mathematica notebook with all the code needed to produce the drawings:
(The final three drawings in the notebook aren’t being rendered correctly here. I’ll discuss that in a bit.)
The notebook starts by defining the dimensions of a 1″ UNC bolt. The major diameter is 1″, the minor diameter is 0.8647″, and the pitch is 0.125″. These values are turned into the variables ro
, ri
, and p
. We then create the black helix via the ParametricPlot3D
function with equations
The negative sign in the equation for is what makes this helix right-handed instead of left-handed.
The blue helix is built the same way, but from the equations
Here, we need to include a starting angle of to insure that the peaks and valleys are 180° apart.
Unfortunately, the graphics in the rest of the embedded notebook above aren’t being rendered properly, even though the code is correct. The translucent cylinder by itself should look like this:
The three parts shown together in a perspective view with the bolt in a vertical orientation should look like this:
And the orthographic view, which is what I used to build the images in yesterday’s post, should look like this:
I don’t know why the embedded view isn’t accounting properly for the AmbientLight
directive. The three images above are what I see in my local notebook. The embedded notebook is coming from the Wolfram Cloud, which apparently needs to get some bugs fixed. I’ll have to send in a report.
The orthographic view was arrived at by setting the ViewPoint
to {0, ∞, 0}
. In other words, we’re looking down the y-axis from an infinite distance. In doing this, all the sight lines become parallel, which is what we need to see the thread alignment without any perspective effects.
After saving the orthographic view as a PNG image, I opened it in Acorn, selected all the white pixels with the Magic Wand tool, and turned them transparent. I then imported two copies of the transparent PNG into OmniGraffle, arranged them so the threads meshed, and added the annotations shown in yesterday’s post.
I suppose I could have done all the drawing in Mathematica, but that would’ve taken more time than just drawing one bolt there and doing all the subsequent manipulations in other apps. I try to choose apps based on what they’re good at.
-
Although the app on my Mac is now named Wolfram, it’s still called Mathematica in several places within the app and in online seminars run by Wolfram (the company). Thirty-five years of branding are hard to break. ↩
A SciAm bolt puzzle
March 3, 2025 at 6:26 AM by Dr. Drang
A week or so ago, Scientific American republished this Martin Gardner puzzle from 1958:
Two identical bolts are placed together so that their helical grooves intermesh (see illustration). If you move the bolts around each other as you would twiddle your thumbs, holding each bolt firmly by the head so that it does not rotate, will the heads move inward, move outward or remain the same distance from each other? The problem should, of course, be solved without resorting to an actual test.
Illustration by Amanda Montañez for Scientific American.
The “twiddle your thumbs” description is very good. because a key feature of the bolts’ movement is that even though they orbit one another, they don’t rotate. The vertical faces on their heads, for example, remain vertical throughout the motion.
Also important is that the bolts are identical, otherwise their threads wouldn’t mesh. Here’s a drawing from ANSI Standard ASME B1.1, Unified Inch Screw Threads, which shows the standard thread profile:
If the pitch, , the major diameter, , and minor diameter, , of the two bolts match—which they’ll only do if the bolts are identical—the bolts will fit together and can slide around each other without binding. If the dimensions don’t match, the bolts won’t fit together.
(By the way, although the B1.1 standard is for threads measured in inches, this thread profile applies to metric threads as well. The difference is that the pitch and diameters for metric threads will be given in millimeters.)
Gardner’s answer is
The heads of the twiddled bolts move neither inward nor outward. The situation is comparable to that of a person walking up an escalator at the same rate that it is moving down.
This is certainly true, but I don’t find it an especially helpful analogy. Why is the twiddling of bolts like a person walking up an escalator? A person and an escalator are two very different things, but the two bolts are identical.
Let’s look carefully at the geometry. Here’s a stylized drawing of the two bolts. The centers of the thread peaks are drawn as black helices; the centers of the thread valleys are drawn as blue helices; and the shank is drawn as a translucent cylinder so you can see the threads on the opposite sides of the bolts. I’ve left off the bolt heads because they don’t play any role in the engagement.
For what it’s worth, I’ve used the dimensions of a particular bolt to make the drawing: a 1″ coarse thread (UNC) bolt. The major diameter is 1″, the minor diameter is 0.8647″, and the thread pitch is 0.125″. Any bolt would do, but I wanted to use a real bolt. I’ll explain how I made the drawings in a later post.
We’re looking at the bolts directly from the side in an orthographic projection, so there are no perspective effects. This will help us see how the bolts move (or don’t move) axially as they orbit each other. One thing this view makes clear is that peaks and valleys are opposite one another; directly across from every peak is a valley.
In the current position, the bottom of the top bolt is engaged with the top of the bottom bolt. The peaks fit into the valleys. We’ll mark one peak of the top bolt and the valley of the bottom bolt it fits into.
Now imagine each bolt going through half an orbit, the top bolt swinging around behind and the bottom bolt coming up the front. Because neither bolt rotates, what’s now the top of the top bolt will end up in contact with what’s now the bottom of the bottom bolt. If you follow the black (peak) line of the top bolt from the purple dot along the near side up to the top, that’s what will remain in contact during the half-orbit. Similarly, if you follow the blue (valley) line of the bottom bolt from the purple dot along the far side (by looking through the translucent shank) down to the bottom, that’s what will remain in contact during the half-orbit.
In other words, the two points marked in the figure below—still drawn in the original configuration—are the points that will be in contact after the half-orbit.
The dashed vertical line shows that these two points are aligned before the half-orbit. And they must be aligned after the half-orbit because they’re in contact. Since they’re aligned at both the beginning and the end of the motion, the bolts don’t advance or retreat—they stay in the same left/right position. You could make the same argument using a quarter-orbit, a full orbit, or any multiple of an orbit. Because the geometry of the threads on the two bolts is identical, and because peaks and valleys are opposite one another, the bolts don’t go left or right during the twiddling motion.
Gardner wants you to work out the problem without grabbing a pair of bolts and trying it out. That would be cheating. But after solving the puzzles, it’s nice to see it work on real bolts.