Identifying problematic code is not always easy. It is more of an art than a science. Trying to discover and isolate can be pains-taking experience. If you work with blacklists, you know what I’m talking about. As an example, implementing a blacklist can prevent specific types of pages from loading. Not good.
So, how do you fix this problem?
You simply remove the blacklist and test it for any suspect directives. One way to go about this process is to use the Perishable Press halving method – created by Jeff Star.
This is a proven process/technique for identifying and isolating problematic directives in blacklists and other sections of code that are common problem-starters.
How does the halving method work?
You start by removing one half of the code whenever you encounter problematic code. Once you’ve removed half of the code you are simply going to be looking for desired functionality. If you find that the issue has not been fixed, just remove another half of the code and retest it. You will want to continue this process until your are getting the desired functionality. Once the code you have left is working as intended, simply replace the last section of code you removed and keep going. After just a few rounds of this, you will be able to see that pesky code that has been causing you fits. Good luck!