How do you think about optimizing for deletion?

On the most recent episode of OwnGoals my co-host led us into the weeds around optimizing for the deletion of code as a way to enable the progressive evolution of a codebase over time. In particular, he talked about how he’s upgraded his two year old codebase a few times as he learned more about React and the ecosystem has evolved.

I’m curious to know if anyone else places this much importance on optimizing for deletion over say, something else. I’m going to dive deeper into this topic on my newsletter so I’m very interested in hearing different perspectives on this.

1 Like

At Wayfair we do a ton of A/B and multivariate tests. The best way to setup such a test to take the winning result is to compartmentalize the code as much as possible. Cleanup then consists of simply deleting the failed branch. React is awesome for this and hooks make life even easier by abstracting much of the stateful logic and data fetching.

I think the most common optimization is “optimize for nothing”.

This was a fantastic episode and I think your monologue about this concept could be directly transcribed as a useful newsletter.

Great food for thought.

1 Like

@danielruhl yeah I think that hooks and component models in general help a lot with this kind of approach. Cool to hear that you’ve found it useful.

@joel Writing it up.

1 Like

@chris
The art of destroying software by Greg Young is a talk I love about this topic
https://vimeo.com/108441214

1 Like