Cleaning phone numbers

It’s been a while since I ran into a website that asked for a phone number and didn’t know how to clean it of non-numeric stuff like hyphens, parentheses, etc. But today I did, and I realized that I didn’t have a Keyboard Maestro macro that would clean a telephone number on my cl … | Continue reading


@leancrew.com | 4 months ago

Mind your plotting

A couple of weeks ago, Presh Talwalkar released this Mind Your Decisions video in which his original attempt to solve the video’s puzzle was, he says, incomplete because he was led astray by plotting the function at the heart of the problem. I say he didn’t do enough plotting. | Continue reading


@leancrew.com | 4 months ago

Revved up like a deuce

Today I needed to reverse a string. Someone had decided to take an easy-to-remember mix of words and numbers, reverse it, and use that as a password for a service that several people would use, including me. Let’s not argue about whether that’s a good way to set a password—I had … | Continue reading


@leancrew.com | 4 months ago

Calculators and Jupyter

A few days ago, I noticed an error in this Scientific American article (that’s an Apple News link). It led me to thinking about how I use Jupyter Console as a calculator on my Mac. | Continue reading


@leancrew.com | 4 months ago

Mail categories

The release of iOS 18.2 has come with a release of anger at how the Mail app is handling our email. There was this post by Stephen Hackett at 512 Pixels and this one by Joe Rosensteel at Six Colors (with a followup at his own place). The unsurprising conclusion is that the compan … | Continue reading


@leancrew.com | 4 months ago

MathML problems in Mobile Safari

Sometime in the early evening on Sunday, I looked at that day’s Antikythera post on my phone and saw that two of the equations weren’t rendering: | Continue reading


@leancrew.com | 5 months ago

The Antikythera mechanism

A recent episode of the In Our Time podcast is about the Antikythera mechanism, which you’ve probably heard of. It’s a bronze device that dates back to the first century BCE and was found by divers on an ancient shipwreck off the Greek island of Antikythera in the early 1900s. It … | Continue reading


@leancrew.com | 5 months ago

More weight

Here’s a followup on my post about tracking and plotting my weight. The shortcuts we’ll cover were written a couple of weeks ago, but I thought weight would be a touchy subject during the week of Thanksgiving. | Continue reading


@leancrew.com | 5 months ago

Thinking about AI

I’m still not sure how to think about AI. While some aspects of it seem useful, I’m not sure I care about them. The few times I’ve tried it out on topics of interest to me, using both ChatGPT and Perplexity it’s failed. | Continue reading


@leancrew.com | 5 months ago

Square roots and maxima

A few days ago, I saw this short YouTube video from Grant Sanderson at 3Blue1Brown: | Continue reading


@leancrew.com | 5 months ago

The tetrahedral days of Christmas

I’m pretty sure there’s a Peanuts comic strip in which Linus works out how many of each gift was given in the “Twelve Days of Christmas.” I’ve been unable to Google it, because the search results are overwhelmed by links to “A Charlie Brown Christmas.” So I decided to work it out … | Continue reading


@leancrew.com | 5 months ago

Weight and measure

Back in the summer, I decided to get more serious about controlling my Type 2 diabetes, and I enrolled in a program that I found through my insurance company. Overall, things have gone quite well: my blood glucose is down, my weight is down, and I’ve been able to cut my medicatio … | Continue reading


@leancrew.com | 6 months ago

An unexpected bit of forward thinking

I think I’ve mentioned here before that sometimes I’ll run into a computer problem and Googling for the answer leads me to a post I wrote (and forgot about) years earlier. I had a similar experience today in the physical world. | Continue reading


@leancrew.com | 6 months ago

Tweaking settings (or not) on my new MacBook Pro

I got my new MacBook Pro last Friday, and so far only two things have annoyed me. The first I got used to much faster than I thought I would, and the second I’ve turned off in System Settings. | Continue reading


@leancrew.com | 6 months ago

Kilometers, miles, Fibonacci, and Lucas

Earlier this month, I got an email from Anthony SEROU about my post on the golden ratio and converting between miles and kilometers. They suggested using consecutive Fibonacci numbers as a quick way to do the conversion, e.g., 5 miles is 8 kilometers. And if the amount you’re con … | Continue reading


