Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Ben believes that the best way for programmers to learn is to watch each other work. We'll leave slides behind and focus instead on the greater information density achieved through live coding. We'll discuss the strengths and weaknesses of real code, and refactor it right onstage. As we do so, we'll bump into lots of meaty topics: - Potential downfalls of the 'extract module' refactoring (aka ActiveSupport::Concern). - The pros and cons of Dependency Injection. - How two good OO design ideas (like SRP and Tell Don't Ask) can contradict each other, and what to do about it. - How well--placed functional programming can improve a codebase. - Whether the Law of Demeter should be followed religiously, and what it means if that's hard to do. - Why fast tests are usually good tests, and vice versa. - Audience participation is strongly encouraged, as is stealing the speaker's Vim tricks for your own use.
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 "Live Coding with Ben," presented at Ancient City Ruby 2013 by Ben Orenstein, the session revolves around the concept of pair programming and the practical exploration of coding practices. The session emphasizes learning through observation and dialogue rather than traditional lectures. Ben introduces several key coding principles and practices through a live coding demonstration, where he investigates a code sample while inviting audience participation. Key points discussed include: - **Refactoring Principles**: The core of the session is about improving code through refactoring, focusing on collaboration and understanding the nuances of good coding practices. - **Law of Demeter**: Ben highlights the importance of adhering to the Law of Demeter, which promotes loose coupling between classes to avoid structural duplication and improve maintainability. He explains violations of this principle in the provided code examples. - **Duplication and Coupling**: The conversation extends into the significance of avoiding duplication in code, cross-referencing the DRY (Don’t Repeat Yourself) principle and discussing coupling and its implications for code quality. - **Dependency Injection**: Ben explores the pros and cons of dependency injection, illustrating how it can enhance the flexibility and extendibility of code without necessitating modifications to existing classes. - **Testing Practices**: Emphasis is placed on the relationship between code quality and testing, particularly the mantra of fast tests often equating to good tests. - **Code Smells**: Throughout the talk, the concept of 'code smells' is introduced, which indicates potential issues in code that warrant attention. - **Audience Engagement**: Ben encourages audience members to actively engage by asking questions and sharing insights during the coding process, creating an interactive learning environment. The session concludes with the core takeaway that adhering closely to principles like the Law of Demeter and practicing good habits while coding can lead to superior software design. Ben emphasizes that while perfection may not always be achievable, striving for better code should be a continuous goal for developers.
Suggest modifications
Cancel