Parabolic mirrors made simple(r)

A couple of days ago, Numberphile released a video on YouTube in which Tom Crawford explained why parabolic mirrors reflect incoming light to the focal point. His explanation was, I thought, needlessly complicated, so I decided to write up a simpler one. No implicit differentiati … | Continue reading


@leancrew.com | 11 months ago

ImageOptim

Yesterday, I listened to the most recent Mac Power Users episode, “20 Mac Apps Under $20.” Although MPU is probably best known for its deep dive episodes, I always like these more rapid-fire discussions. As usual, this one has a good mix of apps that are new to me and those I alr … | Continue reading


@leancrew.com | 1 year ago

Feet, inches, and averaging

After Purdue’s historically embarrassing loss to Fairleigh Dickinson on Friday night, many sportswriters awakened to Purdue’s longstanding poor performance in the NCAA tournament and wrote articles like this one in Slate. As I read that article, I saw one error that should embarr … | Continue reading


@leancrew.com | 1 year ago

Better MathJax equations

If some of the equations in my posts look a little off—poorly spaced or, more likely, with a wobbly baseline—there may be something you can do about it. I learned this on Mastodon through a combination of Andy Napper and Mimmo. | Continue reading


@leancrew.com | 1 year ago

Concrete and pi

Back in either 1980 or ’81, I took course called Properties and Behavior of Concrete, which had the course number CE 214 and this description: | Continue reading


@leancrew.com | 1 year ago

Physics and units again

I don’t want this place to turn into a Matt Parker followup blog, but there are things in his recent Pi Day video that fit in with comments I made on his Runge video, specifically the part about engineers embedding unit conversions within formulas. So go ahead and watch the video … | Continue reading


@leancrew.com | 1 year ago

Learning (sort of) from ChatGPT

Simon Willison, the primary developer of the Datasette exploratory data analysis tool, has a strong interest in ChatGPT and similar AI toys.1 He recently linked on Mastodon to this dialog with ChatGPT to write some AppleScript. In that dialog, we see the good and bad of using Cha … | Continue reading


@leancrew.com | 1 year ago

Automation via embarrassment

This morning I was adding an entry to my homemade wiki when I became acutely embarrassed by how convoluted the entry was becoming. I stopped writing, created an automation that made the process I was describing much simpler, and rewrote the entry feeling much better about myself. | Continue reading


@leancrew.com | 1 year ago

Cleaning and graphing baseball data

If any of you followed the link in yesterday’s post to my old writeup from a decade ago, you noticed that the scripts I wrote back then used the csv and cPickle libraries to read, filter, and store the baseball game data. Now I find it more natural to use pandas for all of that, … | Continue reading


@leancrew.com | 1 year ago

Revisiting baseball game durations

This morning, I learned from Paul Kafasis that major league baseball will be going to a pitch clock, something they tried out in the minor leagues last year. The idea, of course, is to speed up our interminable national pastime. | Continue reading


@leancrew.com | 1 year ago

Modulo

I left something out of yesterday’s post. Another mathematical aspect of Underscore David Smith’s unitSquareIntersectionPoint function is this set of lines at the top of the function: | Continue reading


@leancrew.com | 1 year ago

Underscore David Smith and linearization for large angles

Underscore David Smith wrote a post earlier this week that I had trouble with. Part of the trouble was that the code he wrote was in Swift, but that was a minor problem, as UDS’s code was clear enough to understand even though I don’t know Swift. The bigger problem was how he man … | Continue reading


@leancrew.com | 1 year ago

Updating scripts

Yesterday’s post ended with this little script for searching a Mastodon archive: | Continue reading


@leancrew.com | 1 year ago

Seaching through my Mastodon graveyard

I’ve been sketching out a post on the ChatGPT/Bing/Sydney fuss, but I’m not sure I’ll finish it. It’s kind of meandering and not deliberately so. One thing I’m sure of is that I want to start by quoting this Mastodon post of mine: | Continue reading


@leancrew.com | 1 year ago

Mastodon and Open Graph

When I moved back to Mastodon in November, I wrote a little script that used the Mastodon API to automatically post a link there whenever I published something new here on the blog. It worked fine, but the links were plain—they didn’t have the graphic pizazz that the same link on … | Continue reading


@leancrew.com | 1 year ago

Swings and roundabouts

I found Matt Parker’s recent video a bit confusing, and I’d like to talk about it. According to the title, it’s about the Runge phenomenon, and while it certainty covers that topic, it starts out pretty far away and takes a sudden swing.1 | Continue reading


@leancrew.com | 1 year ago

Markdown footnoting in BBEdit

