PDA

View Full Version : The escape character in Carpal\'Tunnel


dtbog
01-09-2005, 10:00 PM
Well, I'm sure we've all noticed it by now -- the backslash-single-quote that separates the Carpal from the Tunnel in 2+2's most prestigious poster ranking. Given the choice:

sfer
01-09-2005, 10:22 PM
I've have 5000+ posts. Whatever prestige there was, is now lost.

dtbog
01-09-2005, 10:45 PM
Don't you think 10K should have a new one?

-DB

Riskwise
01-09-2005, 10:48 PM
YES

dtbog
01-09-2005, 10:48 PM
[ QUOTE ]
Whatever prestige there was, is now lost.

[/ QUOTE ]

Well, if not quality, at least quantity, right? /images/graemlins/wink.gif
-DB

[censored]
01-09-2005, 10:49 PM
and people complain about Ms.OOt polls.

The \ is dumb.

Thythe
01-09-2005, 11:07 PM
I don't even understand it, what was the point in the first place of the slash and the quote?

Thythe
01-10-2005, 12:59 AM
Now this wondering is eating away at me, what was the point of these two characters in the first place? was it a typo? hidden meaning? am I an idiot?

dtbog
01-10-2005, 02:09 AM
I can explain the backslash, but not the quote.

(Computer nerd warning!)

In certain computer programming contexts, a backslash signifies the insertion of certain special characters into a quoted string. If, for example, you want to get a Java program to output the phrase Hi, you would write this as:

System.out.print("Hi");

..but, say you want to print the phrase "Hi", with the quotes. You'd need to write:

System.out.print(" "Hi" ");

...but, no, this doesn't work. See how the second double-quote is ambiguous? The computer thinks that this is the end of the string. To fix this, the creators made it so that a backslash signifies that it's simply a quotation mark, and not the end of the string:

System.out.print("\"Hi\"");

(For the curious, if you want to print a backslash, it's \\).

Now, this gets interesting, because while C++ and Java (and most other things) work this way, HTML does not. HTML is entirely different, and writing a quotation mark is accomplished with:

"

Awesome.

Now, here's the great part. UBB (the system on which the 2+2 boards run) is coded in a language called PHP, which uses the backslash style of escaping characters. Of course, the function of PHP is to be decoded and manipulated by the server (and a database containing information like how many breasts are on your avatar) to generate HTML, which is displayed by your web browser. HTML thinks nothing of backslash escape characters, and will simply display them outright, as in the case of Carpal\'Tunnel.

My contention is that somewhere along the line, someone mistakenly typed a single quote into the phrase "Carpal Tunnel". Maybe the title was actually supposed to only be "Carpal", but someone added the "Tunnel" in a fit of genius. Who knows. The point is that whoever made this change did so in the HTML part of the code, where this escape character was meaningless.

This explains the backslash. The quote is beyond me.

42?

-DB

Thythe
01-10-2005, 02:26 AM
Thanks for the explanation, interesting stuff.

rusty JEDI
01-10-2005, 03:30 AM
Homer does not have a / or ' because he is the original carpal tunnel.

rJ

BradleyT
01-10-2005, 09:32 AM
Carpal tunnel (syndrome) is caused from doing repetitive motions with the hands.

I guess quite a few data entry folks get it.