4 ms·
Completely agreed. When I work on code I have a sliding scale of likelihood of re-usability in mind for a given task that determines how I write it. A piece of
by andrewvc 15y ago
Completely agreed. When I work on code I have a sliding scale of likelihood of re-usability in mind for a given task that determines how I write it.
A piece of code that defines complex behavior for a weird list type with strange properties on a single page? It's going to be short, tightly coupled, and not very extensible. If it needs to be extended later, we'll throw it away. That's OK.
If I'm writing a framework, hell yeah I'll think carefully through things like composition, and adhere more closely to some design patterns.
Really though, I like designing APIs from extractions, and determining coupling based on what I learn from those extractions, rather than adhering to generalized principles so closely.