Two years ago, I wrote a post in which I outlined all the little scripts I’d built to help me write blog posts in BBEdit. I’d been writing posts almost exclusively on my iPad for quite a while, but the M1 MacBook Air I bought in February of 2021 turned me back into a Mac-first gu … | Continue reading


@leancrew.com | 1 year ago

Consolidating my little date commands

This morning, I was composing a nice email to a client, and I needed to know how many days it had been since September 23 of last year: This invoice is 137 days old. When the fuck are you going to pay it? I used my ago script, which worked fine, except I needed to switch from Mai … | Continue reading


@leancrew.com | 1 year ago

Mastodon miscellany

I’ve been collecting odds and ends about Mastodon over the past couple of weeks. Time to dump them all out of my head into this post. | Continue reading


@leancrew.com | 1 year ago

Wordle permutations

Last week, as a followup to my most recent Wordle/grep post, John Gruber sent me an email in which he told me about a script he wrote to do the same thing but with less fuss. Inspired by this, I wrote my own script. | Continue reading


@leancrew.com | 1 year ago

What’s a Twitter client?

Thanks to yesterday’s Engadget report from Karissa Bell, we all know the official Twitter rule that Twiterrific and Tweetbot broke. It’s this bit of Section II.A of the Twitter Developer Agreement: | Continue reading


@leancrew.com | 1 year ago

Twitter via RSS

I canceled my Tweetbot subscription a month or two ago and don’t go to Twitter anymore—the former followed from the latter—so I haven’t been caught up in the recent mess. But it was a reminder that I wanted to share a simple tip for fellow Twitter-leavers on the off-chance you di … | Continue reading


@leancrew.com | 1 year ago

Not cheating at Wordle

I got yesterday’s Wordle1 in three guesses and was immediately (and jokingly) accused of cheating by my family—mainly because they needed more guesses, but also because the word had a repeated letter and we usually don’t start guessing repeated letters that early in the game. | Continue reading


@leancrew.com | 1 year ago

Triangles and area coordinates

Earlier this month, John D. Cook posted a nice little article about using a determinant to get the area of a triangle. The method was both familiar and unfamiliar. I knew I’d once learned about getting a triangle’s area from a determinant, but I was sure it wasn’t the same way Co … | Continue reading


@leancrew.com | 1 year ago

Another small adventure in data cleaning

In a project at work, I had a folder with dozens of engineering drawings for a piece of construction equipment. As part of a report, I needed to generate a list of all the drawings I had according to their drawing numbers, and I also needed to make sure my list corresponded to th … | Continue reading


@leancrew.com | 1 year ago

Outlining and Bike

I’ve been planning to write this post for some time, but things kept coming up. Today, though, Jesse Grosjean is running a sale on Bike, his outlining app for the Mac, and it seemed like the right day to finally push this out. The sale is a pretty good one—$10 instead of the usua … | Continue reading


@leancrew.com | 1 year ago

Hair splitting

A few days ago, Brady Haran at Numberphile released a new video with Ben Sparks. Like most of Ben’s videos, it’s interesting without being super heavy with math. In this case, I think the psychology behind the video is the most interesting part. | Continue reading


@leancrew.com | 1 year ago

Announcing new posts on Mastodon

With lots of people, including me, either starting up new Mastodon accounts or dusting off the old ones they created during a previous Twitter crisis, I decided to write a script that would autotoot to Mastodon whenever I publish a new post here. It didn’t take long, as the Masto … | Continue reading


@leancrew.com | 1 year ago

Are you a mod or a rocker?

This post was supposed to go up just a few days after the last one, but stuff got in the way. At least we’re in the same month. | Continue reading


@leancrew.com | 1 year ago

Simplifying trig expressions

When using any computer algebra system, there comes a time when you wonder why the result produced by the program isn’t as simple as you could make it by hand. To get good at using such a system, you have to learn its tricks of substitution and simplification. | Continue reading


@leancrew.com | 1 year ago

Orbital curvature

Last week, John Cook wrote a nice post on the shape of the Moon’s orbit. He was inspired by a paper written by Noah Samuel Brannen for the College Mathematics Journal back in 2001.1 The gist of their analyses is that if you trace out the Moon’s path as it and the Earth travel aro … | Continue reading


@leancrew.com | 1 year ago

Learning from (Wordle) failure

This morning, after 108 straight wins, I lost at Wordle. I got to four correct letters by my fourth guess, but there were too many possibilities for the remaining letter, and I didn’t guess right in either of my last two guesses. | Continue reading


@leancrew.com | 1 year ago

Thoughts on Pads

