Reply to post: Re: PHP always makes me cringe

'I bet Russian hackers weren't expecting their target to suck so epically hard as this'

Anonymous Coward
Anonymous Coward

Re: PHP always makes me cringe

"Why is the table name being parametrised?"

Because someone was taught to do that at U and has never questioned it ever since.

I was once confronted with a class with a fairly simple functionality that required a large xml resource file. A number of tables had all been parameterised and the resource file converted one table name to another. When I asked why I was told, "Because the table names in the schema might change, and then without the xml file things would stop working"

So...what happens when someone somehow changes the schema, and someone forgets to fix the xml file? Exactly the same as not reviewing the source code, that's what. But xml is magic fairy dust.

And if you are altering the schema often enough for that to be an issue, you have other problems.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon