Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
A talk from RubyConfTH, held in Bangkok, Thailand on December 9-10, 2022. Find out more and register for updates for our 2023 conference at https://rubyconfth.com/ RubyConfTH 2022 videos are presented by Cloud 66. https://cloud66.com
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 this presentation titled "Refactoring for Rails - Using Deodorant to Prevent Code Smells," Rodrigo Urubatan discusses the importance of refactoring in Ruby development during the RubyConfTH 2022 held in Bangkok, Thailand. He emphasizes that refactoring is essential for maintaining code quality and enhancing developers' efficiency. **Key Points Discussed:** - **Refactoring Principles:** Urubatan introduces refactoring concepts based on Martin Fowler’s book "Refactoring" and emphasizes the need to recognize when and how to refactor code to prevent issues commonly referred to as 'code smells'. - **Common Code Smells:** He discusses examples of code smells, such as the absence of tests, complex conditional statements, and the presence of large, cumbersome classes or methods. - **Good Practices for Refactoring:** - Ensure all tests pass after refactoring. - Allocate time for refactoring in daily work. - Keep pull requests focused; tackle refactoring separately from feature development to improve review clarity. - **Refactoring Techniques:** Urubatan explains useful refactoring techniques such as extracting methods, consolidating functionality into modules, and properly structuring classes to enhance readability and maintainability. He recommends using plugins for text editors like VIM and Sublime Text for efficiency in performing these tasks. - **Tools for Improvement:** Tools like RoboCop are suggested to automate code quality checks before committing code, allowing for quick fixes and ensuring compliance with programming standards. - **Real-World Example:** He shares a case study from his company where failure to update test cases led to issues after adding a new tag type, illustrating the potential consequences of neglecting test coverage during refactoring. - **General Advice:** The speaker advises developers to be cautious about over-complicated and bloated classes or methods, stressing the importance of clear organization and simplicity in codebase structure. **Main Takeaways:** - Regular refactoring leads to cleaner code, fewer bugs, and ultimately more free time for developers. - Integrating refactoring into the development process is crucial to maintaining a healthy codebase. - Each iteration should include dedicated time for refactoring to avoid technical debt accumulation. - Leveraging tools and good practices helps prevent code quality issues that could lead to increased future work or complications in development.
Suggest modifications
Cancel