A tardy assessment of the Apple Sports app

I tried the Apple Sports app when it came out in February and abandoned it almost immediately. Lots was written about Sports in its first couple of weeks, but I was on a blogging hiatus back then. I’ve recently looked at it again to see if I was too hasty or if its failings had been fixed (no to both), so I figured I’d write up my thoughts.

I won’t be saying anything about how Sports fits into the Apple sports universe; go to Jason Snell for that. And I won’t be talking about how its design may be a harbinger of iOS 18; that’s Lickability’s baliwick. But I do want to talk about its design as a sports app.

You may recall that the main selling point of Sports was its ability to give you up-to-date scores. Eddy Cue said, “I just want to get the damn score of the game.” That’s Apple marketing at its best: it’s short, pithy, and it directs you to the app’s best feature, the presentation of today’s scores.

It’s easy to set up Sports to follow your favorite leagues/conferences and teams, and once that’s done the presentation of scores is logical. Games being played in your chosen leagues are displayed generally in chronological order, but the games with your favorite teams are floated to the top. That’s the right way to do it.

But scores are only part of what a good sports app is about. Sports apps are used not only when you can’t watch a game and want to be kept plugged in, they’re also used—even more often used, I think—to give you background information on the game you’re currently watching. Announcements during a broadcast are ephemeral, but a sports app can tell you how many fouls Nikola Jokić has at any time.1 And this is where Sports falls down.

In basketball, for example, the box score statistics are thin. There’s no info on free throws, steals, blocks, turnovers, or personal fouls. League standings are missing common stats like the home/away record, record over the last 10 games, and win/loss streaks, These are things fans want and that other sports apps provide. No amount of beautiful presentation is going to make up for missing data.

And, weirdly for an Apple app, the presentation isn’t beautiful—it’s actually awful. Here’s a screenshot of the box score from last night’s Chicago Bulls/Detroit Pistons game:

Chicago Bulls box score from Sports app

Like many sports apps, Sports splits the box score into starters and bench players (during a game, the players on the court have marks next to their names). Apple’s designers decided to put the headers only at the top of the Starters portion of the table, which I would applaud if they’d aligned the columns of the Bench portion of the table with the columns of the Starters portion. But they didn’t. Bench rebounds, for example, are more or less under the PTS header. This is not how you present a table of numbers, and it’s inconceivable to me that anyone would look at this mess and give it a pass.

The programming problem here is obvious. Although the use of a single header suggests this is meant to be seen as a single table, inside the app the Starters and Bench parts are two separate tables. The column spacing of the Starters table is based on widths that include the headers (several of which are wider than the data below them), and the column spacing of the Bench table is based on widths of the data alone. Instead of looking at both tables, getting the maximum width of each column, and applying that to both tables, the programmers simply allowed the tables to be formatted separately, thus saving themselves at least five lines of code.

Again, did nobody at Apple look at this before putting it in the App Store? And has nobody looked at it in the seven weeks since?

I admit I may be unduly irritated by this because I spent a lot of my career making tables of figures and doing my best to make them easy to read. But before you dismiss me as a crank, look at what happens when you swipe on the tables left and right to see the additional stats. They get even further misaligned because the two tables don’t scroll together.

When you use a single header, you’re telling the reader that they’re looking at a single table. But this design cheats the reader.

I’ve used several sports apps over the years. Many of them are crappy and fill your small screen with ads. A good Apple Sports app would fill a real need. But I can’t use it until it stops offending me.


  1. My examples are going to be about basketball because that’s the sport I care about the most. 


Counting poker hands

In this morning’s blog post, John D. Cook talks about poker hands and their probabilities. In particular, he says

For a five-card hand, the probabilities of 0, 1, or 2 pair are 0.5012, 0.4226, and 0.0475 respectively.

Upon reading this, I assumed there’d be an explanation of how these probabilities were calculated. But no, he just leaves us hanging. So I sat down and worked them out.

The probabilities are going to be calculated by dividing the number of ways we can get a certain type of hand by the total number of possible hands. So let’s start by working out the denominator. There are 52 cards, so if we deal out 5 cards, there are

(525)=2,598,960

possible ways to do it. The symbol that looks sort of like a fraction without the dividing line represents the binomial coefficient,

(nk)=n!k!(nk)!

