in reply to Keep Those Conditionals Tight

I would also say if you have stupid HTML guys (and don't we all) consider using a templating system that limits the amount of damage they can do, e.g. HTML::Template.

I guess you also might ask why are null (or even blank) titles allowed for a document. To me, this is an example of why properly designed databases, including constraints, etc, are so important. It can mean a lot of these sort of problems simply disappearing. And yet many developers (including myself) often skip over things like constraints, or make them wide open just because it's "easier".

(Of course, either of these points may not be applicable to your particular project, but they're the sort of things I'd be thinking about if I encountered this type of bug).

Replies are listed 'Best First'.
Re^2: Keep Those Conditionals Tight
by friedo (Prior) on Mar 10, 2006 at 15:21 UTC
    I would also say if you have stupid HTML guys (and don't we all) consider using a templating system that limits the amount of damage they can do

    I realize now it wasn't clear from my post, but the bad template logic was written by me, not the dumb HTML guy.

    I guess you also might ask why are null (or even blank) titles allowed for a document. To me, this is an example of why properly designed databases, including constraints, etc, are so important.

    Indeed. Unfortunately, in MySQL, when you have a varchar column declared NOT NULL, and you fail to supply a value, it enters an empty string, which is fale in Perl.