What it means is to rewrite code. To take something apart — to feed it into the shredder — and put it back together again, but in a different, bet

Skin-Shedding Code - by Thorsten Ball - Register Spill

submited by
Style Pass
2024-09-27 10:30:02

What it means is to rewrite code. To take something apart — to feed it into the shredder — and put it back together again, but in a different, better way. It’s refactoring, but switching the scalpel for a sledgehammer.

When you say you refactor something, it might mean you change a single class, method by method, ensuring it works after each change.

Shredding, on the other hand, means to embrace destruction. To go on a shred is to delete five load-bearing functions all at once and recreating them. Deleting a type and its definitions, rebuilding it from the compiler errors. Creating an empty file and building from scratch a better version of what already exists in another file. Shredding is ripping out a page and redoing it.

The concept — taking something apart to recreate it — wasn’t new to me. What surprised me was how often it happens at Zed.

When I pair with Antonio, for example, he will often say “let’s delete this.” My response is usually to chuckle, but then he goes and deletes the whole thing in the time it takes for my pupils to dilate and a single syllable to leave my mouth: “uhm?”

Leave a Comment