This is not only the coefficient of binomial expansions, it’s also the number of ways we can choose k items out of n without regard to order, also referred to as the number of combinations.

To figure out the number of one-pair hands, imagine the deck laid out in 13 piles: a pile of aces, a pile of kings, a pile of queens, and so on. We then do the following:

  1. Pick one of the piles. There are 13 ways to do this.
  2. From that pile, choose 2 cards. There are

    (42)=6

    ways to do this.

  3. Pick three other piles. There are

    (123)=220

    ways to do this.

  4. Pick one card from each of these three piles. Since there are 4 cards in each pile, there are 4 3=64 ways to do this.

So the total number of one-pair hands is

13×6×220×64=1,098,240

and the probability of getting a one-pair hand is

1,098,2402,598,960=0.42257

Moving on to two-pair hands, we start with the same 13 piles we had before. We then do the following:

  1. Pick two of the piles:

    (132)=78
  2. Pick two cards from each of these piles:

    (42)×(42)=6×6=36
  3. At this point, any of the remaining 44 cards will give us a two-pair hand.

Therefore, the total is

78×36×44=123,552

and the probability of drawing a two-pair hand is

123,5522,598,960=0.04754

Counting the number of no-pair hands is a little trickier because we have to make sure we don’t mistakenly count better hands, i.e., straights and flushes. Starting again with our 13 piles, we do the following:

  1. Pick 5 piles

    (135)=1,287
  2. Eliminate all the straights from this number. The number of straights is most easily done through simple enumeration:

    A–5, 2–6, 3–7, 4–8, 5–9, 6–10, 7–J, 8–Q, 9–K, 10–A

    So 10 of our 1,287 possible pile selections will give us a straight. That leaves 1,277 non-straight possibilities.

  3. Pick one card from each of the selected piles. That gives 4 5=1,024 possibilities.
  4. Eliminate the flushes from this set of possibilites. There are 4 flushes, leaving 1,020 possibilities.

These steps give us

1,277×1,020=1,302,540

hands that are worse than one-pair. The probability of getting such a hand is

1,302,5402,598,960=0.50118

I kept one more digit in my answers than John did, but they all match.


My 2024 Eclipse

I drove down to Vincennes, Indiana, yesterday to see the eclipse, and everything was just about perfect—some through planning and some through serendipity. Here’s a brief review.

Vincennes was not my first choice. Using the eclipse path map at Time and Date, I looked for the shortest distance from Naperville, Illinois, to the path and figured I’d shoot for a rural area near Indianapolis.

Eclipse path map showing Illinois and Indiana

As Eclipse Day got closer, I began to have second thoughts. Two reasons:

  1. Traffic before and after the 2017 eclipse—which I saw with my wife and sons in southern Illinois—was a nightmare. Going near a decent-sized city ringed by a set of interstate highways seemed like a bad idea.
  2. Weather reports for the Indianapolis area were a little sketchy. Apple’s Weather app said it would be cloudy in the morning turning to partly cloudy by the time of the eclipse. “Partly cloudy” covers a wide range of cloud cover. Various weather websites also predicted partly cloudy skies, with less cloud cover as you moved southeast along the eclipse path.

So I started looking into Vincennes. It’s about an hour farther than Indianapolis under normal driving conditions, but I could get there via state and US highways instead of interstates, so I figured it was unlikely to attract as many people as the Indianapolis area. And it was supposedly less likely to have clouds.

Ultimately, it was a game-day decision. When I woke up on Monday morning and looked at the forecasts for Indianapolis and Vincennes, Vincennes seemed like it would have slightly better weather. And when I left, sometime between 5:30 and 6:00 in the morning, my route to Vincennes showed no delays. I didn’t truly trust the traffic because I wouldn’t expect people to be crowding the roads until I was two or three hours into my trip.

The drive went very well. I worked my way south and east to US 41 in Indiana (it became an hour later when I crossed the state line) and headed south. As I headed down through the land of windmills, Trump signs, and dollar stores, the traffic was light and the sun was bright. Somewhere—I think it was a bit north of Terre Haute—there was a billboard encouraging everyone to go to Vincennes for the eclipse, but there didn’t seem to be that many people following its directions.

