Programmer Moments

I’ve just had one of THOSE moments. You know, those programmer moments.
My client called me tonight, and told me that the page that loads all the different clothing was blank. It works in Chrome, so I didn’t actually notice it (I didn’t do anything to the page, really, so I didn’t think to test it in IE). I was tossing everything around, tearing apart a copy of my site, and eventually had it nearly identical to an old version of the site that worked. It still threw the error.
Eventually, I started replacing everything that wasn’t necessary. and found that it was coming from my XML document. I had a good long search through there before I managed to find that it was something in each of the last two XML entries, so I went down through the long list of elements until I found something that looked a bit like an 8, but with the top chopped off. I deleted the character, and it loaded up fine.
I was using a pixel font (I KNOW; I’M SO CRAZY), so what I thought was an 8 was actually ‘½’. It was for a hat that has a 3 ½” crown. Now I know: Internet Explorer can’t handle special characters in XML, while Chrome (and probably others; I didn’t test) can.

The golden rule is to test everything after every change. Ideally, I think you’re supposed to test before and after. You can think of these tests as save points. If something goes wrong, you know it’s something that was working last time you saw it working, so the question becomes, “What did I do since I saw it working?” If the list is long, you’ll be at it for hours. I did a great deal of stuff in the last few days, and I hadn’t tested much. I was worrying that it was something acting up with the server-side includes, which shouldn’t pose a problem but did act up on me when I had CSS disabled. For some reason, it added the commented-out HTML as plain text. On CSS Naked Day, I ended up just deleting those comments so the page didn’t look stupid.

In retrospect, that page is the oldest one on the site. I think it was the first thing I made, unless I threw up a quick “home” and “about” and whatever beforehand. It’s using old Ajax XML stuff with plain javascript, from the end of January. It’s crazy thinking back two months ago and seeing that everything is trash. I’ll leave you with an image from that era:

Leave a Reply