- 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
headdesk
Admin
I once had to revive an arkane zomputer with a problem very similar to the 'p'<->'e'(and no reserve keyboard in sight). Simply cutting the missing letter out of the software licence and using ctrl-v saved that day. Interestingly, the mental switch was made in less than a minute, and didn't bother me for the next few hours there.
Admin
On seventh day he rested. So Sunday is clearly not first day of the week :)
Admin
Item 8 in Stob's 13 Ways to Loathe VB:
Admin
I agree. The only WTF here is that the programmer (programming language?) doesn't know arrays!
Admin
Nope, the 7th day in the bible is sabbath (= Saturday). The Christians moved their holy day to Sunday because of Eastern.
Admin
Admin
Admin
arsivindir.com ı have
Admin
That's what I tried, but every time I head my desk, I get a facepalm.
Admin
What is a cow-orker?
Admin
Seems like we're heading towards the good old "more or less the whole world except americans" which is the most classic WTF :)
Admin
In Portugal, Monday is called 'segunda feira', tuesday is 'Terca feira' etc. which translates as 'second', 'third', etc. Spanish is (probably) similar. As a result, people from Spain, Portugal and Latin countries will tend to want Monday as second day of the week. That's a lot of people.
ISO-8601 is brillant in that respect- Sunday is day 0 (or 7!), monday is day 1- and everybody's happy. ISO weeks start on Monday, which is the first day of the working week in most cultures.
Admin
Admin
(http://catb.org/jargon/html/C/cow-orker.html)
Admin
Ok, so if Rumen's keyboard is theoretically swapping E and P, then the last sentence, if interpreted, would read: (Sorry, every time I key the letter 'e' I get an 'p'.)
Now the a/an mix up could be a typo based on knowing what it's going to end up saying, so your brain auto-corrects... but If it were doing this itself, then the second word of the post should read epoplp... which would have blown the whole gag.
Personally, I think Rumen is just a straw man posting so we'll stop harping on the accidental duplicate. :~)
Admin
So by "soon" you mean within 127,000 years?
Admin
Admin
As for when does the week start, I can't vouch for other countries, but here in Argentina (Spanish spoken, yes), it starts on Monday.
And now you know possibly more than you wanted about this.
Admin
TRWTF is that you actually quoted Verity Slob like she's relevant, despite the fact the article it originates from is almost 10 years old. Kudos VB hater, now troll along elsewhere, we don't care.
Admin
It all started on the thirteenth hour, of the thirteenth day, of the thirteenth month.
"Oh, lousy Smarch weather!"
Admin
I liked it. Thanks for posting tragomaskhalos
Admin
I think you got that reversed--every time you type an 'e' you get a 'p'. Otherwise, it would be "eeoele", not "ppoplp".
Admin
Admin
The real WTF is VB's BS return syntax.
That lovely
Public Function StupidFunction as String StupidFunction = Stuff
syntax has always bothered me. Especially since it isn't even actually a return, because it continues processing, while using the function's return value as a variable. What a load of shiat.
Admin
If you are taking the Bible as the authority on the days of the week, then Sunday is the first day, and Saturday is the last day. If nothing else we can tell this from the Easter events. Jesus was crucified on Friday, because they wanted to get it done before the Sabbath (the last day of the week). The Resurrection took place on the first day of the week (Sunday). (John 20:1 "Early on the first day of the week...")
Christians changed their 'day of rest' or 'holy day' from the traditional Sabbath (Saturday) to Sunday to commemorate the Ressurection.
A lot of European languages call Saturday something derived from Sabbath - eg Sabato in Italian, Sabado in Portuguese, Shabat in Armenian etc.
(English is odd because Saturday is named after a Roman god, Saturn, where the rest of the 'god' days were renamed after Norse gods - possibly because the old Norse name for Saturday was 'wash day', and the old English never washed ;) so they just left it as it was after the Romans left).
Admin
As mentioned elsewhere, you would be amazed at how many people don't know what a modulo is (or even "remainder"), in today's world of all calculator, all the time.
Admin
The problem with that is it's not dynamic enough.
<?php function getDayOfWeekHeresy($intToday = 0) { $intToday = abs($intToday); $file = fopen('/includes/weekArray.php', 'w'); fwrite($file, "<?php\n"); fwrite($file, "require_once('/includes/dayOfWeekConsts.php');\n"); fwrite($file, '$astrDays = Array("FILE_NOT_FOUND");' . "\n"); for($i = 1; $i <= $intToday; $i++) { switch(($i % 13) + 1) { case 1: fwrite($file, '$astrDays[' . $i . '] = $STR_SUNDAY;' . "\n"); break; case 2: fwrite($file, '$astrDays[' . $i . '] = $STR_MONDAY;' . "\n"); break; case 3: fwrite($file, '$astrDays[' . $i . '] = $STR_TUESDAY;' . "\n"); break; case 4: fwrite($file, '$astrDays[' . $i . '] = $STR_WEDNESDAY;' . "\n"); break; case 5: fwrite($file, '$astrDays[' . $i . '] = $STR_THURSDAY;' . "\n"); break; case 6: fwrite($file, '$astrDays[' . $i . '] = $STR_FRIDAY;' . "\n"); break; case 7: fwrite($file, '$astrDays[' . $i . '] = $STR_SATURDAY;' . "\n"); break; case 8: fwrite($file, '$astrDays[' . $i . '] = $STR_SUNDAY;' . "\n"); break; case 9: fwrite($file, '$astrDays[' . $i . '] = $STR_MONDAY;' . "\n"); break; case 10: fwrite($file, '$astrDays[' . $i . '] = $STR_TUESDAY;' . "\n"); break; case 11: fwrite($file, '$astrDays[' . $i . '] = $STR_WEDNESDAY;' . "\n"); break; case 12: fwrite($file, '$astrDays[' . $i . '] = $STR_THURSDAY;' . "\n"); break; case 13: fwrite($file, '$astrDays[' . $i . '] = $STR_FRIDAY;' . "\n"); break; } } fwrite($file, "?>\n");}
Admin
(Fbeel, zl xrlobneq frrzf gb cebqhpr ebg13.)
Admin
Calm down sunshine. For what it's worth, I actually quite like VB, despite its many inadequacies. But since the (missing) ability to define an array of constants would have enabled the function to be rewritten much more elegantly, your implied claim that the point I quoted is irrelevant is bizarre.
Admin
what about modulo arithmetic?
works for all numbers and isn't ignited to 14. also: for the default case- Caturday
Admin
Admin
You know, soime people are still arguing over whether Sunday, or Monday should be day #1... you're still not really mentioning the fact that there's only 13 days, it's still missing a saturday.
Admin
iDay = ((iRandomDay%7)+7)%7
Now you've got a number 0 to +6 containing the day of the week. Which day is hard-coded as Day 0 is up to the programmer.
Captcha: decet Deceit? Misdirection maybe?
Admin
Admin
That's not true. All of latin america (perhaps excluding Brazil?) uses Monday as first day. Only retarded "still living the past/conservative/enslaving" countries use the week end day as first day.
Admin
Uhm....
Modular Arithmetic would fix that problem (not to mention that if multiple cases will always do the same thing, there are provbably better ways to write the case statement).
Of course, I may be a billy goat....
Admin
Not even remotely. AFAIK, Mod always returns +ve values in most languages. If it doesn't, try iDay=((iRandomDay%7)+7)%7
Admin
In fact, I have a suspicion that some (many?) languages don't actually return -ve mods properly....
Admin
What asshole is making you fill out paperwork using days of the week as numbers?
It's not like this is an honest-to-God problem like date formats, for example (which are actually meant to be read and interpreted by, you know, humans).
Admin
Particularly effective (I've found) when you switch two common keys that are near each other
S & D or E & R are two of my favourites I once had a manager of mine call service desk to get his password reset 3 times before someone came down to have a look - and (interestingly) spotted the problem almost immediately. I guess his passwords always had an R or an E in them...
Admin
Admin
C, C++, Java, C#, JavaScript, and PHP are counterexamples. C89 did allow implementations to do the mathematically sensible thing and compute a nonnegative modulo for the % operator, but C99 requires that the result, if nonzero, has the sign of the first argument.
Perl and Python, however, always compute a modulo of the same sign as the second argument.
Admin
Just to be on the safe side, you can't make any assumption about what will be done in the future. I still remember the year when in Sweden they got a February 30th...
Admin
Sunday is the first day of the week since millenia for the christian countries, Monday being the first working day of the week...
Admin
Actually, no. In fact, ISO 8601 mandates that the first day of the week is Monday, and it is following long-established practice in many countries including the UK, South Africa, most of Europe...
Admin
Admin
Thanks for the reference to ISO 8601.
After reading the wiki article on 8601, I find what I think is a WTF! in MS Outlook 2007.
I long ago changed my Outlook calendar to begin with Monday. At the left end of the week is a week number.
According to the wiki article, "the week with the year's first Thursday in it (the formal ISO definition)" is Week 01.
In 2010, that would be Thursday, January 7, 2010.
MS Outlook 2007 says that's Week 2.
A real WTF, maybe?
Admin
But what about thp man who is knockpd down by a tram?
I'm a Bpastip Boys man, pprsonally.
Captcha: plaga- plagarism from two days ago?
Admin
MS Outlook is the WTF