Watch Workout widget worse

Greg Pierce, top turtle wrangler at Agile Tortoise, posted this to Mastodon last week:

Since updating to watchOS 26, about every third time I go to start a workout, I find later it didn’t start. The way the button animation swiping between workout types works creates an unnecessary delay activating the start button. Never had this problem before 26.

Is this just me?

No, Greg, it’s not just you.

The animation Greg’s talking about is the gradual appearance of the start button near the bottom of the screen when you get to the activity you want and stop swiping. I don’t think there’s a good way to record this, so you’ll have to imagine there’s a video here filling in between these two frames:

Watch Workout transition

The start button appears after only a second—maybe less—but it seems like a long time because your finger is right there ready to tap it. Also, in previous versions there was no delay, so we’ve been trained to tap as soon as the desired activity appears.

Which brings me to my main gripe about the new Workout interface: that there’s a start button at all. It used to be that items in the scrolling list of activities were themselves the buttons to start a workout. We didn’t have to wait for the start button because there wasn’t one. And because the tap target was the entire item, it was bigger and easier to hit. Now you actually have to tap the little round button to start a workout.

Like Greg, I often find myself several minutes into a workout when my watch taps me to ask if I want to start recording the activity. For me, I think this happens more often because my finger missed the start button than because I tapped too soon, but the new UI has introduced both problems.

Winter has made this problem worse. My most common workout now is an outdoor walk—kayaking and biking are off the table—which means that I have to push my coat and shirt sleeves up my arm to reveal the watch, then reach over with my index finger to tap the button. I’m not saying this is the most difficult thing in the world, but it’s more difficult than it needs to be. And the proof is that it’s more difficult than it used to be.


Some lotto math

I planned to talk about this post from Mathew Ingram, but things went in a different direction, and I learned something new.

The story is about a couple who recently won their second lottery prize of over £1 million. They won the EuroMillions Millionaire Maker back in 2018 and just won the UK National Lottery’s Lotto in November. According to the National Lottery operators, the odds of this are over 24 trillion to one. I was certain that this calculation had been done by multiplying the probabilities of each lottery win, and I meant to throw a little cold water on that.

First, that calculation would apply only if they played each lottery once, which I thought extremely unlikely. Also, it would apply only before their first win; after the first win, their odds of getting the second one are the same as anyone else’s.

I wanted to include the odds of both games and show the calculation, but I was derailed. According to this page, the odds of the EuroMillions game “depend on how many prizes are offered and how many tickets are sold, so they are always different.” Then I saw this page with a table of odds for the UK Lotto game and realized that I didn’t know how to reproduce it. That was kind of embarrassing, so I decided to dig in and force you to dig with me.

Here are the rules of the UK Lotto game: There are 59 balls, numbered 1–59. Six of these balls are chosen in a drawing. Players choose six numbers and win if two, three, four, five, or six of their numbers match the drawn balls.1 The winnings go up with more matches. It’s the same as the New York Lotto except that New York’s game doesn’t give out money for only two matches.

Six matches

The probability of matching all six balls was the one calculation I could do immediately. The number of ways to choose 6 items from a pool of 59 is

C659=(596)=59!6!53!=45,057,474

This is the number of combinations. It’s equal to the binomial coefficient, and there are different notations for it. I’m going to use Ckn for the balance of this post.

Since there’s only one way to match all 6 balls, the probability is

145,057,4742.2194×108

Lotteries like to express probabilities as “1 in n,” so this appears as “1 in 45,057,474” in the table.

Five matches

This is where I started having trouble. The probability of getting 5 matches is not 1/C559. The lottery math page on Wikipedia gives the right formula,

P[5matches]=C56C153C659

but I didn’t think much of its explanation. Other explanations I found in combinatorics texts didn’t fit with my way of thinking, either, but after reading a few, I was able to put together an explanation that stuck:

