Thursday, July 20, 2006


Further IE Strangeness

My development work browser is Mozilla (I do my surfing in FF). Years of fighting IE means that I generally write stuff that will just work in that browser without having to test it too extensively. So, naturally, I became a little complacent... and don't even test in IE anymore.

My boss is finding that a portion of Javascript validation for the current project is just not working. His work browser is IE...

Here's my code:

name = find('name'+i); email = find('email'+i);
if (name.value == "")
 alert("Please enter this name")
 return false;

So when I don't enter a name, Moz/FF warns me. IE... just pretends like it's not there. No warning or error.

Turns out, for some reason, that name is reserved in some way.. I can still use it.. it just ignores what I do with it!

Changing name to namefield fixed it.


The ActiveRecord pattern

The ActiveRecord pattern is one of the most useful patterns to come out of the current excitement over Ruby on Rails: Rails didn't invent it, it just made it popular.

But it is not limited in any way to Rails or Ruby. A PHP framework I'm using at the moment, called PHP On Trax (more on that later), has a great PHP implementation of ActiveRecord. You don't even have to use their whole stack to take advantage of their ActiveRecord implementation.

So why aren't Design Patterns more popular ?

Wednesday, July 19, 2006


My mssql tip for the day: Create a database named 'aaaaa'

The aaaaa database: it covers for your mistakes

The database restore tool in Enterprise Manager selects the first database alphabetically as the one to restore over. If you forget to change that trouble ensues. Having a dummy database in place means you will never restore over anything important. Our A customer was not too pleased when he lost a days work; especially the second time it happened.

I can truthfully say, though, that it wasn't me! *phew*

This page is powered by Blogger. Isn't yours?