The day I deleted half my code and everything got faster

I had a file that had grown to a size I was embarrassed by. Every fix added a line, every line added a condition, every condition added a reason not to touch it.

One evening I opened it, read the whole thing, and realized that most of it was dead. Old options nobody used, safeguards for cases that could not happen anymore, features I had added and forgotten. I deleted about half of it in an hour.

The app got faster. The tests got simpler. The next feature took an afternoon instead of a week.

The thing I had been protecting was not complexity I needed. It was complexity I had accumulated, and I had mistaken its weight for value. Deleting it felt like losing progress right up until I looked at the results.

How do you decide what to delete? And have you ever cut something you were sure you needed?

4 views

Add a comment

Replies

Be the first to reply

Have a question or a thought to share? Add a comment above to start the conversation.