loader from loading.io

Whether or Not to Repeat Yourself: DRY, DAMP, or WET

Code[ish]

Release Date: 12/15/2020

Getting to the Heart of Twelve-Factor Apps show art Getting to the Heart of Twelve-Factor Apps

Code[ish]

On this week’s episode of Code[ish], Vish Abrams joins Jon Dodson to talk about the role of AI, the ways Twelve-Factor aids developers, and how science fiction shaped a little of their own history.

info_outline
Introducing Heroku Vibes show art Introducing Heroku Vibes

Code[ish]

This week’s episode is an exciting one because we’re talking about our brand-new release, Heroku Vibes! Mauricio Gomes joins Jon Dodson to go over what Heroku Vibes is, what it’s capable of, and how it could be a game-changer for developers and non-developers alike.  Join the pilot by visiting

info_outline
Talking Traces and OpenTelemetry show art Talking Traces and OpenTelemetry

Code[ish]

Jon Dodson has an 11-year Heroku veteran with him on the podcast this week, Principal Member of Technical Staff Alex Arnell. Together they talk through the native integration of OpenTelemetry in Heroku Fir, the benefits of traces over traditional logs, how they assist debugging, and what’s next for observability in modern development.

info_outline
Heroku in the Wild: Vanshiv on Using the Right Tools show art Heroku in the Wild: Vanshiv on Using the Right Tools

Code[ish]

You won’t find too many developers with more experience in the Salesforce ecosystem than our guest this week! Not only is Gaurav Kheterpal a Salesforce MVP and Trailblazer, he also still uses his original Salesforce org from 2007. He joined Julián Duque to discuss how Vanshiv Technologies delivers client work with Heroku, the importance of embracing AI, and why it’s vital for developers to keep an open mind in choosing the right tool for the job.   

info_outline
What’s Possible with Heroku AppLink show art What’s Possible with Heroku AppLink

Code[ish]

This week we’re taking a deeply technical dive into our newest feature: Heroku AppLink! Jon Dodson is joined by Chris Wall, Salesforce Architect and creator of AppLink, to explore what AppLink offers developers and how it brings Heroku and Salesforce closer together. 

info_outline
Agentforce for Developers show art Agentforce for Developers

Code[ish]

Salesforce Principal Developer Advocate Mohith Shrivastava joins us on Code[ish] this week to share a few tips and tricks for using Agentforce! Speaking with Julián Duque, the pair cover a range of insightful dev topics including working with agents, vibe coding, programmatic deployment, and more. 

info_outline
Looking into the Future of Agentic AI with Kit Merker show art Looking into the Future of Agentic AI with Kit Merker

Code[ish]

At the bleeding edge of computer vision is Plainsight Technologies, a company that’s modernizing infrastructure to handle future agentic AI workloads. Join us as we speak with CEO Kit Merker on Plainsight’s vision for the future, technological goals, and the leading case studies for computer vision. Hear from host Julián Duque and Kit Merker in this new, insightful episode of the Code[ish] podcast.  

info_outline
Heroku in the Wild: reinteractive on AI and Rapid POCs show art Heroku in the Wild: reinteractive on AI and Rapid POCs

Code[ish]

We love hearing from developers who are building amazing things with Heroku, and this episode of Code[ish] is a perfect example! CEO of Australian firm reinteractive, Errol Schmidt, is here to speak with Julián about what his team has achieved and what they’re working on next.  Together, they discuss why Heroku is the best tool for Ruby on Rails development, how organizations can safely integrate AI, and the importance of being able to quickly stand up proof-of-concept apps. 

info_outline
Spring Boot with Guest Josh Long show art Spring Boot with Guest Josh Long

Code[ish]

This week, Julián is joined by the first Spring Developer Advocate and Java champion, Josh Long! Tune in as the pair discusses Spring Boot and tools like Spring AI, Spring Modulith, Spring Cloud, and Spring Shell that build upon it.  If you're a Java veteran like Josh, or returning to it after years away like Julián, this Tips & Tricks episode of Code[ish] will bring you up to speed.

info_outline
Getting Started with Slack Apps and Slack AI show art Getting Started with Slack Apps and Slack AI

Code[ish]

Slack can be so much more than a way to chat with your colleagues. In this episode of Code[ish], we’re joined by Maria José Hernández to find out how Slack Apps and Slack AI can elevate the app into an organization-wide, personalized Work OS.  In conversation with Julián Duque, Maria shares insights into the tools available for developers, and what’s included in the Slack Developer Program. Whether you’re pro-code or no-code, this episode is packed with valuable information to help you build, innovate, and improve your workday with Slack.  

info_outline
 
More Episodes

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!