Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Don’t Hang Me Out To DRY by Kevin Murphy Close your eyes and imagine the perfect codebase to work on. I bet you’ll say it has complete test coverage. It’s fully-optimized, both in terms of performance and architectural design. And, of course, it contains only DRY code. Surely we can all agree that this is an aspirational situation. But...do we really want that? Don’t get me wrong; these qualities are all beneficial. However, if we also think we should value everything in moderation, when should we push back on these ideals? What problems can they introduce? Let’s talk about the exceptions to some of the “rules” we all hold dear. #confreaks #rubyconf2019
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 his presentation "Don’t Hang Me Out To DRY" at RubyConf 2019, Kevin Murphy critically examines the adherence to software development principles like DRY (Don't Repeat Yourself), full test coverage, and performance optimization, questioning their applicability across different scenarios. Key points discussed include: - **Aspirational Code Quality**: Murphy reflects on the ideal codebase, which boasts complete test coverage, optimizations, and only DRY code. While these qualities are desirable, he stresses that they should be applied with caution. - **The Pitfalls of Blind Adherence**: Blindly following best practices can lead to complications or bugs. He narrates a scenario at a fictional company, Ivory Tower, where a seemingly straightforward issue reveals deeper problems caused by overemphasis on test coverage. - **Real vs. Perceived Coverage**: A critical point is raised about code coverage metrics. Having full coverage does not guarantee that all business scenarios are tested. He illustrates this with an example involving a test that falsely reassures developers after stubbing a collaborator without understanding the broader implications. - **Flaky Tests and Maintenance**: The issue of flaky tests, which can obscure real problems, is highlighted through discussions on coding practices and debugging challenges faced by teams. This leads to inefficient workflows and developer frustration. - **The Trade-Off between DRY and Readable Code**: Murphy introduces a conflict between writing DRY code and maintaining clear, accessible code (termed DAMP: Descriptive And Meaningful Phrases). Enhancing code readability often requires some duplication, which can lead to better long-term collaboration and maintainability. - **Performance**: He emphasizes writing performant code based on data rather than assumptions, sharing a cautionary tale about the unnecessary transition to Rust for performance gains without adequate justification or understanding. Concluding, Murphy notes that best practices are essential but should not be applied rigidly. Developers should be flexible and seek to balance the ideals of making code work, making it right, and ensuring it performs well, all tailored to specific project needs and contexts. The key takeaway urges developers to critically assess when and how to apply particular coding guidelines to avoid negative impacts on their projects.
Suggest modifications
Cancel