Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
RubyConf 2016 - Surgically Refactoring Ruby with Suture by Justin Searls The next feature means changing legacy code. The estimate just says "PAIN" in red ink. Your hands tremble as you claim the card from the wall. For all of Ruby's breakthroughs, refactoring is as painful as 2004, when Feathers' book released. It's time we Make Refactors Great Again. That's why I wrote Suture, a gem to help at every step: In development, new code is verified against recorded calls In staging, old & new code is ensured side-by-side In production, unexpected errors fall back to the old code With renewed confidence and without fear, you grab the card. You've got this.
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
**Surgically Refactoring Ruby with Suture** is a talk presented by **Justin Searls** at **RubyConf 2016**. The discussion addresses the challenges of refactoring legacy Ruby code, emphasizing the need for systematic approaches to manage this process effectively. Searls introduces **Suture**, a Ruby gem designed to facilitate safer refactoring by treating code changes like surgical procedures. He articulates the following key points throughout his presentation: - **Refactoring Challenges**: Refactoring legacy code is often perceived as risky and complex, leading to mental discomfort among developers. Searls highlights that the more a piece of code is intertwined with different variables and conditions, the higher the difficulty in modifying it without introducing bugs. - **Business Perspectives**: He points out the difficulties in selling the concept of refactoring to business entities, as it is seen as low priority compared to feature development and bug fixes. This perception often results in a lack of resources allocated for necessary refactoring efforts. - **Refactoring Tools**: Searls reviews existing methods such as characterization testing and A/B testing, which serve to manage risk during code changes. He explains that characterization testing can help encapsulate legacy code behavior, allowing developers to refactor with confidence. - **Introduction of Suture**: The primary focus of his talk is the introduction of the **Suture** gem, which supports developers in every stage of refactoring, including planning, development, staging, and production. Suture allows for recording and replaying interactions with legacy code to ensure that refactoring does not disrupt existing functionality. - **Key Features of Suture**: - Records interactions through a seam in the code. - Validates new implementations against recorded data. - Provides fallbacks in production environments if issues arise with new code. - Allows for smooth deletion once refactoring is complete. - **Practical Examples**: Throughout the talk, Searls provides examples, including a flawed calculator and tally service implementations, to demonstrate how Suture can be applied. He explains how to record calls, validate against expected behaviors, and refactor code while maintaining safety for users. - **Concluding Thoughts**: Searls emphasizes the importance of making changes safe for users and suggests that keeping users unaffected during the refactoring process should remain a primary goal. He encourages attendees to consider how they can contribute to the Ruby community and improve their refactoring practices. In summary, Suture aims to revolutionize the way developers approach legacy code refactoring by introducing a comprehensive tool that ensures methods remain functional while changes are made, ultimately maintaining the integrity of existing systems.
Suggest modifications
Cancel