Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
http://rubykaigi.org/2016/presentations/chrisarcand.html Good news! Ruby is a successful and mature programming language with a wealth of libraries and legacy applications that have been contributed to for many years. The bad news: Those projects might contain a large amount of useless, unused code which adds needless complexity and confuses new developers. In this talk I'll explain how to build a static analysis tool to help you clear out the cruft - because there's no code that's easier to maintain than no code at all! Chris Arcand, @chrisarcand Chris is a Ruby developer at Red Hat on the ManageIQ core team. He enjoys working full time on open source software to manage The Cloud™ and has contributed to various projects in the Ruby ecosystem. Chris hails from Minnesota in the United States and also enjoys hockey, hiking, and tasty beers.
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
In the presentation titled **Deletion Driven Development: Code to delete code!**, Chris Arcand discusses the challenges posed by legacy code in Ruby projects and advocates for the practice of deleting unused code to enhance maintainability and clarity in applications. The talk highlights that while Ruby has thrived with extensive libraries and applications, accumulating obsolete code creates unnecessary complexity for developers. ### Key Points Discussed: - **Introduction to the Speaker and Context**: Chris Arcand introduces himself and shares his love for programming, particularly his passion for deleting code. He stresses the burden posed by dead code in legacy applications. - **The Problem with Dead Code**: Unused methods clutter projects and cause confusion, particularly for new developers, contributing to an increased maintenance workload. - **Origins of Dead Code**: Chris identifies common scenarios where dead code originates, including unnecessary method additions during initial project stages or a lack of oversight during code reviews. - **Static Code Analysis Tools**: The presentation outlines how to build a static analysis tool to detect uncalled methods. Chris introduces concepts such as parsing Ruby code to create an S-expression data structure via Ruby Parser, processing this structure to identify method definitions and their usage in code. - **Development of the Dead Method Finder**: Chris explains how to create a method tracker that identifies methods defined but never called. Important edge cases are acknowledged, including method calls using dynamic methods or Rails-specific conventions. - **Recent Tools**: He mentions an existing gem called **DeBride** that builds upon the concepts discussed and improves upon method tracking with better edge case handling. This tool can facilitate the detection of not only dead methods but also methods called infrequently, guiding developers towards code that may need refactoring. - **Conclusion and Advice**: Arcand emphasizes that deletion of unused code is a powerful practice, advocating for developers to seek out and remove unnecessary code systematically. He concludes by reminding the audience that no code is easier to maintain than the absence of code, promoting a cleaner and more efficient coding environment. In summary, Chris Arcand’s session imparts valuable insights on improving project maintainability through code deletion and encourages using tools to assist in this process.
Suggest modifications
Cancel