Today, as 512 Pixels and other sites have told me, is the 30th anniversary of the release of the IBM ThinkPad. It was both a brilliantly designed computer and a brilliantly named one. For decades, THINK had been associated with IBM, and the ThinkPad was, for its time, a small eno … | Continue reading


@leancrew.com | 1 year ago

Good fortune

I don’t want this to turn into the “obscure Unix commands blog” (any more than it already is), but I did have reason to use another old Unix command the other day. Unlike rs, this one is one that I’d used a lot in the past but hadn’t done anything with in ages. | Continue reading


@leancrew.com | 1 year ago

Reshaping text

It’s not often that I run into a new (to me) Unix command. But when I had a problem yesterday, I came across a simple solution using the rs command, which I’d never heard of before. Maybe you’ll find it useful, too. | Continue reading


@leancrew.com | 1 year ago

No reason to get excited

Last week’s Apple Event didn’t give me the push to get a new watch that I was expecting. Yes, my Series 3 won’t accept watchOS 9, but I’ve known that since WWDC. And while both the SE and the Series 8 are clear improvements over the Series 3, I’m not sure what I will get out of t … | Continue reading


@leancrew.com | 1 year ago

My contribution to Markdown

I was listening to the most recent episode of The Talk Show this morning, and my extremely important contribution to Markdown came up. Sort of. | Continue reading


@leancrew.com | 1 year ago

Filtering my RSS reading

A couple of weeks ago, I decided to cut back on my RSS feed reading.1 Not by reducing the number of feeds I’m subscribed to, but by filtering articles to eliminate those that would just be a waste of my time. The change was inspired by a particularly stupid post by Erik Loomis at … | Continue reading


@leancrew.com | 1 year ago

Integers, decibels, and graphs

Earlier this week, John Cook wrote a couple of posts (first, second) about decibels and their analog to bases other than 10. In the second post, he included a graph for which he has some reservations. I thought I’d see if I could improve the graph. I think I did, but I have my ow … | Continue reading


@leancrew.com | 1 year ago

Vintage mechanics

Last week I read Vintage Murder by Ngaio Marsh and was surprised to find that the setup for the murder was very much like the homework problems I used to assign in my sophomore-level mechanics class. Solving the problem—which didn’t help in solving the murder—was a fun little exe … | Continue reading


@leancrew.com | 1 year ago

Mail links and percentages

Yesterday, John Voorhees wrote a nice article at MacStories about creating links to specific email messages. His system is in the form of a Shortcut, but the real work is done by an AppleScript. The AppleScript is an extension of one John Gruber wrote 15 years ago.1 | Continue reading


@leancrew.com | 1 year ago

Octagons and squares

A recent episode of the 99% Invisible podcast, “Octagon House,” had a little math problem embedded in it, and while I was solving that problem I learned something new about Mathematica. | Continue reading


@leancrew.com | 1 year ago

Apple Watch estimates

In the Rumor Roundup segment of this week’s episode of Upgrade (starts about 32 minutes in), Jason and Myke talk about the temperature sensor that’s expected—according to Mark Gurman—to appear on the next generation of Apple Watches. The sensor isn’t going to take the temperature … | Continue reading


@leancrew.com | 1 year ago

Tail I lose

I’ve been using the tail command for about 25 years, so you might think I’d know something about it. But last week, as I was putting together a short shell script (not this one), I opened the man page for tail and learned something new. Two things, actually, which surprised me, a … | Continue reading


@leancrew.com | 1 year ago

BBEdit, Tail Mode, and bbtail

A new version of BBEdit, 14.5, was released a couple of days ago, and the feature that caught my eye was Tail Mode. It’s a way of viewing a log file in a way that persistently updates as new text is added to the file. Lots of processes send information (errors, connections, etc.) … | Continue reading


@leancrew.com | 1 year ago

Watches and stages

Two announcements at WWDC are strongly connected in my mind: watchOS 9 not being available for the Series 3 Apple Watch and Stage Manager not being available for non-M1 iPads. The former got a raised eyebrow from most Apple pundits—after all, the Series 3 is currently for sale—bu … | Continue reading


@leancrew.com | 1 year ago

Remembrance of moofs past

All the old Mac users—and some not so old—had wistful smiles on their faces today. Clarus the dogcow is back. | Continue reading


@leancrew.com | 1 year ago

Updated AppleScript module for Python

JavaScript for Automation (JXA) isn’t the only way to do AppleScripty things in programs written in a language other than AppleScript. The osascript command allows you to run AppleScript within any script, as long as the scripting language has a way to call out to system commands … | Continue reading


@leancrew.com | 1 year ago