Coffee with Confucius
This month marks the tenth anniversary of the creation of my Confucian quote bot on Twitter, UnwobblingPivot. Today, it has over 13,600 followers, has received a lot of positive feedback, including good questions about the passages shared, and has gained a little brother on the Fediverse. In fact, it’s significantly more popular than my main account (which has a bit over 1,800 followers), but I don’t feel too bad about being outclassed by the Master and his sources and students. I have a page of general information about the bot already, so in this post, I’ll look back at how and why I created the bot, and what plans I have for it.
Back in 2016, there were a ton of quote bots on Twitter. Yes, there are quite a few now, but they seem significantly less visible; at the time the site was just infested with them. What made them particularly obnoxious was that they’d post unsourced, obviously fake quotations, and intersperse them with ads. Tired of seeing all these lazy, dishonest, and misleading bots clogging up the site, I decided to do my small part in improving the situation and create my own quote bot, with the primary goal of encouraging followers to learn more about Confucianism.
So, first of all, I needed to provide citations for every quote. That sounds extremely obvious, but the vast, overwhelming majority of quotes that roam about the internet don’t include one. However, I wanted viewers to be able to verify that the quote is accurate, read the full context, and ideally, go read the source book in its entirety and study it.
My process for selecting passages was simple and, I’ll admit, somewhat arbitrary. Starting with the Analects, I gradually read or re-read the Four Books and Five Classics, and marked passages that would work well on Twitter. That is, they needed to be insightful and provide some idea of the range of topics the canon addresses, while still making sense in isolation and within Twitter’s character limit, which was still 140 characters when I started. I chose the Four Books and Five Classics as my sources because, though the exact works considered canonical varied over the centuries, they seem like the most common configuration. It’s also a large enough group of works to give followers a full picture of the core ideas of Confucianism, even beyond the Analects, while still remaining at a manageable number and without including works whose authority may be controversial.
The next major question was choosing which translations to use. Ideally, I could use just one, but the only person to have translated all nine books was James Legge, and though I have a very high opinion of Legge, his wasn’t always the best version of a given passage, and his relatively wordy style often wasn’t a good fit for Twitter. So, I decided to choose on a case-by-case basis whose translation to use, with minor editing for consistency and to fit the character limit. For example, different translators used different Romanisation systems. At first, Wade-Giles was the most common among my sources, so I standardised everything to that. Later, Pinyin became more common, and since that’s the modern standard anyway, I went back and changed all of the names and terms to use Pinyin. This, by the way, was a headache, but it was necessary.
For those who care about the technical side of things, the first version was written using node.js, but later I converted it to Python. The Fediverse version was always in Python, and in fact I used it as the basis for rebuilding the Twitter version. The script itself is very simple: The selections exist in a giant array (of 349 entries), which the program shuffles, then iterates through. If it encounters an error, e.g., if Twitter is down or my internet connection is out, it pauses and tries again after a few hours. It’s always resided on a Raspberry Pi on my desk, first on a Pi 2, then a Pi 5.
Not long after I started using the Fediverse, I decided to port the bot. The longer character limit on my instance, cawfee.club, allowed me to include longer passages, so the Fediverse version is better all-round than the original.
That version is also still truly a bot. Relatively recently, X Formerly Known as Twitter began charging money for API usage, even for small bots like mine. I do not consider Twitter a service worth paying for, and remain there only because my e-friends won’t leave, so currently it’s updated manually by the sophisticated method of copy-and-pasting recent posts from the Fediverse bot. It’s not too much of a pain, but I also make no guarantees that I’ll keep doing that forever.
Anyway, we’ll close on a positive note. As mentioned above, I’ve received quite a bit of positive feedback about the bot over the years. It’s certainly the most successful project I’ve ever worked on, and I’m genuinely proud of it. The process of building it also gave me a chance to read the canon closely, and in fact pushed me to read a couple of the Five Classics for the first time. Even now, seeing my bot post is like seeing an old e-friend on the timeline, in some ways an extremely old friend. I named the Fediverse version of the bot Coffee with Confucius not just as a pun on my instance’s name (cawfee.club), but because an excellent way to engage with the canon is to treat its figures as real friends who you can sit down and have a coffee and conversation with.
Confucius, after all, said all these things for your benefit. Not just to his immediate followers, but to you personally, even if you’re outside of his “in-group” — he’s “catholic and not partisan,” after all. The Master, Mencius, Zengzi, and the rest, have much to say, even if you’re on the other side of the planet, even if you live many centuries after they did, even if you read them in media quite different from anything they knew. The internet these days is, well, not great, but I’m glad that with their help I’ve done something to make it at least a little better.