I rolled into Vincennes around 11:30, desperate to use a bathroom. I stopped at a McDonalds and then felt obligated to eat there after using the facilities. Here’s where the serendipity struck. As I was eating (worst fries I’ve ever had at a McDonalds—remind me to tell you about the glorious fries I once had at Hamburger University), I started looking on my iPhone for a park nearby where I could kill some time before the eclipse, which wouldn’t get started for over two hours.

A website describing Kimmel Park on the north side of town, right along the Wabash River, said it had 1.8 miles of walkways. This appealed to me, as I’d missed my morning walk. For no particular reason, I opened the eclipse path page at Time and Date and zoomed in as far as I could. The centerline of the path went right through Kimmel Park.

Eclipse path detail in Vincennes

You see, I had not been planning to stay in Vincennes for the eclipse. It had looked to me as though the path went north of town (which it kind of does), so I was going to find a spot alongside a county road north and east of town, between Vincennes and Bruceville, for watching the eclipse. But now I had a better place, assuming the park wasn’t overrun with visitors.

It wasn’t. There were well-marked lots with free parking and mostly empty spots near the park. And while the park was far from empty, it wasn’t hard to find a place to settle in after I’d walked around it once. (While I’m sure the “1.8 miles of walkway” is accurate, that must be if you take every last branch, possibly doubling back on yourself.)

Here’s where I parked and where I sat for the eclipse.

Kimmell Park in Vincennes, Indiana

I used the location data for a photo I took to mark the exact location.

My postion in Kimmell Park

Honestly, I think I was at the next tree north and east of where my photo said I was, but I don’t want to argue with GPS.

How does this compare with the centerline of the eclipse path? This morning, I opened Mathematica and used its new SolarEclipse function to mark the path on map that’s more zoomed-in than I could get with Time and Date:

eclipse = SolarEclipse[DateObject[{2024, 4, 8}]];

GeoGraphics[{Red,
    SolarEclipse[eclipse, "ShadowAxisLine"],}, 
  GeoCenter -> GeoPosition[{38.69715, -87.51673}], 
  GeoRange -> Quantity[250, "Meters"], GeoScaleBar -> "Feet", 
  ImageSize -> Large]

Eclipse path through Kimmell Park

Apparently, the park district has changed the routing of the paved areas, but you can see that I was no more that 300–400 feet from the centerline. Recent rains had left the ground and some of the pavement wet by the peak of the triangle, and the shady areas near the treeline due north of me was already occupied. So I was satisfied with my spot.

There were some thin, wispy clouds, but it was obvious well before the eclipse started that the view would be fantastic. And it was. During the last 10–15 minutes or so before totality, I did nothing but look at the sun (through the glasses I’d kept from 2017), watching as the thin arc of sun got shorter until it disappeared entirely. I pulled off my glasses as a cheer went up and looked into the deep black of the moon surrounded by the white corona.

I did take a quick iPhone photo during totality, more as a reminder than anything else.

My iPhone photo of the eclipse

Patrick MaCarron—who was also in Vincennes, but I don’t know where—took a great photo of the eclipse, and you should follow the link to see it. It shows two red prominences: a large one near the bottom and a smaller one along the right edge. I saw the one near the bottom with my naked eye; it was a sharp red dot at the bottom of the black circle. I was unsure if I’d really seen it until I saw Patrick’s photo later on Mastodon.

I also found Jupiter (to the right) and Venus (to the left). I didn’t see Mars, Mercury, or that comet that was supposed to be at the edge of unaided visibility. This, I think, is where those wispy clouds came into play. I could see them around Jupiter, sort of how you see clouds on a moonlit night.

I hung around for a while after totality, but watching the Moon retreat isn’t as fun as watching it advance. As I walked back to the park entrance, I stopped to take photos of my shadow on the sidewalk. I made a sort of pinhole by squeezing tight an OK sign. You’ll have to zoom in to see the crescent coming through the small aperture.

Crescent seen between fingers

Google Maps routed me through Champaign, Illinois, on my way home, so I ordered a Papa Del’s pizza when I was about an hour away and took it home for a late dinner. I got home just as the Men’s National Championship game was starting. I watched it while eating pizza—the perfect end to a perfect day.


Moment diagrams for continuous beams

As promised last time, we’ll now work out the solution for this three-span continuous beam with a uniform distributed load.

Three span continuous beam

Because there are four unknown reaction forces at the supports and only two equations of statics1, we can’t solve for the reactions by statics along. This means the structure is statically indeterminate. And because there are two more unknowns than equations, we say that it has two degrees of indeterminacy.

