I enjoy watching baseball. I’d call myself a casual fan, not because I only watch when they’re good, but because I’m not one of those folks who can tell you all the reasons why they are good or what they should do to get even better. I just like watching baseball. It’s a reliable presence with an even tempo and also there’s a lot of statistics.

As the Twins have been leading their division, league and even all of baseball quite frequently this season, my cousin started tweeting whenever they had the best record in baseball. Of course that got tedious so he inquired about automating it. I thought that sounded like a fun project. And if something is worth doing, it’s worth overdoing, so I made a ruby gem that includes the leader executable that’s useful for determining whether or not your favorite team is leading their division, league or all of baseball. It can also report to you which team is leading baseball, a league, or a division as well as print out a nice leaderboard with sort and filtering options.

Some results:

$ leader is minnesota-twins -l && t update "Today is the 27th of June and the Minnesota Twins have the best record in the American League."
Today, the 27th day of June, 2019:
The Minnesota Twins are the leaders of the AL C division.
The Minnesota Twins are the leaders of the AL.
The Minnesota Twins are not the best team in baseball. They are #2.
Tweet posted by @schlazor.

Run `t delete status 1144439948352692224` to delete.

Using it isn’t quite as straightforward as installing an app on your phone, but keep reading and I’ll walk you through it if you’re interested.

Read More