News

Sep 27, 2006 7:42 pm

Bad Code = Headache

Yesterday I took a quick look through this site to put together the beginning of a todo list. I noticed that the link to my photo gallery disappeared on all pages besides my index page. This seemed a little perplexing because the nav is built through a config file that is included on every page. How could the same function work on one page but not the others?

I took a look at the code tonight to see what was going on and noticed something pretty bad. A while ago I created a config directory and moved some of my configuration files. Halfway through the process, I got distracted by something else and I never came back to finish it (I completely forgot that it wasn't finished). It turns out that I never deleted the old config files and only the index page was pointing to the new config directory.

The fix? No, not cleaning everything up... Hacking everything so it works as is. I'll get around to actually fixing the config settings when I finish cleaning up my directory structure (and databases). Oh yeah, that'll also be around the same time that my browser starts bitch-slapping visitors using IE. I know, browser sniffing is bad and feature detection is good, but detecting certain features breaks IE, so sometimes the only check you can do is a browser check.