But wait, can’t we use symmetry in addition to statics to solve for the reactions? After all, symmetry tells us that the two interior support reactions must be equal and the two exterior support reactions must also be equal.

Three-span continuous free-body diagram

Let’s see what we can do with this. The equations of equilibrium for vertical loading and the moment about the left support are

∑F y=2R A+2R Bw(26a)=0 ∑M A=R B(7a)+R B(19a)+R A(26a)w(26a)(13a)=0

These may look like two equations, but they really aren’t. After some algebra, they become

R A+R B=13wa R A+R B=13wa

which are the same equation. So our two equations of statics aren’t independent and we really have one equation with two unknowns. That’s only one degree of indeterminacy, which is an improvement, but still isn’t enough to solve the problem through statics alone. And if you think you can get an independent equation by taking moments about another point, go ahead and try. I’ll be here when you come back.

To solve this problem—and to solve indeterminate problems in general—we have to account for the stiffness of the structure. There are many ways of doing this. If it were 1980 and I were still an undergraduate, I’d probably use moment distribution, because that was the standard way to do problems by hand back then. I suspect that most engineers today would use the finite element method. That’s the most practical solution, but letting your computer do all the work is no fun.

The fun way is to take advantage of symmetry and use Castigliano’s Second Theorem. Alberto Castigliano was a 19th Century Italian engineer whose 1873 thesis, Intorno ai sistemi elastici or Regarding elastic systems2 included his theorems and their proofs. You probably haven’t heard of Castigliano—he’s no Newton or Euler or Bernoulli—but there aren’t many dissertations whose findings are still being taught a century and a half later.

Castigliano’s Second Theorem is based on work and energy principles. Say we have a linearly elastic structure—that’s one where the deflection is a linear function of the loading and the structure springs back when the loads are removed. If we have a set of concentrated external loads acting on the structure, P i, we can express the strain energy, U, as a function of those loads. Then the deflections, δ i, of the points of load application in the directions of the P i, can be determining from the partial derivatives of the strain energy with respect to the loads:

δ i=∂U∂P i

The strain energy in a beam can be written in several ways. When solving problems by Castigliano’s Second Theorem, we write it in terms of the bending moment like this:

U=∫ 0 LM 22EIdx

That’s the theory. Now let’s talk about the practice.

The strategy when using Castigliano’s Second Theorem to solve a statically indeterminate problem is the following:

  1. Remove the “extra” supports, i.e., the ones that are making the structure indeterminate. Since any of the supports could be considered extra, you have some freedom here. With experience, you’ll choose supports that make your calculations easy.
  2. Replace the supports with the forces (as yet unknown) that act at those supports
  3. Write out an expression for the strain energy in terms of the replacement forces.
  4. Take the partial derivatives of the strain energy with respect to those forces.
  5. Set the partial derivatives to zero because the displacements at the supports that were removed are zero, i.e.,

    δ i=∂U∂P i=0
  6. Solve the equations in Step 5 for the replacement forces.

The procedure is easier to show than it is to tell. Here’s our structure with the interior supports replaced by forces.

Simply-supported beam with uniformly distributed and concentrated loads

The two interior concentrated loads are equal because of symmetry. Since this is a linearly elastic structure, we can use superposition to analyze this complex loading. That is, we can break the complex loading into two or more simpler loading conditions that are easy to solve. After solving for the simpler loads, we add them together to get the solution for the complex loading. In graphical language, we do this:

Superposition

Let’s start with the reactions at the ends. Clearly, the upward reaction forces at the end supports are

w(26a)2P=13waP

where the first term is what the reaction would be if only the uniformly distributed load were acting and the second term is what the reaction would be if only the two interior point loads were acting. The sign of the P term is negative because the reactions from the Ps alone would be downward.

The moment diagrams for two simpler load conditions are this for the uniformly distributed load

Uniform load moment diagram

and this for the two concentrated loads.

Concentrated loads moment diagram

Concentrated loads put kinks in the moment diagram.

When we add the two moments together, we get this piecewise expression:

