Today I Learned: Tombstones for code

June 6, 2021

An interesting 5-minute talk called Isn't That Code Dead? where David Schnepper talks about a technique called "Tombstones."

The simple technique where you place a marker in your code which logs if it's ever called. After a while, you check your logs and see what markers are untouched, giving you the confidence to remove that code.

Great way to find dead code in situations where the compiler can't help you, for example interfaces exposed on the network.

Tombstones is a simple technique which can help you reduce the lines of code by eliminating dead code.