@leancrew.com | 6 months ago

Incrementing file version numbers with Python and Perl

Yesterday my old vaudeville partner,1 Dan Sturm, wrote a post describing a Keyboard Maestro macro he wrote that increments the version number in a file name. It’s the sort of thing I could have used years ago when I was writing reports and analysis scripts that often had to be up … | Continue reading


@leancrew.com | 6 months ago

Semi-automated plotting

The Matplotlib code in the last post was initially generated with a Typinator abbreviation that I tweaked to make the final script. After writing the post, I decided it would be nice to have a second, similar abbreviation. This post shows you both. | Continue reading


@leancrew.com | 6 months ago

Ticks tricks

As I often do after a post with a graph, I’m going to follow up by showing how I made it. In this case, the plotting was done with Matplotlib, the Python graphing library with which I’m most familiar. | Continue reading


@leancrew.com | 6 months ago

Rescaling a graph

The business pages of the Chicago Tribune usually have a little graphic showing a plot of some economic data. There’s no story to go along with the graph; it’s meant to stand on its own. In yesterday’s edition, it was a graph of unemployment over the past decade or so: | Continue reading


@leancrew.com | 6 months ago

Apple Health trends

There are some odd things about the way Apple tracks your progress in the Health app. These oddities aren’t new with the recent OS updates. They’ve been a part of the app for as long as I can remember; I’ve just finally gotten around to talking about them. | Continue reading


@leancrew.com | 6 months ago

Houses of cards and triangular numbers

November’s issue of Scientific American has a fun little puzzle about houses of cards. I solved it one way and SciAm solved it another, so I thought it worth a quick post. | Continue reading


@leancrew.com | 6 months ago

Sinusoidal sunlight

I started my morning walk earlier than usual today, and it was still fairly dark out. I thought about this post from last year and the Daylight line in the graph: | Continue reading


@leancrew.com | 6 months ago

Rebar and reinforced concrete

A recent episode of the 99% Invisible podcast, “Brilliantly Boring,” covers a topic near and dear to my heart: reinforced concrete—more specifically, the rebar that does the reinforcing. The show does an excellent job in a short period. I just want to fill in some details. | Continue reading


@leancrew.com | 7 months ago

Expanding

Regular readers1 know that I like to watch mathish YouTube videos from Numberphile, Stand-up Maths, and Mind Your Decisions. Unfortunately, this leads YouTube’s machine learning system to believe that I want to watch all math videos, no matter the level or quality. So it keeps pu … | Continue reading


@leancrew.com | 7 months ago

Touch and run

Here’s one last bit of followup on my Finder/Terminal tool posts. In the first post on the topic, I mentioned that I had created a bunch of zero-length JPEG files using the touch command. And in both the first and second posts, I talked about how long the sel command took when th … | Continue reading


@leancrew.com | 7 months ago

Improved Finder/Terminal tools

A couple of days ago, I got an email from Loren Halter, who had some improvements to my Finder/Terminal tools. I was going to add another update to that post, but realized I had more to say about Loren’s stuff than would fit comfortably in an update. So here we are with a new pos … | Continue reading


@leancrew.com | 8 months ago

Am I blue?

The popular “Is my blue your blue” game is questionable as a test of color perception, in that monitor settings and lighting conditions differ, but it presents its results in a way that I really like. | Continue reading


@leancrew.com | 8 months ago

Finder/Terminal tools

When I’m working at my Mac, some things are most effectively done using the Finder’s GUI and some are best done through the command line in the Terminal.1 I switch between the two with the help of a handful of simple automations. I know I’ve written about one of them before, but … | Continue reading


@leancrew.com | 8 months ago

Two things in ninety-nine minutes

One of the best things about not being an Apple blogger is that I don’t feel compelled to comment on everything Apple does. I was reminded of this when I read Stephen Hackett’s roundup of yesterday’s event. It was my favorite post of the day, and he came up with a great angle on … | Continue reading


@leancrew.com | 8 months ago

Kilometers and the golden ratio

Regular readers know I enjoy reading John D. Cook’s blog and often comment on it here. But I was a little creeped out by it a couple of days ago. It started off with something I’ve been thinking about a lot over the past several weeks, and it was as if he’d been reading my mind. | Continue reading


