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.
01:04:15
forum Ask episode
web_stories AI Snips
view_agenda Chapters
menu_book Books
auto_awesome Transcript
info_circle Episode notes
question_answer 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.
volunteer_activism 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.
insights 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
This book, now in its second edition, provides a detailed catalog of refactoring techniques. It explains how to identify 'code smells' and apply behavior-preserving transformations to improve the design and maintainability of software. The book includes examples in Java and JavaScript, and it emphasizes the importance of testing and small, incremental changes to minimize the risk of introducing errors. The second edition reflects the changes in the programming landscape over the past two decades and includes new examples and techniques[2][4][5].
Amal Hussein (Engineering Manager at npm) joined the show to talk about AST’s — aka, abstract syntax trees. Amal is giving a talk at All Things Open on the subject so we asked her to give us an early preview. She’s on a mission to democratize the knowledge and usage of AST’s to push legacy code and the web forward.
Changelog++ members support our work, get closer to the metal, and make the ads disappear. Join today!
Sponsors:
All Things Open – Exploring open source, open tech, and the open web in the enterprise. Raleigh, NC — October 13-15, 2019
Linode – Our cloud server of choice. Deploy a fast, efficient, native SSD cloud server for only $5/month. Get 4 months free using the code changelog2019. Start your server - head to linode.com/changelog
GitPrime – GitPrime helps software teams accelerate their velocity and release products faster by turning historical git data into easy to understand insights and reports. Ship faster because you know more. Not because you’re rushing. Learn more at gitprime.com/changelog.
TeamCity by JetBrains – Build and release your software faster with TeamCity — a self-hosted continuous integration and delivery server developed by JetBrains. TeamCity is super-smart at running incremental builds, reusing artifacts, and building only what needs to be built, which can save over 30% of the daily build time. Learn more at teamcity.com/changelog.
We’ll be at All Things Open! We’re hosting a LIVE JS Party on stage and Jerod Santo is giving a talk on using Svelte for a radical new approach to building user interfaces. And as a special thanks from the team behind All Things Open, we’re giving away 5 free passes to the conference. All you have to do tweet “I want a free pass to All Things Open because…” and state your reason and copy @Changelog and @AllThingsOpen in the tweet.
We’ll DM the winners next Friday, September 27th — good luck!
For those who don’t want to wait and just want 20% off your ticket right now — use the code changelog20 when you buy your tickets. This code has UNLIMITED uses, so tell your friends! Head to allthingsopen.com to learn more and register.