201 subscribers
Looks like the publisher may have taken this series offline or changed its URL. Please contact support if you believe it should be working, the feed URL is invalid, or you have any other concerns about it.
התחל במצב לא מקוון עם האפליקציה Player FM !
102. Whether or Not to Repeat Yourself: DRY, DAMP, or WET
סדרה בארכיון ("עדכון לא פעיל" status)
When? This feed was archived on December 12, 2020 08:26 (
Why? עדכון לא פעיל status. השרתים שלנו לא הצליחו לאחזר פודקאסט חוקי לזמן ממושך.
What now? You might be able to find a more up-to-date version using the search function. This series will no longer be checked for updates. If you believe this to be in error, please check if the publisher's feed link below is valid and contact support to request the feed be restored or if you have any other concerns about this.
Manage episode 294560469 series 2501898
Robert Blumen is a DevOps Engineer at Salesforce, joined by Ev Haus, Head of Technology at ZenHub. Together, they're going over a critique over several methodologies when writing code as part of a large team. First, there's DRY, which stands for Don't Repeat Yourself. It's the idea that one should avoid copy-pasting or duplicating lines of could, in favor of abstracting as much repeated functionality as possible. Then, there's DAMP, or Don't Abstract Methods Prematurely, which is somewhat in opposition to DRY. It advises teams to not create abstractions unless they are absolutely necessary. Last on the list is WET, or Write Everything Twice. This is the idea to embrace duplication whenever possible.
Ev notes that, like many programming absolutes, the success of each strategy depends entirely on the context. DRY, for example, sounds like a really good idea, until it happens everywhere. Suddenly, a chunk of code becomes difficult to reason, as a developer jumps around various method definitions to piece together a flow. DAMP often makes sense as a counterpart to DRY, because if you abstract too early in your codebase, you may find yourself overloading methods or appending arguments to handle one-off cases. DRY is typically best suited for testing environments, where an absolutely reproducible set of explicit steps is often preferable in order to quickly understand what is occurring.
No matter the strategy you use, the core tenant is to solve the problem first. Try to accomplish the goal you need to, whether that's adding a feature or squashing a bug. Don't over optimize until you've finished what you need to, and don't think too far into the future about all the possible edge cases. The rest of the balance comes with experience. Some duplication is bad, but not all of it. Figuring out the absolute perfect solution is unlikely, so you've got to put the code out into the real world to find out what works. After that, bake some flexibility into your processes to adjust hot code paths or refactor them when needed!
Links from this episode
- ZenHub is an agile project management tool for GitHub
- Wikipedia's definition of DRY
- "Using DRY, WET & DAMP code" is Ev's article on different coding methodologies
- Codewars is a website with programming puzzles and challenges
- The Pragmatic Programmer by Dave Thomas is a popular book highlighting some of these concepts
- DRY code, DAMP DSLs by Jay Fields and DRY vs DAMP in Unit Tests by Vladimir Khorikov are more write-ups on the subject
132 פרקים
סדרה בארכיון ("עדכון לא פעיל" status)
When?
This feed was archived on December 12, 2020 08:26 (
Why? עדכון לא פעיל status. השרתים שלנו לא הצליחו לאחזר פודקאסט חוקי לזמן ממושך.
What now? You might be able to find a more up-to-date version using the search function. This series will no longer be checked for updates. If you believe this to be in error, please check if the publisher's feed link below is valid and contact support to request the feed be restored or if you have any other concerns about this.
Manage episode 294560469 series 2501898
Robert Blumen is a DevOps Engineer at Salesforce, joined by Ev Haus, Head of Technology at ZenHub. Together, they're going over a critique over several methodologies when writing code as part of a large team. First, there's DRY, which stands for Don't Repeat Yourself. It's the idea that one should avoid copy-pasting or duplicating lines of could, in favor of abstracting as much repeated functionality as possible. Then, there's DAMP, or Don't Abstract Methods Prematurely, which is somewhat in opposition to DRY. It advises teams to not create abstractions unless they are absolutely necessary. Last on the list is WET, or Write Everything Twice. This is the idea to embrace duplication whenever possible.
Ev notes that, like many programming absolutes, the success of each strategy depends entirely on the context. DRY, for example, sounds like a really good idea, until it happens everywhere. Suddenly, a chunk of code becomes difficult to reason, as a developer jumps around various method definitions to piece together a flow. DAMP often makes sense as a counterpart to DRY, because if you abstract too early in your codebase, you may find yourself overloading methods or appending arguments to handle one-off cases. DRY is typically best suited for testing environments, where an absolutely reproducible set of explicit steps is often preferable in order to quickly understand what is occurring.
No matter the strategy you use, the core tenant is to solve the problem first. Try to accomplish the goal you need to, whether that's adding a feature or squashing a bug. Don't over optimize until you've finished what you need to, and don't think too far into the future about all the possible edge cases. The rest of the balance comes with experience. Some duplication is bad, but not all of it. Figuring out the absolute perfect solution is unlikely, so you've got to put the code out into the real world to find out what works. After that, bake some flexibility into your processes to adjust hot code paths or refactor them when needed!
Links from this episode
- ZenHub is an agile project management tool for GitHub
- Wikipedia's definition of DRY
- "Using DRY, WET & DAMP code" is Ev's article on different coding methodologies
- Codewars is a website with programming puzzles and challenges
- The Pragmatic Programmer by Dave Thomas is a popular book highlighting some of these concepts
- DRY code, DAMP DSLs by Jay Fields and DRY vs DAMP in Unit Tests by Vladimir Khorikov are more write-ups on the subject
132 פרקים
כל הפרקים
×![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
1 118. Why Writing Matters for Engineers
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
1 117. Open Source with Jim Jagielski
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
1 115. Demystifying the User Experience with Performance Monitoring
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
1 114. Beyond Root Cause Analysis in Complex Systems
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
1 113. Principles of Pragmatic Engineering
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
1 112. Managing Public Key Infrastructure within an Enterprise
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
1 111. Gift Cards for Small Businesses
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
1 109. Meditation for the Curious Skeptic
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
1 108. Building Community with the Wicked CoolKit
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
1 I Was There: Stories of Production Incidents II
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
1 107. How to Write Seriously Good Software
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
1 106. Growing a Self-Funded Company
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
1 104. The Evolution of Service Meshes
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
1 102. Whether or Not to Repeat Yourself: DRY, DAMP, or WET
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
1 99. The Technical Side of Deep Fakes
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
1 98. The Ethical Side of Deep Fakes
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
1 Special Episode: Health Metrics at Scale
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
1 97. The Challenges of Bespoke Solutions in a Regulated World
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
1 I Was There: Stories of Production Incidents
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
1 93. Conferences in a Virtual World
![Code[ish] podcast artwork](https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/32.png 32w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/64.png 64w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/128.png 128w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/256.png 256w, https://cdn.player.fm/images/23686112/series/BR0PSa6K222OMf3v/512.png 512w)
![Code[ish] podcast artwork](/static/images/64pixel.png)
1 92. Strategies for Improving Your Mental Health
ברוכים הבאים אל Player FM!
Player FM סורק את האינטרנט עבור פודקאסטים באיכות גבוהה בשבילכם כדי שתהנו מהם כרגע. זה יישום הפודקאסט הטוב ביותר והוא עובד על אנדרואיד, iPhone ואינטרנט. הירשמו לסנכרון מנויים במכשירים שונים.