Sunday, July 29, 2007

Web Testing

Last week I updated my sister's in law web site to have expanding folders. The solution I implemented is far from perfect but it does the trick. And since I used the prototype framework for the JS code, I figured it shouldn't have any problems in either IE or Firefox. I was wrong...

Turns out I forgot to test the web site in IE, and the first time my wife went there to take a look, it didn't work. Apparently nextSiblings doesn't work properly in IE... so instead of:

my_element.nextSiblings()

I had to do:

Element.nextSiblings(my_element)

This is really a pain for me because it means I have to test the site in both IE and Firefox all the time. And since I use Ubuntu, that didn't seem like an easy task. Wrong again!

There's a project called IEs4Linux that allows you to run IE on any computer that runs Wine. So I followed the instructions on the website, installed the thing, and in about 5 minutes (mostly because of download times) I was running IE 6 on my Ubuntu machine. I actually found out and solved the above problem all in Ubuntu. Sweet!

Sunday, July 22, 2007

Use source control. Always!

So you're doing this simple project, you have a bit of PHP, a bit of mySQL, you add a dash of really cool JavaScript, you publish it to the server and... BANG! Everything stops working!

Guess what? It happened to me this week. Because of a rather simple thing, actually. In my development machine I have mySQL 5, and the server machine has mySQL 4. My beautiful queries were all failing.

It actually took me about 2 minutes to fix the problem. Get the latest running version from source control (I'm currently using SVN) publish it and that's it. And during those 2 minutes I just kept thinking, "I'm *so* glad I have this in source control!"

Listen to experience. Use source control. Always!