M = { 13 w a x w x 2 2 P x for 0 x 7 a 13 w a x w x 2 2 7 a P for 7 a < x 19 a 13 w a x w x 2 2 P ( 26 a x ) for 19 a < x 26 a M = \begin{array}{ll} 13 w a x - \frac{w x^2}{2} -R_B x & \: \mathrm{for} 0 \le x \le 7 a \\ 13 w a x - \frac{w x^2}{2} - 7 a R_B & \: \mathrm{for} 7 a \lt x \le 19 a \\ 13 w a x - \frac{w x^2}{2} - R_B (26 a - x) & \: \mathrm{for} 19 a \lt x \le 26a \end{array}

For each piece, the first two terms are due to the distributed load and the last term is due to the concentrated loads.

With the bending moment defined in terms of the unknown, P, we can use the equation above to get the strain energy. I’m not going to pretend I did it by hand; here’s the Mathematica code,

M1 = 13*w*a*x - w*x^2/2 - P*x;

M2 = 13*w*a*x - w*x^2/2 - 7*a*P;

M3 = 13*w*a*x - w*x^2/2 - (26 a - x)*P;

U = Integrate[M1^2/(2*EI), {x, 0, 7*a}] + 
    Integrate[M2^2/(2*EI), {x, 7*a, 19*a}] + 
    Integrate[M3^2/(2*EI), {x, 19*a, 26*a}]

which gives us a strain energy of

U=1225a 33EIP 2107,597wa 412EIP+742,586w 2a 515EI

When you give Mathematica integer input, it gives you integer or rational output, hence the large numbers in the numerators.

Taking the partial derivative of this with respect to P and setting it to zero,

soln = Solve[D[U, P] == 0, P]

gives us

P=15,371wa1400=10.979wa

We plug this back into the expression for M and get

M = { 2829 w a x 1400 w x 2 2 for 0 x 7 a 15,371 w a 2 200 + 13 w a x w x 2 2 for 7 a < x 19 a 15,371 w a ( 26 a ) 1400 + 13 w a x w x 2 2 for 19 a < x 26 a M = \begin{array}{ll} \frac{2829 w a x}{1400} - \frac{w x^2}{2} & for \: 0 \le x \le 7 a \\ -\frac{15,371 w a^2}{200} + 13 w a x - \frac{w x^2}{2} & for \: 7a \lt x \le 19 a \\ -\frac{15,371 w a (26 - a)}{1400} + 13 w a x - \frac{w x^2}{2} & for \: 19 a \lt x \le 26 a \end{array}

To plot the moment diagram in Mathematica, we do what we did last time: divide the moment expressions by wa 2 and introduce a nondimensional length variable, u=x/a. The code is

m1 = M1/(w*a^2) /. {soln[[1]][[1]], x -> u*a};

m1 = Simplify[m1];

m2 = M2/(w*a^2) /. {soln[[1]][[1]], x -> u*a};

m2 = Simplify[m2];

m3 = M3/(w*a^2) /. {soln[[1]][[1]], x -> u*a};

m3 = Simplify[m3];

Plot[Piecewise[{{m1, u <= 7}, {m2, 7 < u <= 19}, {m3, u > 19}}], {u, 0, 26},
  ImageSize -> Large, PlotStyle -> Thick, 
  Ticks -> {Table[t, {t, 0, 26, 2}], Table[t, {t, -12, 10, 2}]}]

where again the Piecewise function lets us split the function being plotted into pieces. Note also that we’re using the soln expression that came from the solution for P to plug that into the various M expressions.

The resulting plot is

Moment diagram for three span continuous beam

except that I added the annotations in Preview.


I’ll spare you the work involved in making the third moment diagram in the Francis Scott Key Bridge post, the one for a beam with the left interior support missing. The process is the same as what we just went through.

I should mention, though, that although this seems complicated when every step is explained, most structural engineers would be able to whip through this analysis quickly. They wouldn’t have wasted time showing that symmetry doesn’t make this problem statically determinate. They would know immediately to use superposition. And they’d draw the two moment diagrams for the simpler problems as fast as their pencil could move. That’s how expertise works.


  1. Recall that the horizontal equilibrium equation gives us no information because there are no horizontal forces. 

  2. Google Translate told me the English translation was Around elastic systems, which seemed off. I thought Google was taking “itorno” too literally; it should be something like “on” or “about.” So I asked Federico Viticci what he thought, and he gave me “regarding” as a good translation of an older Italian usage. Thanks, Federico!