Speaker
Abstract
With the Enzyme test framework no longer supporting React 18, migrating to React Testing Library (RTL) became imperative.
At Slack, our hybrid approach integrated an Abstract Syntax Tree (AST) method and a Large Language Model (LLM) using Anthropic's AI model, Claude 2.1. Despite initial hurdles, we achieved an 80% conversion success rate.
Key innovations included AST conversions and annotations, DOM tree collection, stringent control mechanisms, and packaging all information into a cohesive pipeline with LLM call and feedback steps. This resulted in a 64% adoption rate and a 22% time-saving in test case conversion.
This success underscores the value of AI in large-scale code migrations and establishes a robust, innovative approach for similar challenges.
Interview
The focus of my work these days includes three main areas: code migrations, test code generation, and integrating LLMs into developer workflows. I am particularly interested in understanding where LLMs fit in the development life cycle and how to smoothly integrate them. Additionally, I am working on open-sourcing the Enzyme to RTL codemod, which is the topic of my presentation at QCon.
The motivation for my talk is to share our innovative approach for complex code conversions that has proven to be successful at Slack. With Enzyme still seeing 1.5 million weekly downloads, there's a real need for an efficient method to automatically convert Enzyme tests to React Testing Library (RTL). By showcasing a real-life use case of LLMs for code conversions, I'd like to demonstrate how this technology can save significant engineering hours and provide a practical solution for developers facing similar challenges
The target audience for my talk is mid to senior software engineers who are actively building AI solutions. These individuals are likely to have a solid foundation in software development and interest in leveraging AI to enhance their workflows and solve complex problems.
I want this persona to walk away with a clear understanding of how we used LLMs to tackle our specific conversion problem and how this approach can be relevant to their own tasks. I would like to showcase the practical benefits of AI, addressing skepticism and proving its effectiveness in certain cases.
I believe the next big disruption in software will be the simplification of writing software that will significantly reduce the need for hard skills. This will likely be achieved through an additional layer of abstraction on top of existing coding languages, enabling developers to accomplish the same tasks with less complexity. This advancement will democratize software development, making it more accessible to a broader range of people and accelerating the pace of innovation.
Topics
QCon San Francisco 2024 is a three day conference for senior software engineers, architects and team leads. An international program committee of working engineers selects every session. Patterns and practices, not products and pitches.
Part of the track
Engineering Productivity Hosted by Jennifer Bevan Senior Staff Software Engineer @Google, Previously at the Jet Propulsion LaboratoryFrom the same track
Tuesday 19 November
10:35 Seacliff ABC Session Productivity Productivity Lessons in Moving from Big Tech to Scaling a Startup Rachel Potvin SVP Eng @Sanity.io with 25 Years in Tech, Previously @Google and @GitHub, Engineering Leader Focused on Building Productive Happy Teams Most productivity research happens in large tech companies. Many of the lessons learned there apply to the world of Startups as well, but some don't carry over. 11:45 Seacliff ABC Session Engineering productivity Inflection Points in Engineering Productivity as Amazon Grew 30x Carlos Arguelles Senior Principal Engineer @Amazon, 27 Years Experience in Developer Productivity Engineering, Previously @Google and @Microsoft I joined Amazon in 2009, when we were a 3000-engineer company, and got to experience its fast growth from 3k to 90k engineers over a 15-yr period. During that time, our engineering productivity needs had a number of interesting inflection points. 13:35 Seacliff ABC Session Security or Convenience - Why Not Both? Dorota Parad CEO @Authress, Product and Team Builder, Test Enthusiast Traditionally, security is all about creating obstacles and making it difficult to access data. This is at odds with our drive for a more smooth and faster development process. How can we keep the software we’re building secure without adding friction for engineers? 14:45 Ballroom BC Session Research Supporting Engineering Productivity for All Emerson Murphy-Hill Research Scientist at the Intersection of Software Engineering and Human-Computer Interaction, Former Googler and Professor Understanding what drives software development productivity is the key to making high-impact investments in engineering productivity. 15:55 Ballroom BC Session Engineering Efficiency Shifting Left for Better Engineering Efficiency Ying Dai Principal Software Engineer @Roblox, Working on Improving Engineering Efficiency. Previously @Google & @LinkedIn In this presentation, I will share two critical migration stories - one focuses on production monitoring and the other on production deployments with automated validations. 17:05 Ballroom A Session AI/LLMs Slack's AI-Powered, Hybrid Approach for Large-Scale Migration from Enzyme to React Testing Library Sergii Gorbachov Staff Software Engineer @Slack, Specializing in AI-Driven Tools for Automating Code Migrations and Test Authorship With the Enzyme test framework no longer supporting React 18, migrating to React Testing Library (RTL) became imperative.