DEV Community

Cover image for qotm: a programming quote in your terminal, with its source checked
WessCoby
WessCoby

Posted on

qotm: a programming quote in your terminal, with its source checked

Programming has a canon of one-liners: premature optimization, the two hard things, testing shows the presence of bugs. Look one up and you'll find it on dozens of sites, rarely with a source, and sometimes credited to someone who never said it.

I found that out about my own project. The first qotm (2019) shipped 110 quotes with no sources; when I checked them this year, 7 were credited to the wrong person and 36 couldn't be traced at all. I wrote about that here: https://wesscoby.com/blog/seven-out-of-a-hundred-and-ten

So qotm 2 is a rebuild around sources: it prints one quote in your terminal, but only ones that have been checked.

npm i -g qotm
qotm --source
Enter fullscreen mode Exit fullscreen mode
Simplicity is a great virtue but it requires hard work to achieve it and
education to appreciate it. And to make matters worse: complexity sells better.
β€”  Edsger W. Dijkstra
   On the nature of Computing Science, 1984 Β· cs.utexas.edu/users/EWD/…/EWD896.html
Enter fullscreen mode Exit fullscreen mode

How a quote gets in

Every quote has a public history on qotm.dev:

  1. Submitted by someone, with whatever source they have.
  2. Verified: a verifier finds the original (the book and page, the paper, the talk, the mailing-list post) and checks the wording. A quote with only second-hand sources is marked needs evidence; one that turns out to be someone else's is rejected or re-credited.
  3. Curated: a curator picks it for the next release against a short checklist (on topic, readable in a terminal, not a duplicate, will still read well in five years).

If a quote's wording turns out to be wrong, the fix is public: the quote page shows the earlier wording and the date it changed.

The starting corpus came from Wikiquote, using only the quotes its editors file as sourced, and treating its Disputed and Misattributed sections as a blocklist. The current release has 502 curated quotes across 25 topics, from programming and Unix to science and the history of computing.

The CLI

No account, no network, no dependencies. The curated dataset is a 350 KB SQLite file inside the npm package, read with Node's built-in node:sqlite (Node 22.16 or 24+). That makes it fast enough to run in every new shell:

command -v qotm >/dev/null && qotm   # end of ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

A few more commands:

qotm --topic debugging     # one topic
qotm --author dijkstra     # one author
qotm save                  # favorite the last quote, kept locally
qotm sync                  # fetch the latest release, checked against its sha256
qotm login                 # optional: sync favorites with qotm.dev
Enter fullscreen mode Exit fullscreen mode

Every command is at qotm.dev/cli.

The dataset is open

Releases are versioned SQLite files with a manifest (size, sha256, what was added, corrected or withdrawn). Quote texts from Wikiquote stay under CC BY-SA 4.0 with credit to its contributors; the code is MIT. Everything is on GitHub: the CLI, the web app, the API and the corpus pipeline.

Put it on your profile

https://qotm.dev/today.svg is the quote of the moment drawn as a terminal card, for a GitHub profile README:

![Quote of the moment](https://qotm.dev/today.svg)
Enter fullscreen mode Exit fullscreen mode

Help wanted

The most useful thing you can send is a misattribution: a quote you know was never said by the person named. Report it on the quote's page and it goes to a verifier. You can also submit quotes, or your own lines, at qotm.dev.

Top comments (0)