News for hackers. Stuff that matters.
Re:Making Wrong Code Look Wrong by masklinn on Tuesday August 23, 2011 @05:28AM (#2915958)
Except now the combinatorial explosion gets even worse. How do you prefix a b64 blob which has been SQL-escaped, urlencoded and htmlencoded? `urlhtmlsqlb64String`?
Re:Making Wrong Code Look Wrong by JadeNB on Tuesday August 23, 2011 @11:41PM (#2919355)
It seems like 'combinatorial explosion' might not be the right phrase here. There is a combinatorial explosion of possible prefixes, but, since you're not going to search the possible-prefix space, it doesn't really matter. (For example, there is a combinatorial explosion of unprefixed variable names, and nobody's bothered by that!) The question is whether you can decode a given prefix, and, even in your example, that's easy. (Prefix ambiguities could easily be resolved with underscores, like url_html_sql_b64_string.)

I'm not arguing for this convention (I don't much like it myself); but I don't think your argument is a very strong point against it.

EDIT: Oops, sorry, I just noticed that it wasn't you who brought up the explosion in the first place.

Re:Making Wrong Code Look Wrong by tedunangst on Tuesday August 23, 2011 @07:51AM (#2916200)
uh, why would you have one of those except to crap on the idea? have you ever had a sql and html escaped string?
Re:Making Wrong Code Look Wrong by masklinn on Tuesday August 23, 2011 @08:02AM (#2916220)
No, but I have had b64 urlencoded htmlencoded strings.