Today’s issue: Aaron Sorkin’s JavaScript muse, getting gaslit by Claude, and the shocking truth about Miško Hevery (that we definitely made up).
Welcome to #365.
JavaScript devs after copying a flawed Java date API
You might not have a real date lined up for Valentine’s Day next week, but I’ve got some good news – our collective relationship with the highly toxic Date
object in JavaScript might be coming to an end.
That’s because the Temporal API, which will replace Date
and improve the experience of working with dates and times in JavaScript, is starting to land in browsers.
Why the Change? Date
launched with the very first version of JavaScript back in 1995, copying Java’s (flawed) java.util.Date
API.
The Java crew wised up and unalived it in 1997 (shout out to Mametchi, my Tamagotchi who also died that same year), but JavaScript just… let it ride.
The problem? It sucks.
It only supports the user’s local time and UTC, it has no time zone support, its parsing behavior is unpredictable, and it’s mutable – which can lead to some particularly fun bugs.
To cope, many of us have relied on bloated libraries like Moment.js and date-fns, but those come with their own downsides.
Enter Temporal: the hero we deserve. It’s designed to be a full replacement for the Date
object, giving us a strong and predictable life partner date management system we can rely on.
It adds support for time zones and various calendar systems, and it comes packed with over 200 utility methods for conversions, comparisons, computations, formatting, and more.
Temporal also introduces a few key concepts to streamline our date-time adventures:
Instants – Think of these as unique points in history. Temporal.Instant
can represent a specific moment in time, down to the nanosecond.
Wall-clock times – Temporal.ZonedDateTime
lets you set up clocks for specific time zones, like a bank or newsroom would have.
Durations – Need to calculate the difference between two times? Temporal.Duration
has you covered.
Bottom Line: Firefox is doing a great job leading the charge with Temporal, and we should hopefully get full cross-browser support later this year.
But for now, the current version is still unstable. RIP Mametchi.
![]() ![]() ![]() ![]() |
You mean we're supposed to be testing the code the AI writes for us too?
Front-end codebases are getting more complex than ever – and chances are, your team’s monitoring situation hasn’t kept up.
That’s why Datadog created their Front-end Developer Kit, a free collection of resources that’ll help you better understand user activity and catch front-end issues early.
It gives you instant access to:
A Best Practices Guide that details key strategies for monitoring and testing used by top front-end teams
A Solution Brief with a step-by-step walkthrough for proactively catching and resolving issues
An on-demand livestream on how to optimize front-end applications
Get it for free – and save your frontend before it’s too late.
They just launched Terminal Errors Detection to automatically catch pesky terminal errors and gather all the data needed for the fix. Bolt stays winning.
What gets logged?
let sharedVariable = "initial";
setTimeout(() => {
sharedVariable = "updated by first timeout";
}, 500);
setTimeout(() => {
if (sharedVariable === "initial") {
console.log("Shared variable not yet updated");
} else {
console.log("Shared variable was already updated");
}
}, 500);
Ryan Dahl just shared an update on the Oracle-JavaScript trademark lawsuit – but I’ll probably just wait for Aaron Sorkin to turn it into a courtroom drama with characters who all talk really fast.
Dan Farrelly (Inngest’s CTO) wrote this deep dive on The principles of Durable Execution. It could come in handy next time that one co-worker starts talking crazy about distributed systems.
ES Module Shims 2.0 just came out with TypeScript type stripping support.
CarbonQA provides high-quality QA services that scale. Their US-based testers will break your app repeatedly, work directly in your tools, and do all the manual testing you hate doing yourself. [sponsored]
Daniel De Laney wrote about how chat is a bad UI pattern for devtools, which might explain why Claude keeps gaslighting you.
Beej’s Guide to Git is the only Git resource you’ll ever need, despite sounding like the name of the treasure map in Goonies.
David Cramer wrote about product-market fit. But I’m not really sure what qualifies him to write this post besides co-founding a software company that prints hundreds of millions of dollars a year.
Salma Alam-Naylor wrote about how she learned to code with her voice
The Angular Documentary just dropped. It’s great, but if we want this thing to get picked up by Hulu or Netflix, we’re gonna need Miško to start a cult or fake his own death (preferably both).
What gets logged?
let sharedVariable = "initial";
setTimeout(() => {
sharedVariable = "updated by first timeout";
}, 500);
setTimeout(() => {
if (sharedVariable === "initial") {
console.log("Shared variable not yet updated");
} else {
console.log("Shared variable was already updated");
}
}, 500);
In JavaScript, the execution order for setTimeout
callbacks with identical delays aren’t deterministic. This means we aren’t guaranteed that the first timeout callback will execute first (which can be the cause of some nasty and difficult to reproduce bugs). In reality it’s almost always what you’d expect (“Shared variable was already updated”), but it’s best not to rely on that behavior.
Here’s a famous talk by Philip Roberts to learn more about the event loop and how JavaScript handles asynchronous code.