160: DRY, WET, DAMP, AHA, and removing duplication from production code and test code
Should your code be DRY or DAMP or something completely different?
How about your test code? Do different rules apply?
Wait, what do all of these acronyms mean?
How about your test code? Do different rules apply?
Wait, what do all of these acronyms mean?
We'll get to all of these definitions, and then talk about how it applies to both production code and test code in this episode.
Links:
- The Pragmatic Programmer, 20th Anniversary Edition
- Don't repeat yourself - Wikipedia
- a-ha - Take On Me
- Rule of three - Wikipedia
- What does “DAMP not DRY” mean when talking about unit tests? - Stack Overflow
Sponsored by:
- The Complete pytest course is now a bundle, with each part available separately.
- pytest Primary Power teaches the super powers of pytest that you need to learn to use pytest effectively.
- Using pytest with Projects has lots of "when you need it" sections like debugging failed tests, mocking, testing strategy, and CI
- Then pytest Booster Rockets can help with advanced parametrization and building plugins.
- Whether you need to get started with pytest today, or want to power up your pytest skills, PythonTest has a course for you.
Creators and Guests
