The Changelog: Software Development, Open Source

Machine powered refactoring with AST's (Interview)

Sep 19, 2019
Amal Hussein, Engineering Manager at npm and former open web engineer, dives into the world of Abstract Syntax Trees (ASTs) and their potential for transforming legacy code. She shares how ASTs improve code analysis over traditional methods and automate refactoring processes. Amal also discusses the importance of representation in tech leadership and how discontentment can drive innovation. With tools like JS CodeShift, she emphasizes demystifying ASTs to enhance development efficiency, making them accessible for all developers.
Ask episode
AI Snips
Chapters
Books
Transcript
Episode notes
ANECDOTE

Modernizing IE Tests with ASTs

  • Amal Hussein used ASTs to modernize thousands of IE tests at Boku.
  • These tests were valid for open web standards but used an outdated harness.
ADVICE

Bug Prevention with ASTs

  • When fixing bugs, consider if linting rules or tests could have prevented them.
  • Create custom linting rules and transforms as a first layer of defense.
INSIGHT

Democratizing ASTs

  • ASTs are not just for language writers; any developer can use them for refactoring.
  • Tools like ASTExplorer.net and JS CodeShift simplify AST manipulation.
Get the Snipd Podcast app to discover more snips from this episode
Get the app