Separate the 59 balls into two groups: the “good” group consists of the 6 balls selected in the drawing and the “bad” group consists of the 53 other balls. My ticket has 6 numbers on it, 5 of which are in the good group and 1 is in the bad group. (I’ve emphasized the and because we’ll return to it soon.) The number of ways of getting 5 items from a group of 6 is

C56=6

The number of ways of getting one item from a group of 53 is

C153=53

In set theory and probability, and implies multiplication, so there are

C56C153=653=318

ways to get exactly 5 matches on my ticket. Therefore, the probability of getting exactly 5 matches is

P[5matches]=31845,057,474=537,509,5797.0577×106

There is no way to further reduce the fraction in this formula, so a lottery would express this as “1 in 141,690.17” or maybe just “1 in 141,690.”

Four matches

Now that I understand the formula, I can apply it again and again. For exactly four matching numbers, the probability is

P[4matches]=C46C253C659=3,4457,509,5790.00045875

which can be expressed as “1 in 2,179.85” or “1 in 2,180.”

Three matches

Here, the probability is

P[3matches]=C36C353C659=234,26022,528,7370.010398

which can be expressed as “1 in 96.17” or “1 in 96,” although rounding to just two digits might be a little too much.

Two matches

This probability is

P[2matches]=C26C453C659=1,464,12515,019,1580.097484

which can be expressed as “1 in 10.26” or “1 in 10.3.”

The bonus ball

The values calculated above match the odds table for 6, 4, 3, and 2 matches, but not for 5 matches or “5 numbers + Bonus Ball.” What’s that about?

UK Lotto odds table

As mentioned in the footnote above, there’s an additional wrinkle to the game. After the six good balls are drawn, a seventh “bonus ball” is drawn from the remaining 53 balls. If five of the numbers on your ticket match five of the six good balls, you get a chance to match the bonus ball. If your bad number matches the bonus ball, that pushes you up into the “5 numbers + Bonus Ball” tier; if it doesn’t, you stay in the “5 numbers” tier.

So if you matched five of the original six numbers, the probability of your bad number matching the bonus ball is simply 1/53 and the overall probability of getting into this tier is

P[5matches+bonus]=537,509,579(153)=17,509,5791.3316×107

which is the “1 in 7,509,579” shown in the table.

Similarly, the probability of your one bad number not matching the bonus ball is 52/53, so the overall probability of being in the “5 numbers” tier is

P[5matchesonly]=537,509,579(5253)=527,509,5796.9245×106

which is “1 in 144,414.98” or “1 in 144,415,” as shown in the table.

Final comments

Although the number of combinations is always an integer, the “1 in n” odds presented by lotteries are often rounded to the nearest integer, at least if n is large. I’d never realized that before.

In Mathematica, the Binomial function is the way to calculate Ckn. In Python, it’s the comb function in the math library. Both of these can return values well beyond the limit of 64-bit integers.

Learning how lottery odds are calculated may not be the best way to stave off senility, but it beats doing crossword puzzles.


  1. There’s an additional wrinkle involving a “bonus ball,” but we’ll get to that later. 


Keyboard Maestro episode on MPU

In the most recent episode of Mac Power Users, David and Stephen discuss Keyboard Maestro, a longtime favorite automation app and the main topic of at least three previous episodes of MPU. If you’re an ANIAT reader, it’s reasonably likely that you’re already using Keyboard Maestro, and you may think this is an episode of MPU you can safely skip. I certainly considered giving it a pass, but I’m glad I didn’t. I’ll bet there’s at least one nugget in the show that you’ll be glad to have heard.

For me, it was David’s use of Keyboard Maestro’s conflict palette. I’ve known about the conflict palette for years, but I’ve always thought of it in terms of its name: a way of resolving conflicting macros that have the same trigger. To me, these conflicts are mistakes: cases in which I’ve accidentally used the same trigger on two or more different macros.

But David treats the conflicts positively. He sees the conflict palette as a useful user interface tool, a way to avoid having to come up with distinct triggers for a number of closely related macros. It’s a way of reducing the number of keyboard shortcuts you have to remember while still being able to quickly launch the macro you want.

