Programming practice (Re: [prog] MySQL connections from PHP files -
Close or keep it open for queries?)
Mary
mary-linuxchix at puzzling.org
Mon May 2 10:27:04 EST 2005
On Mon, May 02, 2005, Jacinta Richardson wrote:
> Did you notice that strange question mark in my search_entry function up
> there? Hopefully it's not that strange. That's a placeholder. I write a
> ? where I'd otherwise write data and then allow the database driver to make
> sure it's properly quoted and handled.
It can be useful to make your editor highlight placeholders that you
intend to replace later: vim highlights "FIXME", "TODO" and "XXX" by
default although this is adaptable.
Some people also find that it's a good idea to have a the program check
for placeholders at a high level and fail, because otherwise you can
forget to take them out again. The failures act like a todo list. Tim
Bray discusses it here:
http://www.tbray.org/ongoing/When/200x/2005/01/18/TestingOrder
-Mary
More information about the Programming
mailing list