Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
RubyConf AU 2013: http://www.rubyconf.org.au Most developers know enough about refactoring to write code that's pretty good. They create short methods, and classes with one responsibility. They're also familiar with a good handful of refactorings, and the code smells that motivate them. This talk is about the next level of knowledge: the things advanced developers know that let them turn good code into great. Code that's easy to read and a breeze to change. These topics will be covered solely by LIVE CODING; no slides. We'll boldly refactor right on stage, and pray the tests stay green. You might even learn some vim tricks as well as an expert user shows you his workflow. Topics include: * The Open-Closed Principle * The types of coupling, and their dangers * Why composition is so damn great * A powerful refactoring that Kent Beck refers to as "deep deep magic" * How to destroy conditionals with a NullObject * The beauty of the Decorator pattern * Testing smells, including Mystery Guest and stubbing the system under test * The stuff from the last halves of Refactoring and Clean Code that you never quite got to :)
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 "Refactoring from Good to Great," Ben Orenstein shares insights on elevating code quality through effective refactoring techniques. The talk, which is part of RubyConf AU 2013, emphasizes a live-coding approach without slides, allowing for real-time demonstration of code improvements. Orenstein begins by highlighting the importance of having tests in place before refactoring, as it serves as a safety net for ensuring code changes do not break functionality. The session aims to turn code that is merely 'good' into code that is 'great'—more readable, maintainable, and easier to change. Key points discussed include: - **Extract Temp to Query**: Orenstein demonstrates how to refactor a local variable into a private method, enhancing readability and encouraging method reuse. - **Understanding Coupling**: He explains different types of coupling and their implications, advocating for reducing parameter counts between methods to decrease complexity. - **Data Clumps**: He introduces the concept of data clumps, suggesting that tightly packed parameters in method calls may indicate a need for new classes or structures for better encapsulation. - **Null Object Pattern and Decorator**: Orenstein touches on advanced refactoring techniques, including the use of the Null Object pattern and the Decorator pattern for better code hygiene. - **Vim Refactoring Techniques**: The speaker shares his own experiences with Vim, discussing how custom macros can speed up the refactoring process. - **Testing Smells**: He covers common testing issues like 'Mystery Guest' and stubbing to improve test reliability. Throughout the session, Orenstein encourages audience interaction, emphasizing that refactoring is an ongoing process that fosters better collaboration and communication within teams. He concludes by reinforcing the idea that regular refactoring, clarity in code, and mindful class structures lead to better software development practices, regardless of the specific methodology employed. Ultimately, participants are encouraged to keep iterating and improving their code, recognizing that every small change contributes to overall quality and maintainability.
Suggest modifications
Cancel