Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
We care about writing quality code, we have read the definition of SOLID principles several times and we know how important they are for writing good OO code, but are we really following those principles? Is there a pragmatic way of following them in our day to day jobs or are they just some principles a few computer scientists wrote? Fortunately there is, SOLID principles are not just good ideas , they are intended to help us write better code, enjoy our jobs more and be happy programmers. But, where should we start? We should start where we always do. By writing tests, yes, for real. As Kent Beck says "TDD doesn't drive good design. TDD gives you immediate feedback about what is likely to be bad design", so we need to go a step further. In this talk we will see how writing tests is not just *doing TDD* is about having good test coverage, it's also about driving our code towards good design, one that follows SOLID principles. Help us caption & translate this video! http://amara.org/v/FG3a/
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
The video titled "SOLID Principles Through Tests" presented by Sebastian Sogamoso at LA RubyConf 2014 discusses the importance of incorporating SOLID principles in software design, particularly through the practice of Test-Driven Development (TDD). Sogamoso emphasizes that while a significant number of developers might practice TDD, merely doing so does not ensure good design or code quality. He highlights the critical relationship between testing and design, asserting that tests serve as essential indicators of potential design flaws. Key points discussed in the video include: - **Understanding SOLID Principles**: The SOLID acronym encompasses five core principles: - **Single Responsibility Principle (SRP)**: A class should have a single reason to change to avoid unnecessary complexity. - **Open/Closed Principle (OCP)**: Classes should be open for extension but closed for modification, allowing for the addition of new features without altering existing code. - **Liskov Substitution Principle (LSP)**: Objects should be replaceable by instances of their subclasses without issues, ensuring proper polymorphism. - **Interface Segregation Principle (ISP)**: Favor smaller, specific interfaces over large, general ones to simplify maintenance. - **Dependency Inversion Principle (DIP)**: High-level modules should rely on abstractions instead of low-level details to promote flexibility. - **Testing as a Design Tool**: The speaker introduces the concept of utilizing tests to guide good design decisions. For example, a shipping method model is discussed, showcasing how tests can help identify responsibilities and promote decoupling. - **Pragmatic Approach**: Sogamoso urges that SOLID principles should not be applied rigidly. Instead, developers are encouraged to develop good habits and apply these principles contextually, adapting them to their specific scenarios. The video effectively illustrates that adhering to SOLID principles can significantly enhance code maintainability, reduce dependencies, and promote developer satisfaction. Sogamoso wraps up with a quote from Kent Beck, reiterating the value of cultivating good programming habits over merely striving for a perfect code design. He concludes by welcoming questions, indicating a willingness to engage further with the audience on the discussed topics.
Suggest modifications
Cancel