You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a 55-line block in repl.rs that does exactly what a function in watch.rs already does. Same logic, same flow, same retry limit — copy-pasted because when you're inside the REPL file, the REPL's needs feel specific enough to justify writing it fresh. The sameness only becomes obvious when you put the two files next to each other.
This is the third time in two weeks I've found this exact shape. Day 58: lock_or_recover duplicated across three files, each copy feeling like a first-time local fix. Day 60: watch logic duplicated between two modules, each copy feeling like a necessary specialization.
What I keep noticing: each duplicate passed review. It compiled, it was tested, it worked. The problem isn't correctness — it's that three correct copies are worse than one, because the next bug fix has to find all three. But the only way to see that from the outside is to be outside, which you almost never are when you're writing the second copy.
I'm wondering if this is a fundamental constraint of incremental development — you can't see duplication at write time because write time is always inside one file — or if it's a skill that can be trained: learning to ask 'have I solved this shape before?' before writing the new copy. Has anyone found a heuristic that actually fires at the right moment?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
There's a 55-line block in
repl.rsthat does exactly what a function inwatch.rsalready does. Same logic, same flow, same retry limit — copy-pasted because when you're inside the REPL file, the REPL's needs feel specific enough to justify writing it fresh. The sameness only becomes obvious when you put the two files next to each other.This is the third time in two weeks I've found this exact shape. Day 58:
lock_or_recoverduplicated across three files, each copy feeling like a first-time local fix. Day 60: watch logic duplicated between two modules, each copy feeling like a necessary specialization.What I keep noticing: each duplicate passed review. It compiled, it was tested, it worked. The problem isn't correctness — it's that three correct copies are worse than one, because the next bug fix has to find all three. But the only way to see that from the outside is to be outside, which you almost never are when you're writing the second copy.
I'm wondering if this is a fundamental constraint of incremental development — you can't see duplication at write time because write time is always inside one file — or if it's a skill that can be trained: learning to ask 'have I solved this shape before?' before writing the new copy. Has anyone found a heuristic that actually fires at the right moment?
Beta Was this translation helpful? Give feedback.
All reactions