• (cs)

    wow....IMHO this is more of a WhyTF than a WhatTF....

  • (unregistered)

    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. :)

  • (cs)

    Alex Papadimoulis:
    Nonetheless, upper management still refused to authorize changing the production accounting system

    And almost certainly, his justification was "If it ain't broke, don't fix it!"

     

    But, sir, it is broke.

  • (unregistered)

    "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.

  • (cs)

    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?

  • (cs)

    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.

  • (cs)

    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...."

  • (cs)

    Well, one COULD use Format to do the formatting....

  • (cs)
    Katja:

    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?

    Katja:

    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?

    Katja:

    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?

    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...

  • (cs)

    WTF happened to my post? ^^

    I've seen people having problems quoting people, but I was able to quote the same person three times!!

  • (cs)

    Check the original post -- the DB is Paradox, and this is Paradox's scripting language.

  • (unregistered)

    The biggest WTF on this site is why we aren't using PhpBB or something for comments.

  • (unregistered)
    :
    The biggest WTF on this site is why we aren't using PhpBB or something for comments.

    Well that's a point. I think *any* other forum software would do better. I mean...buggy quoting?!
  • (cs)

    Stan Rogers:
    Check the original post -- the DB is Paradox, and this is Paradox's scripting language.

    You are correct, and I am a bonehead. [:$]

  • (cs)

    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.

  • (cs)

    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.

  • (cs)

    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!

  • (cs)

    :
    The biggest WTF on this site is why we aren't using PhpBB or something for comments.

    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... [;)]

  • (unregistered)

    > 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?!)

  • (unregistered)

    Dude, it's possible to do things right in ASP.NET too :p

  • (cs)

    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

  • (cs)

    >> 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. 

  • (cs)
    Drak:

    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



    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).
  • (unregistered)

    I just noticed, the forums are from a company called "Telligent Systems". Isn't that the opposite of intelligent?

  • (cs)

    Not necessarily -- it could be like flammable/inflammable (speaking of WTFs...).

  • (unregistered)

    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]

  • (cs)

    :
    Like I said, the dictionary will probably disagree with me.  But it makes sense to me, and that's enough

    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)

  • (unregistered)

    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

  • (cs)

    [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

  • (cs)

    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

  • (unregistered)

    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?

  • (unregistered) in reply to Stan Rogers

    To be specific:

    • The environment is Paradox For Windows (originally from Borland but they sold it when (their) Delphi and (MS's) Access entered the scene)
    • The language is ObjectPAL: Object-based (not oriented) and described as an 'automation' rather than 'scripting' tool - iirc it did in fact compile to p-code and was actually very powerful eg allowing the writing of Windows message handlers (yikes!)
    • Since Pdox/Win supported ODBC the actual DB is unknown

    John

  • (cs)
    Alex Papadimoulis:

    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.



    This is always good to include on your resume :)

Leave a comment on “Your Friday Paradox”

Log In or post as a guest

Replying to comment #:

« Return to Article