4 ms·
I don't build something complex from scratch, it comes from working simple systems. I don't know where to abstract and genericize (it's a word now) code until
by proksoup 12y ago
I don't build something complex from scratch, it comes from working simple systems.
I don't know where to abstract and genericize (it's a word now) code until I know where things are repeated.
I am more frustrated and confounded by my peers' attempts to abstract prematurely than I am if they had simply tried to write code that did what it needed to do instead of planning for a potential future before we have any idea what that potential future is like.
My process is
1) Write it for one case
2) When the second case comes along, consider abstracting
3) When the third case comes along, much more seriously consider abstracting
4) When the fourth case comes along, it's probably embarrassing to not have abstracted yet ... but depends on the goals of the project and the timeline and the ease of learning the abstraction for the peers.