Your Last Computer Program

There are plenty of tutorials in the world for your first computer program, usually involving “Hello World.” But why are there not any for the last program you’ll ever write? This is the first tutorial for that, split into different scenarios:

    • Case 1: You’re paying Anthropic.
      import os; os.system("curl -fsSL https://claude.ai/install.sh | bash")

      Congrats; now you just dictate to Claude.

    • Case 2: You’re dying. Maybe don’t worry about starting a new project in this case and actually finish that Wordle-clone you promised your partner five years ago. I wish you the best.
    • Case 3: You’ve been promoted to manager.
      rm -rf /

      No more Linux for you buddy.

    • Case 4: You’ve joined a monastery. Not sure why you’re looking at this, but you can probably just write the following and be satified with your spiritual life.
      #!/usr/bin/env python3
      """
      verse_of_the_day.py from KJV
      Usage:
      python verse_of_the_day.py # today's verse
      python verse_of_the_day.py 2026-01-01 # verse for a specific date
      """
      import json
      import os
      import sys
      import hashlib
      import datetime
      import urllib.request
      CACHE_DIR = os.path.expanduser("~/.verse_of_the_day")
      CACHE_FILE = os.path.join(CACHE_DIR, "kjv.json")
      RAW_BASE = "https://raw.githubusercontent.com/aruljohn/Bible-kjv/master"
      BOOKS_URL = f"{RAW_BASE}/Books.json"

      def _book_filename(book_name: str) -> str:
      # "1 Samuel" -> "1Samuel.json", "Song of Solomon" -> "SongofSolomon.json"
      return book_name.replace(" ", "") + ".json"

      def download_bible():
      """Fetch all 66 books once and flatten into a single verse list."""
      os.makedirs(CACHE_DIR, exist_ok=True)
      with urllib.request.urlopen(BOOKS_URL) as resp:
      books = json.loads(resp.read())
      all_verses = []
      for book in books:
      url = f"{RAW_BASE}/{_book_filename(book)}"
      with urllib.request.urlopen(url) as resp:
      data = json.loads(resp.read())
      for chapter in data["chapters"]:
      for verse in chapter["verses"]:
      all_verses.append(
      {
      "ref": f"{book} {chapter['chapter']}:{verse['verse']}",
      "text": verse["text"],
      }
      )
      with open(CACHE_FILE, "w") as f:
      json.dump(all_verses, f)
      return all_verses

      def load_bible():
      if os.path.exists(CACHE_FILE):
      with open(CACHE_FILE) as f:
      return json.load(f)
      print("No local copy found — go get some wifi one last time...")
      return download_bible()

      def verse_for_date(verses, date: datetime.date):
      # Deterministic pick: same date always gives the same verse,
      # spread pseudo-randomly across all ~31,000 verses.
      digest = hashlib.sha256(date.isoformat().encode()).hexdigest()
      index = int(digest, 16) % len(verses)
      return verses[index]

      def main():
      if len(sys.argv) > 1:
      date = datetime.date.fromisoformat(sys.argv[1])
      else:
      date = datetime.date.today()
      verses = load_bible()
      verse = verse_for_date(verses, date)
      print(f"\n{date.isoformat()}")
      print(f"{verse['ref']}")
      print(f"{verse['text']}\n")

      if __name__ == "__main__":
      main()

Pied-à-terre

small living unit, e.g., apartment or condominium, often located in a large city and not used as an individual’s primary residence

Of course there’s a French word for this.

Terrific Trio

Pressure is trying to pass for four when you just turned seven, at the “Miss Toddler Panama city” pageant.

You’re crammed into the same five-inch heels you wore the year before, blood pooling in your toes.

But you know if you don’t win, mom can’t fix the hole in the gator fence, so you’ll be up all night, s*ab gators.

Pressure is performing on a party boat that catches on fire, your throat burning from the smoke.

You still sing so beautifully that it calms the passengers, so that you and the crew can escape.

Pressure is singing the Yemeni national anthem while a handsome but ruthless general pushes a scimitar into your neck, Kristin Chenoweth’s corpse at your feet.

That’s pressure. – Jenna Maroney

Pressure is trying to finish the New Yorker magazine before the next issue arrives.


STRFKR concert was dope.


I guess I’m a poet now:

The Flying Mattress

There was a mattress store near my apartment in Providence which never had people in it. Since it lies between where I lived and a popular local taquería, the storefront was actually quite familiar to me. There would always be a sign reminiscent of Word’s Pop Art announcing a sale, and several mattresses lied in the darkness through the dusty panes of glass.

Not once did I notice the lights turned on. All this convinced me that this was in fact a front for the notorious mafia in Providence. After all, Providence was renounced for their intimate ties with organized crime, College Hill was not the cheapest real estate, and, most importantly, there were no, nil, nada, zip customers.

For four years of my time in PVD, it just sat there. Seemingly abandoned. I don’t know if I preferred it to be a barren storefront, or just one with no character. But eventually an electric bike company peddling (get it?) their wares took over the lease.

But perhaps, I misunderstand the economics of a quality mattress. Maybe selling one a week was enough to go even, with its high prices justified by the substantial mass of a mattress.

After all, a mattress should be hefty in weight, able to withstand the tossing and turning of the, sadly, probably overweight sleeper for years on end. The mattress might even increase in weight as the various dandruff, hair and dust mites bury themselves into the seams and folds of the mattress.

This means that a mattress flying through the air would be surprising…

… which is exactly what happened today when a mattress nearly landed on the hood of my car tonight while commuting back home.

Moral of the story: don’t buy mattresses which can fly when blown by gusts of air, but if you do, please dispose of it properly.

Calvin’s Interesting Question

Calvin and Hobbes (October 19, 1989)

Given a set of positive integers $\{q_i\}_{i=1}^n$, describe the set $s_t \in S$ of positive integers such that there exists only one linear combination of $\sum_{i=1}^n a_i q_i = s_t$.

In the comic above, it’s pretty obvious with the amount of money given, that Calvin was hoping to get four “D”s. In fact, all integers from 1 to 9 can only be expressed in one permutation.

A satisfying answer to all sets of integers might be less trivial.

Yet another qualm

This past Sunday was the only day when a broken clock could be potentially correct for more than two times a day.

But you know what’s annoying? Changing the clocks on ovens and cars by pressing the “H” button eleven times.