Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
"I didn't have time to write a short letter, so I wrote a long one instead." -Mark Twain Writing small classes is hard. You know you should, but how do you actually do it? It's so much easier to write a large class. In this talk we'll build up a set of small classes starting from nothing using a set of directed refactorings applied as we build. All while keeping our classes small. We'll identify abstractions yearning to be free of their big object cages. In the process we'll also see how basic patterns such as composition, delegation and dependency injection emerge from using small objects. We'll even write some tests too. Help us caption & translate this video! http://amara.org/v/FG2s/
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 video titled "Write Small Things," Mark Menard discusses the importance of writing small, clean, well-designed code within the object-oriented programming paradigm, particularly in Ruby. Emphasizing that writing small classes is challenging yet essential, Menard focuses on methods and classes, advocating for their iterative development through refactoring and design. He highlights key points such as: - **The Risks of Large Code**: Large, unwieldy code can become "zombie code" that is too difficult and risky to alter, leading to duplication of effort. - **Concept of Small Code**: Small code refers not to writing less but to having manageable methods and classes that can be composed effectively. - **Design Discipline**: Writing small code requires iterative design and refactoring, evolving towards clarity and modularity rather than being created from scratch. - **Importance of Composition**: Small, well-designed methods and classes facilitate a loosely coupled system, allowing for easier adjustments and code maintenance. - **Future Adaptability**: A cornerstone of Menard’s argument is that successful software will need to evolve; writing small, clear code lays the groundwork for this adaptability. - **Key Tools**: He discusses tools for achieving smallness in code like 'extract method,' 'extract class,' and 'composed method' as central practices for refactoring. - **Method Principles**: Menard stresses the importance of methods performing one task, minimizing arguments, and separating queries from commands, illustrating that such structuring leads to cleaner and more maintainable code. - **Dependency Management**: He emphasizes managing dependencies thoughtfully to avoid complex, tightly coupled structures, advocating for dependency injection where appropriate. - **Real-World Example**: The construction of a command line options library serves as a practical example throughout the talk, showcasing the application of these principles in a relatable context. In conclusion, Menard urges developers to focus on clear abstractions and small method design as key strategies in crafting applications that are sustainable and adaptable for future changes. He invites fellow developers to engage with these practices to promote better coding standards.
Suggest modifications
Cancel