← All talks
2017 JSHeroes / tim.js Romania

Warping Time with Async/Await

Live-coding codemods that transform callback hell into clean async/await. The talk where I refactored legacy code on stage and the audience followed along.

JavaScriptAsyncLive CodingCodemods

Why this talk matters

Async/await landed in Node.js 7.6 and was about to transform how JavaScript developers wrote asynchronous code. But migration was the hard part. Codebases had years of callbacks and Promise chains.

This talk took a different angle: instead of just explaining async/await syntax, I live-coded codemods (automated code transformations) that converted callback-based code to async/await. The audience watched real legacy code transform in real time.

The companion repository (async-await-codemod-demo) on GitHub provided all the before/after examples and the codemod scripts so attendees could run the transformations on their own codebases.

Key takeaways

  • Codemods are the secret weapon for large-scale code migrations. Don't refactor by hand what you can automate.
  • Async/await isn't just syntactic sugar. It changes how you think about error handling, control flow, and code readability.
  • Live coding in talks is high risk, high reward. When it works, the audience learns more in 5 minutes of watching you code than in 20 minutes of slides.

This was delivered at a time when the JavaScript community was transitioning from Promises to async/await. The codemod angle made it immediately practical: attendees could go home and migrate their codebases that evening.