- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Those fristy Siberian winters...
Admin
how would SQL injection work in this case?
"\";- drop Table \"Subscription\\""
so improved security
Admin
Better than this:
<php echo "var content = {"type":"comment","serialized":"{\"poster\":\"Anonymous\",\"message\":\"I say, I \\\"really\\\" love quotes.\"}"}"; ?>
Admin
Can I quote you on that?
Admin
TRWTF is Postgres
Admin
Fitfh
Admin
I'm sorry Dave, I'm afraid you can't do that.
Admin
TRWTF:
This is yet another example of why case-insensitivity is a bloody retarded idea. WTF is so hard about having identifiers be treated exactly as they are? Don't even get me started on all the definitions of "upper" and "lower" across languages...Admin
ALLOWING CASE IS OVERRATED
Admin
'Single quotes would have been "way" easier.'
Admin
Most stupid invention in modern programming languages is case sensitive variables. A programmer would never find his way to "Main Street" as the sign says "MAIN STREET"
Admin
Admin
Detroit.
Admin
Admin
Something tells me that The Database Architect probably insisted on preserving the case of all the identifiers.
(And, as usual, the cost of the change, in terms of its impact on all the code that used the database was "irrelevant trivia" -- to The Database Architect.)
Admin
Why did he have to add the quotes instead of just writing it with an upper-case "S"? If the quotes in psql make the names case-sensitive, it should be sufficient to respect the case, right?
Admin
When the app I was creating as a sole-dev required a MYSQL-to-Postgres migration, I faced that. Quickly got rid of my old job habit of using uppercase identifiers.
It was for the best too... it looked cleaner.
Admin
Admin
Why is Postgres TRWTF? You don't like a feature rich free RDBMS?
Admin
Admin
Admin
I'd have to disagree.
While it's an inconvenience, I wouldn't want to allow programmers to code like this.
var MAinsTReet = ... maINSreET = ...
And besides if you use camel case.
upperSon upPerson
are two different things
Admin
IDE should convert everything to match the case of the variable definition, and flag it immediately if you define two variables with the same name. Not a problem.
Admin
The White House.
ba-dum!
Admin
Admin
And now his comparison fails due to different ordering of the returned data?
Admin
It does both those things already, and supports case sensitivity.
What do you do if you have two variables? upPerson upperSon
If both names make perfect sense, now you have to choose a different name for no apparent reason. If these are perfectly sufficient names, you now have to complicate one of the names. The human eye will read these as two different names easily. They won't be confused.
Admin
Admin
Frist quote of "frist" post.
Admin
If you want variables named so similarly, you deserve to get whacked with a cluebat.
Admin
So using single quotes in the shell like
was too good for him?
Admin
"upPerson, upperSon" -> give up on camel case, the sooner the better -> up_person, upper_son.
whyWouldWeThinkItsAGoodIdeaToJamWordsTogether
Admin
Is it shameful that I've become such a cynic from visiting this site that I doubt the story took place in Siberia?
Admin
Because separating words was a measure taken to make reading available to the public. Ancient Hebrew didn't separate words, and they didn't have vowels either.
youcanreadthisjustfineifyoutried
wedonotevenneeduppercasetoreadthisorpunctuationforthatmatter
itjusttakesslightlylongertoread
Admin
Admin
expertsexchange
It's a real site. No, it's not about surgery.
When naming your site/company, it's a good idea to convert to lowercase and merge the words, just to be sure you are ok with the result.
Email, web address, and so on, all require it.
Admin
hw mprtnt r vwls thn?
wthtspcsthrprbblymprtnt
Admin
Or you could just always make everything case-insensitive, and then there would be no issue.
The problem is when it's sometimes one and sometimes the other.
Admin
No, now you have to use a different name for a very good reason: Because the two names look the same.
Maybe the human eyes that you are familiar with are different from those of any human being I have ever known, but most people I know see "Main" and "main" as the same word. When I'm working in case-sensitive languages, I regularly stumble over whether a function is called "getFoobar" or "GetFoobar".
I've had to work on programs where the programmer thought it was clever to have variable names that differed only in that he left out a letter in one, like "freight" and "freigt" and "amount" and "amout" (both real examples). Such programs can be very tricky to read. If someone really had "upperSon" and "upPerson" as two different variables, I think I'd strangle him.
Admin
Now I understand how ancient Israel was conquered. A soldier at the front sent back the dire warning, "The Babylonians are now here!", but writing it without spaces, it was interpreted as "The Babylonians are nowhere."
Admin
While your eye is easily discerning those two "personable" variable names, how about these two?
model mode1
They ARE spelled differently. It's quite conceivable that the could be found in the same routine.
Now picture yourself sitting in front of a computer screen for hours...
Mayhaps we need that evil cameLcase and a compiler that's case sensitive. Or we could just pick better variable names.
Admin
Why not use "[]" brackets?
Admin
Camel_case_is_overrated._Underscores_are_the_way_to_go()
Admin
Admin
Admin
Many times longer. I can read space-delimited words very quickly, often reading half-lines or more all at once. With camel-case, it is more difficult. With the above, I have to pick through it, and ambiguities are possible as others have shown.
Sincerely,
Gene Wirchenko
Admin
+1
QED
Admin
And this is why SQL Server databases should be developed in a BIN2 environment, because that enforces case-sensitivity for everything, including code. This is why major open source SQL Server projects are so difficult to get running on anything except legacy latin-based environments, because the programmers DO program like that when case sensitivity is not enforced.
Admin
Fun for DBA's. Create a table with columns like this (showing the SELECT necessary to pull data):
Admin
Binary collation is a huge WTF. There ARE standard collations for each language, along with a few "master" collations, and none of them are binary collation. We've had the Unicode standard for 20 years, stop trying to turn the clock back to 1970, damn it.
Case-sensitivity should be done on an as-needed basis, not by default. There are very few times in real-life when you actually want case-sensitivity. Even worse, turning on case-sensitivity when it goes against the standard that supposedly governs your work is basically slapping the future maintainers of your code in the face, just to make you feel a little better. Case-sensitivity in code is purely a construct of simpler compilers (and a reaction against the excesses of bad BASIC code); although you can still write in vi/notepad, IDEs could enforce code-formatting standards by the late 80's, obviating the need.
Lastly, if developers don't test anything with an umlaut in the first place, what makes you think that enabling case-sensitive collation will fix that?