Keyboard Maestro conflict palette example

You could, of course, build a macro that uses the Prompt For User Input action to set up a selection of other macros to run, but it’s much easier to use the conflict palette. And it’s much much easier to add new macros to the set at a later date.

I feel compelled to comment on a couple of other things that came up in the podcast:

First, there was David breaking bad on Shortcuts. David is the most tolerant Apple user I know, so when he starts talking smack, you know he’s been pushed beyond the limits anyone else would accept. As an avowed hater of Shortcuts, I loved it.

Second, Stephen has been using Keyboard Maestro in place of TextExpander. This works because typed text is one of the trigger categories that KM accepts. When David asked if there were any downsides to using Keyboard Maestro instead of TextExpander, Stephen couldn’t come up with any problems other than the initial pain of reimplementing your snippets in a new app. As someone who did exactly what Stephen did—on two separate occasions—I have thoughts:


One last note: I’ve included links above to a couple of the Keyboard Maestro Wiki pages. I don’t know what’s going on over there, but when I visited those pages they took an ungodly amount of time to load—like, 56k modem time. Maybe that’s just a temporary problem, but don’t be surprised if it seems like your browser has hung.


There’s nothing you and I won’t do

I’ve talked about area moments of inertia in the past couple of posts. Today, thanks to Phil Plait, resident astronomer at Scientific American, I have an excuse to talk about mass moments of inertia, the kind you learned about in first semester physics class.

Plait’s article today takes on the Modern English song “I Melt with You” and looks into the energy it would take to stop the world.1 By “stopping,” he initially assumes that means stopping the rotation of the Earth about its axis. He gives the value, 2×1029joules, but doesn’t explain how he calculated that number. Kind of disappointing for SciAm and definitely not acceptable here at ANIAT. Especially since the calculation is easy.

The kinetic energy of a rotating body is

12Iω2

where I is the mass moment of inertia of the body about its axis of rotation and ω is its rotational speed.

The value of I is kind of tricky because, as Plait points out, the Earth’s density varies with depth. But we can make an initial estimate by assuming the Earth is a sphere of uniform density. The moment of inertia for that kind of body is

I=25mr2

We get the mass and (average) radius of the Earth from the sadly defunct NASA Earth Fact Sheet, currently available through the Internet Archive. The mass is 5.9722×1024kg and the mean radius is 6371km. That gives us a moment of inertia of

I=25(5.9722×1024kg)(6.371×106m)2=9.6964×1037kgm2

Relative to the stars, the Earth rotates once every 23.9345 hours (that’s the “sidereal rotation period” on the Fact Sheet), so the rotational speed is

ω=2π(23.9345×60×60)s=7.29211×105s1

Putting these together, we get a kinetic energy of

12(9.6964×1037kgm2)(7.29211×105s1)2=2.578×1029J

This is higher than Plait’s value, but he may have rounded down because he knew the density of the Earth is higher near the center. Also, I suspect he was mostly after an order-of-magnitude answer.

I found a better estimate of I on this page from Eric Weisstein’s World of Science site. It was determined by Kurt Lambeck to be

I=8.034×1037kgm2

(Lambeck’s book came out just a couple of years before “I Melt with You,” which I’m pretty sure is a coincidence.)

Using this value, we get a rotational kinetic energy of

12(8.034×1037kgm2)(7.29211×105s1)2=2.136×1029J

which is a better match for Plait’s energy value.

Plait also considers another interpretation of “I’ll stop the world”: stopping the Earth in its orbit. I won’t get into the details of this, first because it doesn’t involve the moment of inertia, and second because stopping the Earth this way would have it fall into the Sun. Not much doubt about melting in that case.


  1. He also gets into the question of melting the Earth’s crust, which I won’t be addressing. After all, the song says “I’ll stop the world and melt with you.” As far as I’m concerned, only the singer and his girl melt, not the whole goddamned world.