- 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
wow....IMHO this is more of a WhyTF than a WhatTF....
Admin
There are timing bugs in that code that if it is run just before the end of a month (or day), then it is possible that today() will return different results.
- Too lazy to registers. :)
Admin
And almost certainly, his justification was "If it ain't broke, don't fix it!"
But, sir, it is broke.
Admin
"Although they're still in business, the company's stock went from the mid-$20's to a penny stock during the time I was there. "
Something I would not mention in an interview.
Admin
Do I notice a bug here? If I read this correctly:
<FONT color=#000099>string</FONT>(month(today())-1)
Then this value would actually be 0 in Januari, and 11 in December... Today would be Januari 21, 2005. Month(Today) would be 1. Then one is subtracted, resulting in 0, which is converted to a string...
You can't be serious that no one noticed that after all those years?
Admin
Wow yeah the constant calling of the today() function (I'm assuming it's a function, I don't know this language) is a WTF right there, why not just create another date variable and store it once?
I'm surprised to see that a language that lets you say "today() - 15" in order to get the date of 15 days ago doesn't have readily available functions to get the first day of last month more easily. I'm not convinced that simply subtracting 15 days is sufficient (doing that today would return a date of January 6th).
' For you VB lovers out there:
Dim lastmonth As Date, date1 As String
lastmonth = DateAdd("M", -1, Now)
date1 = "'" & IIf(Len(Month(lastmonth)) = 1, "0" & Month(lastmonth), Month(lastmonth)) & "/01/" & Year(lastmonth) & "'"
It would be easy enough to modify that first line to get the first day of last month (reducing the code to one line), but then you wouldn't have that all-important padded zero.
Admin
Whoa holy crap, I didn't notice that one. At least with "today() - 15" you could make the argument that some date variable type will be returned with today() and the system would be smart enough to subtract 15 days (keeping the months and years straight). But month(today()) will always return a number between 1 an 12. My guess is that this is where the manual entry override comes in.
"Do you wish to query for '00/01/2005' to '02/01/2005'?"
"Um... no...."
Admin
Well, one COULD use Format to do the formatting....
Admin
I'm guessing that the user would changed the date to the correct one when they were given the option, just like they altered the books to compensate for the extra day that this wonderful code computed for.
BTW - I also like how they assume that this is going to be run within the first 15 days of the month so they subtract 15 days off of today to get last months number....
And what language is this anyways? I would say VBScript but the semi-colon isn't the remark character...Hmmmmm...
Admin
WTF happened to my post? ^^
I've seen people having problems quoting people, but I was able to quote the same person three times!!
Admin
Check the original post -- the DB is Paradox, and this is Paradox's scripting language.
Admin
The biggest WTF on this site is why we aren't using PhpBB or something for comments.
Admin
Well that's a point. I think *any* other forum software would do better. I mean...buggy quoting?!
Admin
You are correct, and I am a bonehead. [:$]
Admin
Nah, boneheadedness need not be assumed -- Paradox doesn't "ring" as an application name if you haven't seen the "pair o' ducks" Easter egg on your PC screen.
Admin
It's not broken *enough* to fix it. Since you can always type in the dates you want, all the stupid bits of the code do is suggest some dates you might want to query for.
Still, it qualifies for a WTF, none the less.
Admin
shame, obviously this company just got used to getting past that first question, then putting the right date in, maybe they even made a patch to automatically get past it...
Blind!
Admin
Maybe because the server is running some Windows version instead of Linux. On Linux, PHP would be the perfect choice but if you're stuck with Windows then ASP.NET is the default language. PHP on Windows requires PHP to be installed. And I'm not sure if that's an option on this server. Ask the owner of the site about that... [;)]
Admin
> Maybe because the server is running some Windows version instead of Linux.
> On Linux, PHP would be the perfect choice but if you're stuck with Windows then
> ASP.NET is the default language. PHP on Windows requires PHP to be installed.
> And I'm not sure if that's an option on this server. Ask the owner of the site about
> that...
Right, to switch to a better working system, it needs to do some work and not just
click around a bit...
But I would love to see this site running no asp.net any more.
(WTF are they doing this?!)
Admin
Dude, it's possible to do things right in ASP.NET too :p
Admin
I love hte way you're slagging off ASP.Net while the editor used for comments is JavaScript/VBScript.
I wouldn't mind seeing a better editor, but to me it seems the rest of the forum works just perfectly.
So don't blame ASP.Net, and stop assuming that people who do use it only know how to 'click around'. I'm getting rather tired of that, as I am sure other people are as well.
Drak
Admin
>> For you VB lovers out there:
>> Dim lastmonth As Date, date1 As String
lastmonth = DateAdd("M", -1, Now)
date1 = "'" & IIf(Len(Month(lastmonth)) = 1, "0" & Month(lastmonth), Month(lastmonth)) & "/01/" & Year(lastmonth) & "'"
Yikes! The latest "WTF" in the comments. Or was this one of the "clever sarcastic jokes" ? As mentioned several times (by myself and others) it's impossible to tell the difference these days, there's been so many WTF comments lately.
Admin
FYI, the problem with replies isn't with the forum software, it's with FreeTextBox. There's a known issue with Firefox caching old JavaScript. FreeTextBox 3.0 is supposed to fix this. AFAIK, the latest version of CommunityServer::Forums is supposed to include the updated version of FTB.
And yes, I use Firefox. I just use IE to post quoted replies (get the ieview extension).
Admin
I just noticed, the forums are from a company called "Telligent Systems". Isn't that the opposite of intelligent?
Admin
Not necessarily -- it could be like flammable/inflammable (speaking of WTFs...).
Admin
Well, my personal pick with those two (though probably disputed by a dictionary) is that they are slightly different -- "flammable" means "can be flamed" or in other words "damagable by fire"; but "inflammable" means "can be inflamed" or in other words "will catch alight if provoked" (vague pun intended). So "inflammable" implies "flammable" but not necessarily the reverse.
Like I said, the dictionary will probably disagree with me. But it makes sense to me, and that's enough [H]
Admin
Yep, it is.
Originally, it was "inflammable" and "non-flammable". "In-" in this case, is an intensifier, meaning basically "into", and come from the latin "en" (Many words beginning "en-" also come from this root"). However, there's also "in-" meaning "not" (which comes from the latin "ne-"). To avoid confusion, particularly among those learning English as a second langauge, the new word "flammable" was invented.
Of course, the "in" in "intellegent" is neither "in-/en-" nor "in-/ne-", but actually breaks down as "inter-" ("between") and "legent" ("to collect") (I don't understand that either)
Admin
Since we're talking browsers, let me tell you I'm browsing the forum with Mozilla from a Linux box and often I have to scroll sideways like crazy, sometimes for twice the width of my display. WTF?
FYI, you *can* write CSS and JS that works reasonably well across browsers. Trust me, I've done this quite a lot recently. Or is it that ASP(X) is hardcoded to generate Web pages optimized for IE?
Anyway, let's start a Web WTF section on the site (or is there one already?) and make this forum the first entry :D
No offense,
Felix
Admin
[quote user
<p>FYI, you *can* write CSS and JS that works reasonably well across browsers. Trust me, I've done this quite a lot recently. Or is it that ASP(X) is hardcoded to generate Web pages optimized for IE?</p>
[/quote]
ASP(.Net) is not hardcoded to produce code especially for IE. Maybe some webcontrols made by some companies are, but ASP in general is not biased.
It's just that editor JS thingy. I know it's possible to write CSS / JS that works reasonably in most browsers, but I think the greatest WTF on the web is why there still is not a single standard used by all browsers. (Yeah, W3C defines standards, but as far as I see no-one is fully compliant, and ONLY compliant with these standards. I could be wrong though.)
Drak
Admin
Ack, got snared by the editor! This was what I had typed behind the quoted bit:
ASP(.Net) is not hardcoded to produce code especially for IE. Maybe some webcontrols made by some companies are, but ASP in general is not biased.
It's just that editor JS thingy. I know it's possible to write CSS / JS that works reasonably in most browsers, but I think the greatest WTF on the web is why there still is not a single standard used by all browsers. (Yeah, W3C defines standards, but as far as I see no-one is fully compliant, and ONLY compliant with these standards. I could be wrong though.)
Drak
Admin
10x for the clarification, Drak. Trust me, all mainstream browsers are currently 99% compliant to the W3C standards, except for IE6. Amazingly enough, it works worse than IE5 in some regards. Konqueror works just a bit better, but then again Konqueror.isn't exactly mainstream so I don't mind very much.
It's really upsetting to rewrite a perfectly good site just because the most widely-used browser fails to implement properly one CSS property (namely Height).
Thanks again and sorry for the off-topic, Felix
P.S. Today I see the forum very well. In the same browser. Funny huh?
Admin
To be specific:
John
Admin
This is always good to include on your resume :)