{
  "id": 3172768,
  "title": "Ranking by exponential decay without a cron job",
  "url": "https://urgent.news/2026/08/25/ranking-by-exponential-decay-without-a-cron-job",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-25T02:13:59.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/deland/ranking-by-exponential-decay-without-a-cron-job-4ifp"
  },
  "original_language": "en",
  "account": "The author built a board with 1,000 tiles where the order changes based on a value called heat. Heat is calculated by adding up payments, each with an exponential decay factor. To avoid frequent calculations, the author stored heat as a single pair (P, t_P) instead of individual payments. They then used logarithms to simplify heat calculations and stored it as rank_key. This rank_key is used to order tiles, with no need for a scheduled job to recompute rankings. The author also provides a function for adding heat values in a numerically stable way. They caution against choosing the wrong time unit for rank_key calculations and emphasize that rank_key is only for ordering, not for computing actual heat values.",
  "summary": "I built a board of 1,000 tiles where anyone can pay to take a tile away from whoever currently holds it. Tiles are sorted by \"heat\" — a value that decays over time — so the board reorders itself continuously. The obvious way to do that is a scheduled job that recomputes every row on a timer. I didn't want a scheduled job. Here's how you avoid one. The problem Heat is the sum of every payment a…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}