@leancrew.com | 8 months ago

The Electoral College again, this time with aggregation

After the last post, I had a conversation with ondaiwai on Mastodon about the to_markdown and agg functions in Pandas. After seeing his example code here and here, I rewrote my script, and I think it’s much better. | Continue reading


@leancrew.com | 8 months ago

Pandas and the Electoral College

A couple of weeks ago, I used the Pandas groupby function in some data analysis for work, so when I started writing my previous post on the Electoral College, groupby came immediately to mind when I realized I wanted to add this table to the post: | Continue reading


@leancrew.com | 8 months ago

What I didn't learn about the Electoral College

People my age1 like to talk about how our education was superior to that of these kids today. I can say with absolute certainty that one aspect of my education was terribly deficient: how the Electoral College works. | Continue reading


@leancrew.com | 8 months ago

Screenshots and faded memories

A couple of weeks ago, Chance Miller wrote about a new bit of security theater in the betas of macOS Sequoia: a permissions prompt that asks you to authorize an app to record your screen, e.g., if it takes screenshots. This doesn’t sound so bad until you learn that the permission … | Continue reading


@leancrew.com | 9 months ago

Octagons and the silver ratio

For reasons I don’t recall, I was looking at this post recently and realized that I’d missed something. Let’s rectify that. | Continue reading


@leancrew.com | 9 months ago

Tot shopping redux

A couple of days after the post about my Tot shopping list was published, I got this request on Mastodon from roguewolf: | Continue reading


@leancrew.com | 9 months ago

Watermelons and soil

I meant to write this post a couple of weeks ago, right after Presh Talwalkar published this video: | Continue reading


@leancrew.com | 9 months ago

A deliberately inefficient automation

I automate computer tasks for one of four reasons: | Continue reading


@leancrew.com | 9 months ago

Tot shopping

I’m finding Tot to be a really good app for shopping lists. It has checklists for items, bold formatting to separate the lists for different stores (I often go to more than one store on a shopping trip), and its seven-note limitation encourages the reuse of notes for ephemeral st … | Continue reading


@leancrew.com | 9 months ago

Obscuring my location more than necessary

In yesterday’s post, I obscured my location by covering up the latitude and longitude after the decimal point. | Continue reading


@leancrew.com | 10 months ago

Tot Notes

Against my better judgment, I decided to write a Shortcut today. Even worse, I wanted it to be able to run on my Apple Watch. After several iterations, all of which looked to me to be functionally identical, I finally hit upon one that worked. | Continue reading


@leancrew.com | 10 months ago

Followup on Wolfram county data

You may remember a post I wrote back in December about inexplicable holes in US county-level data in the Wolfram Knowledgebase. I say “you may remember” because I certainly didn’t until I got an email from Wolfram last week telling me that the holes had been filled. Yes and no, a … | Continue reading


@leancrew.com | 10 months ago

A good (or bad) example

The one rule of plotting that every newly minted data scientist can repeat without fail is that your graphs should always start at zero. A graph that doesn’t start at zero is misleading, dishonest, and possibly nefarious. This rule is, of course, bullshit. Not a rule at all. | Continue reading


@leancrew.com | 10 months ago

Numeronymize

Anil Dash quote-tweeted this post from Ian Brown on Mastodon this morning: | Continue reading


@leancrew.com | 10 months ago

Happy 2,460,496!

I was thinking about calendar conversions the other day and remembered that it had been years since I used my date-convert script. I wondered if it would still run. It didn’t, but it was easy to fix. | Continue reading


@leancrew.com | 10 months ago

Column buckling analysis

Last time, we looked at the solutions for six elementary column buckling problems. In this post, we’ll outline the method for getting those solutions and give a couple of detailed examples. | Continue reading


@leancrew.com | 10 months ago

Tangents and columns

Continuing with John D. Cook posts, I should write up a little thing that I meant to post about a month ago. It was in response to this post of Cook’s in which he considers solutions to the equation | Continue reading


@leancrew.com | 10 months ago

Plenty of polygons

John D. Cook wrote a fun geometry post yesterday, and I wanted to use Mathematica to generate my own versions of his images. | Continue reading


@leancrew.com | 10 months ago