- 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
i remember that site!!!! I didn't know what to do so just added a space or a dot and it worked =D yay =p
Admin
TRWTF is nobody had yet suggested a server side IP/Country validation and redirection.
But TRRWTF is the persistent error message in TDWFT still labeled "Worse than failure".
Admin
Hey, man, that's just a spoon.
Admin
You sadden me. If you are going to First, you need to either use the code from the article to first, or to Fist.
All I'm asking is that you follow the unwritten conventio that we all didn't agree on (as it's unwritten).
Admin
The simplest thing to do would be to ask the user to enter their distance in miles (or kilometers) from Australia, and then test it for zero.
Admin
Ah, I see the WTFs... the missing space after "country,", and the double space after "if".
Admin
Or they could use a neural network!
Admin
Admin
Ah, apparently you haven't heard about the coup.
Admin
There are too many variations in country names to make the array feasible. As well, there are too many possible ways around the regex. What is needed is a foolproof way to determine if the user is in Australia. All that is needed is a simple radio button.
"When you greet someone you say: O - "Hello" O - "G'Day mate""
Nice and simple.
Admin
No they don't. If they live in Australia and are booking on redacted-travel.com it tells them to go to redacted-travel.com.au.
Dumbest...regex...EVER.
Admin
Wouldn't you also need to match "puɐ1ɐǝz ʍǝu" or "ɐı1ɐɹʇsnɐ"?
Admin
I'm not sure either, but this is the best explanation i could think of.
By applying regular expressions as a universal solution, all you have done is moved your problem into a new domain, so you have your original problem, and the new problem of writing a regular expression. As far as i can tell, its yet another warning against the golden hammer approach.
The statement also humorously implies that regular expressions don't solve anything.
well that's the best i can do. I'm sure if I'm incorrect someone will tell me about it.
Admin
Yes, but it'll have to run on a cloud network.
Admin
The biggest WTF is that I could immediately see the WTF, even though RegExp is a subject that I find confusing and hard to understand.
Admin
I confused, I thought Austria's internet country code was .AT
Admin
You've always got your head in the clouds...
Admin
Also the anchors are probably wrong (although they do not affect the outcome). You are going to check for something that beings with A or a OR <options in the middle> or Something that ends with D. The ^ and $ are just wrong.
Admin
Since the code does not have a shenanigans handler, it would not work properly!
Admin
I swear to God I'm going to pistol whip the next guy who says, Shenanigans.
Admin
TRWTF is that the regexp is just plain wrong.
Rather than matching at "random": /^australia|newzealand|new zealand$/i
it'd be wiser to check for the beginning and the end: /^(?:australia|new ?zealand)$/i
Unless I'm completely mistaken of course...
Admin
Hey Farva what's the name of that restaurant you like with all the goofy shit on the walls and the mozzarella sticks?
Admin
You repeated accidentally repeated yourself.
Admin
Time to whip out a Drop-Down-Under Box.
Admin
Being a New Zealander myself I hate those friggin Aussie site versions. The international sites insist that you must use the Aussie one, and the Aussie one insists that you must live in Aussie. At least that's my experience.
You know there is one tiny advantage to the regexp presented, if you wanted to catch New Zea1and (a one in place of the L) then it's a pretty simple modification. And then there's N3w Z3a1and etc...
Still I'd think converting to uppercase and then using the Levenshtein distance would be a better way to catch it.
Admin
While fun to insult people on regular expressions, I really feel that it is one of two criteria to being a successful programmer. Those two being...
Those two items, more than any thing else, have, in my experience, shown who knows programming, and who just has a piece of paper from some school.
Admin
You just have to enter @U$TR@L!@ :P
Admin
I'm guessing Santa didn't use them.
Admin
Or, since JavaScript is normally disabled by default, just submit normally.
Admin
grr - why do Kiwis insist on calling Australia 'Aussie'. No-one lives in Aussie, you live in 'Australia', 'straya' or 'Oz' or 'Gods country'. :-p An Australian person is an Aussie.
It can't be both the country and the person. eg - you are a Kiwi - you don't live in Kiwi. [/ThusEndethTheLessonAmenBro]
Admin
You oughtta report them to the Department of Redundancy Department.
Admin
You, my good Sir, is clearly The-Real-WTF.
Admin
Isn't it possible for the site itself to know where the site visitor is accessing the site from? There are sites I visit that somehow know that I'm accessing it from Honolulu and automatically provide some kind of "localization", such as saying "Aloha" on the welcome screen. So, couldn't these Australian/New Zealand sites know whether the visitor is accessing the site from within either of those countries and automatically redirect the user to the appropriate site?
Admin
'Australia' is spelt different in many different countries... I've seen Europeans spell it 'Austria' and (as anyone who watches John Clarke [About the only good thing to ever come out of NZ] would know) the Australians spell it 'Straya'
Admin
Looks like the plan is working...
Apparently the Australian versions of many sites didn't realise that sheep surf the net too...
Admin
Um, no, the two sites are different. It refers them to the .au version of the site if they live in Australia.
Admin
Admin
You know.. Europeans spelling Austria is probably referring to the country Austria.
Admin
In countries like Australia. Such as New Zealand. And Australia itself.
Admin
A clueless user don't even need one website to enter a infinite loop.
Admin
Admin
TRWTF is using \b[reg(ular expressions?|ex(p|es)?)]\b!
Admin
Admin
Admin
no, it's .there_are_no_kangaroos
Admin
sorry, the last comment was supposed to quote this. now I just feel stupid.
Admin
OMG! I haven't laughed that hard in weeks!
Thanks!
Admin
Admin
Admin
Captcha: eros. That's just pandering to the audience that is.