Dead and outdated code is a stumbling block to upgrading, refactoring, and maintaining any software project, and at worse could become a security vulnerability. As a rule, we want to remove code and dependencies that just don’t belong in the code base anymore; however, it’s not always clear if and when dead code is really dead. Removing “zombie” code can be disastrous if it is still being used in production. We’ll cover common ways to statically identify dead code, and the accompanying pitfalls. We’ll then cover creating and using code tombstones in our project to definitively identify the living dead. Finally, we’ll discuss some best practices to avoid having zombies in your code in the first place!

Comments

Comments are closed.

John Boctor at 10:42 on 23 Apr 2024

Great talk. We all know dead code is awful, but zombie code is worse. Andy gives us the run down on how to identify and deal with the undead and has even written a library that can help us track them down and hunt them to extinction.

hunter yeago at 10:45 on 23 Apr 2024

Thanks for the talk! :)

Dead code is evil. Fun talk about adding code to sections of code that you think are dead in order to report that they are in fact alive. I was hoping for a bit more information about other available tools but the quick review of composer unused was nice.

First conference talk and it was really great! Fun and very informational.

Lew Ayotte at 11:26 on 23 Apr 2024

Great talk, very informative and helpful. My only qualm was that your clock animation on of your slides puts the hour hands past the 1 before the minutes hand hit 12. 🤣

Fascinating! I will definitely be including this, as I feel there are many methods that I have written, that due to changes in requirements, are no longer used, or were replaced by methods elsewhere.

Greg Turner at 11:56 on 24 Apr 2024

Good and useful talk! I really appreciated the starter Tombstone code.

Bobby Cahill at 16:23 on 25 Apr 2024

Excellent way to start the conference. Thanks Andy!