The Self Test
by in CodeSOD on 2016-03-10I consider code cleanup to be important, almost as important as actually writing code, especially since I spend a lot of time doing maintenance and support. During idle time, I enjoy digging through existing code to find overcomplicated algorithms and dead code and see what I can simplify or even delete. While there may not be an immediate benefit, it makes future debugging far easier if you trim out dead code and shorten 3,000 line C files to 500 line ones. And quite often, subtle and difficult-to-diagnose bugs simply go away.
While doing this on one of our products, I found a very old public API that appears to have never been completed. At least I hope so, because there’s no way any of it does anything remotely useful.