Dan Abramov The wet codebase

eswarnichtsmehrfrei · 26K views · 2021 · 25:01

Open on YouTube

Software architecture & designTesting, debugging & developer toolstalk

Why Hacker News recommends it

Recommended in DRY versus duplication debates for its visuals and its case that copy/paste can beat a wrong abstraction.

What it is

Dan Abramov's talk on the wet codebase, using visualizations to show how removing all duplication too early produces wrong abstractions that are hard to unwind.

Recommended by 3 HN commenters across 3 different months, 2023 to 2024.

What Hacker News said

Strong rec halfcat · 2024-05 · on “Don't DRY Your Code Prematurely”

The visualizations in Dan Abramov’s talk “The wet codebase” [1] really burned this concept in for me. Seeing what a premature, wrong abstraction looks like visually was eye opening. [1] [this video]

Recommends shadowfoxx · 2023-08 · on “I don’t buy “duplication is cheaper than the wrong abstraction” (2021)”

In my career as a software dev I've found one thing to be true - Every Paradigm I ingest that opens new windows of opportunity are great at first pass and as I learn more the more narrow the scope they can be applied. (This is kinda true in life, too. Like when people say, "Its econ 101 or bio 101." etc. What seems like a statement about 'common' knowledge is actually an indication of how shallow your knowledge is!) Specifically related to this topic is a talk by Dan Abramov called, "The Wet Codebase" - He says it better than I can sum up and has visual aids : [this video] Other have pointed out code that is similar in function vs similar by coincidence and I think that thought alone is worth che

Recommends gosukiwi · 2023-08 · on “I don’t buy “duplication is cheaper than the wrong abstraction” (2021)”

I like Dan Abramov's "The Wet Codebase" ( [this video] ) -- I've been guilty of doing just what he says in his talk at first, removing all duplications and making the codebase DRY. But then I came to like "prefer duplication over the wrong abstraction", as Sandi Metz puts it. Sometimes it's good to wait to have more data to make an easier and more informed decision.

Recommends halfcat · 2024-08 · on “Algorithms we develop software by”

Dan Abramov talks about WET (write everything twice) [1] as generally a good approach, primarily because you often don’t know the right abstraction up front, and a wrong abstraction is way worse than a copy/paste. He has some good visuals that illustrate how incorrectly dependent and impossible to unwind wrong abstractions can become. [1] [this video]

Cites throwitaway1123 · 2024-10 · on “OOP is not that bad”

I agree with the general sentiment of your comment and I think there are several factors at play here. * The human brain is not capable of evaluating and re-evaluating every possible option amongst the plethora of technical choices developers are faced with. This forces us to develop certain coarse grained mental heuristics (prejudices and biases) to navigate technology, and even if these broad generalizations are roughly true initially, we tend not to re-evaluate them over time. This leads to stale biases (e.g. some library/language was missing an API 10 years ago, and someone formed an immutable opinion on it). * These broad generalizations lack nuance. I watched a talk recently by Dan Abr