Talks
Speakers
Events
Topics
Search
Sign in
Search
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
search talks for
⏎
Suggest modification to this talk
Title
Description
By, Jillian Foley New programmers often react with dread when the word "refactoring" starts getting thrown around at standup. Maybe you've seen fellow Rubyists struggle with old code, or a colleague spend days on one module only to end up with exactly zero changes to functionality. What exactly is refactoring, and why would anyone want to do it? What are some tips for approaching a refactor, both generally and in Rails? Help us caption & translate this video! http://amara.org/v/G71X/
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 talk 'So You Want to Start Refactoring?' presented by Jillian Foley at RailsConf 2015, the focus is on demystifying the concept of refactoring for new programmers and outlining effective strategies for improving existing code without changing its external behavior. Foley begins by discussing her personal experience with legacy code—code previously written by others—and emphasizes the common apprehension surrounding the term 'refactoring'. The key points discussed include: - **Definition of Refactoring**: Foley cites Martin Fowler's definition that describes refactoring as a disciplined technique for restructuring existing code without altering its external behavior. - **Importance of Refactoring**: The reasons highlighted include: - **Maintainability**: Well-organized code is easier to understand and modify. - **Scalability**: Structured code allows for better performance and easier onboarding for new developers. - **Flexibility**: Clean code facilitates quick adjustments and pivots. - **General Cleanup**: Similar to personal habits, code also requires periodic cleaning to enhance productivity. - **Identifying the Need for Refactoring**: Signs that indicate refactoring is necessary include overwhelming bugs, decreased performance, and new team members' confusion over existing code. - **Preparing for Refactoring**: Foley emphasizes the importance of preparation, such as increasing test coverage, reviewing functionality, and understanding code style before starting a refactor. For instance, she suggests not to mix changing tests while modifying application code. - **Approach to Refactoring**: The steps include annotating the code, starting with small changes, renaming variables for clarity, simplifying complex conditionals, and determining where code logically belongs. - **Case Study**: Foley gives a brief case study demonstrating her refactoring of a signup controller, detailing how she simplified variables, clarified code structure, and moved certain validations to the front-end. The talk concludes with the notion that refactoring does not have to be intimidating. By viewing it as a process for making code cleaner and safer for future developers, programmers can gain a better understanding and increase their skills. Foley invites viewers to consider refactoring their past projects as a way to reinforce their learning and improve their coding practices.
Suggest modifications
Cancel