Request a free site audit

Interested in offering ad free site memberships?

Life news: I got a dog


On using Google’s Perspective API to police the tone of my tweets

A couple weeks ago, Google gave me access to their Perspective API, which can programmatically detect tone from a string of words.

I’m the first to admit that tone can be a problem for me (I get excited easily) so I was gung-ho to see how I could use the tool.

It’s surprised me a few times, and caused me to delete a couple tweets. One was this morning about the opioid epidemic. Sometimes I need the reminder that not everyone feels things as passionately as I do.

One implementation detail I’d handle differently next time is using an API other than the timeline endpoint. This would let me use an account other than @davisshaver to search my tweets and send out the nag. As it stands, it looks like I’m replying to myself. Not to mention, the threading doesn’t seem quite right.

Here are some example tweets that got flagged. This marks the end of my little experiment, at least publicly. I‘m going to switch to direct messages in the next few days. The hack has proven useful enough that I want to keep it, but not so useful that I want you all to see it.

Here’s what my log output looks like.

Update June 30: I changed my mind on switching to direct messages, mainly because the notifications were funky (read as: nonexistent) when I DM’ed myself. I also tweaked the implementation to address the bugs mentioned above (now struck through). Introducing my bot!

Here’s the code, tell me how bad (or… good?) it is in the comments.

Did you enjoy this post?

Signup to receive a weekly email containing my new posts, curated links, and book reviews.

Thank you for subscribing.

Something went wrong.


Follow me on Twitter

Less, More, and None

My friend Ethan shared his Less, More, and None list (inspired by Jacoby Young). Cool idea, thought I’d give it a try. Always good to remind yourself of your better aspirations.

Lenfest Institute and Digital First Media?

Notes on dynamic meters

Notes on newsletters

Notes on the membership model for news


Capturing Shawmont Station before its $1,000,000 preservation begins – the oldest extant passenger rail station in America

Originally a 18′ by 36′ stone house (Wissahickon Schist), the structure wouldn’t have stood out from the other country homes in this part of Philadelphia, at the tip of the Manayunk Reach, situated at the end of today’s Manayunk Canal Towpath.

Testing WordPress Gutenberg on a high volume news site

Water, sand, and societal change

The best restaurant? Matunuck Oyster Bar

Does Perry Raso run the best restaurant? Yes, I think he does.

EverQuote and patent medicine

In a thread begun October 2016, Washington Post technology director Aram Zucker-Scharff tweeted about the shady advertising practices of EverQuote, a Boston-based startup. Since then these ads have become prolific on the web (and nearly as prolific are Aram’s tweets documenting the malfeasance).

Lenfest Institute and Digital First Media?

What if Alden let another organization manage its newspaper assets as a blind trust? It would lose a great deal of flexibility in using DFM assets to leverage other companies it owns, but it would be able to wash its hands of the growing public relations crisis. Furthermore, it would give space for the strategic direction of DFM to be explored and pursued without the added baggage of hedge fund cross-percolation.

Receive a weekly email with newly posted content

  • About one email per week
  • Includes original posts, curated links, and book reviews

Thank you for subscribing.

Something went wrong.

Send this to a friend