Urgent.News

What's breaking now, across thousands of outlets.

Tech

Twitter Added id_str in 2010 Because JavaScript Can't Hold a Java long

Book: Kotlin and Java to TypeScript Also by me: The TypeScript Library — the 5-book collection My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools Me: xgabriel.com | GitHub On October 18, 2010, Twitter told every developer on its API that tweet IDs were about to change shape. A new generator called Snowflake would produce 64-bit IDs, and…

On October 18, 2010, Twitter informed developers that tweet IDs would change from 53-bit numbers to 64-bit IDs. This change necessitated the inclusion of a string version of each ID to accommodate JavaScript's limitation in representing the larger IDs. The result is the addition of the `id_str` field in the API, which is still present today.

Despite the widespread use of this field, it still causes issues when transferring IDs between the server and client, resulting in 404 errors or incorrect data being saved on the server. This issue arises due to JavaScript's inability to accurately represent the larger 64-bit IDs, resulting in rounding errors when the IDs are parsed back into numbers.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Bluesky wants to make it easier to buy, sell, and fundraise on the network

The executives argued that advertising isn’t the only path to monetization, and that there are alternative models that are feasible when it comes to monetization.

  • Bluesky plans to launch payment features soon, aiming to generate revenue without ads.
  • CEO Toni Schneider and COO Rose Wang unveiled plans at TechCrunch Disrupt.
  • Focus on simplifying monetization, enabling users to support content and services on the network.

More from Thursday 15 October →