The personal website of Chris Coyier

On Deleting Code

It doesn’t take very long on a project to get to the point where deleting code feels better than writing it.

Sometimes it means you found a better way to do it that requires less code.

Sometimes it means you discovered a way to re-use some code from elsewhere in the project. That’s exciting because next time it comes up you can re-use it again.

Sometimes it means you are ripping something out of the site, which means you have the good sense, authority, and cojones to do that. That also means you are in a good place.

It always means that there is less code to support in the future. Supporting code is mental weight and reducing that load is as good for your health as losing physical weight.

It always means that you aren’t afraid of that part of your site. Anymore, at least. The longer you go without touching some code the more unfamiliar (read: scarier) it becomes.

It always means that you grow up as a developer a little bit when you’re done.

Originally published at The Pastry Box Project.