Be WET between modules, DRY within modules

DRY (Don't Repeat Yourself) WET (Write Everything Twice)

DRY has been an admirable rule, but the most significant application of it had meaning 2-3 decades ago when everybody had to care about the result size of the source code.

But still, it is a good practice in SOME PLACES. Like, you have a class and an implementation that repeats a few times in this class. This is a sign that you should apply the DRY.

Check out my simple diagram what is the goal and importance od the WET.

Artur Wojnar

Stuck on a hard technical decision?

Book a short call and let's talk about where you're stuck.

Book a call >>
๐Ÿ‡ฌ๐Ÿ‡ง EN
๐Ÿซ’

HermesJS ๐Ÿซ’๐ŸŒฟ

Reliable messaging for Node.js / TypeScript. Hermes PostgreSQL (logical replication) & Hermes MongoDB (change streams) implement the Outbox pattern โ€” span a DB transaction over persisting an entity and publishing a message. A library, not a framework.

Docs >>