- 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
Sure. Not sure I fully understand all the implications of that one.
But today's WTF violates some of the lower rules. Such as 3NF, which it completely trashes; and pretty much trashes in the worst possible way. And, probably 2NF, depending on exactly what is in the attributes.
Admin
Is this set of "snippets" the programming equivalent of Frenglish?
Admin
I see no advantage in using tabs, or pipes, or ascii 4 or ascii 11 as delimiters. It introduces the same problems, equaly easy to reproduce, but more rare in real world, which means that they can bite you in the ass years after release.
What we use here as delimiter, is \xFF, which at least never occurs in properly crafted UTF-8 strings.
Admin
CHOP! You are now.
Admin
If the strings going into the file come directly from the user, though, xml is probably a better idea, though, since the user might easily enough decide it'd be a great idea to stick a tab in a string. (But only if it's coming directly from the user - if it's coming from the user but you have control over how, you could easily enough strip tabs, convert them to spaces, or just not allow them to have gotten into the control the user is entering strings into in the first place.)
Admin
Did anyone else notice the "frist" or was that just me?
Admin
And this being April Fools Day, I expect to hear any moment that one has been sighted.
Admin
Admin
By the way, dmr once posted in Usenet news the assertion "Whitespace is your friend." I retorted that if he really believed that, he never would have changed the compound assignment operators from syntax like =- to -=. Sure =- was ambiguous for human readers who forgot to do greedy lexing. But if dmr really believed that whitespace was your friend, he would have left the operator that way so programmers would have to put whitespace after it, instead of changing it to -= to allow omission of whitespace.
Admin
"He was able to replace all the CSV with a bit of XML, and all was right in the world."
Let me guess, he crammed the XML into the FreeText field?
Admin
In these cases I'd recommend using the goes-towards operator (in C because who in his right mind would write PHP):
Admin
It's Perl not PERL kthx
Admin
Okay, I'm the original submitter. It was written in Haskell in negative ten lines, without any variables or memory, and ran in the past so that I had the results beforehand. Also, I wrote it in the middle of a lake during a raging sleet storm with both hands and feet hogtied. And without electricity.
Admin
Admin
Absolutely correct.
Admin
I love it.
Admin
Is this $oRecSet.EOF common in languages that Visual studio is supporting? I am thinking it is more in common with Unix based languages.
Admin
I think the biggest WTF is the language.
is PHP, but split was deprecated in 5.3.0, and the parameters are in the wrong order. It should be
The code below isn't any better.
PHP doesn't use the . for object access, and PHP treats all terms without a $ before it as a constant, so for example DB needs to be $DB.
To access arrays in PHP, you use [], not (). Also $oRecSet is a object so $oRecSet["ValueName"] needs to be $oRecSet->ValueName.
firstly its missing a semi-colon, secondly string concatenation is done using the . operator, also & is not an string concatenation operator as well.
this is just simply invalid as idStr is seen as a constant.
So lets see what code is actually valid..
Thats some interesting code. So is the WTF, the fact that Lorne Kates didn't really look at the code?