• (cs) in reply to Andrew
    Andrew:
    And I love the way it complains when I don't enter my "Electronic Mail Address". Probably a good proportion of their target market won't even know what that means.
    A friend of mine took a second job as a high school teacher, in a school that (allegedly) specializes in technology and media. He asked the kids in his class to give him an email address where they could be reached.

    Of course, the inevitable happened and a couple of them asked "What do you mean, 'E-mail'? What's that?"

    "Well, you know, when you send mail, on the computer."

    "Oh, you mean my Hotmail!"

  • Adam (unregistered) in reply to ParkinT

    In which case you might want to duplicate that code three times to verify that the result is the same for at least 2/3rds majority.

  • Watson (unregistered) in reply to dave
    dave:
    Zecc:
    Obviously, they were smart enough to script their own code generator: *snip*
    If they used perl, it'd be even easier:
    #!/usr/bin/perl
    @chars = (a..z, A..Z);
    foreach(@chars)
    {
        print <<END;
    for ( x = 0; x < passStr.length; x++ ) {
      x = passStr.indexOf("$_", x );
      if ( x > -1 ) {
        pswdAlpha = pswdAlpha + 1;
        } else {
        break;
      }
    }
    END
    }
    

    Or if they were using PHP in a non-satirical way:

    foreach(array_merge(range('a','z'),range('A','Z')) as $_)
    {
    	echo <<<END
    for ( x = 0; x < passStr.length; x++ ) {
      x = passStr.indexOf("$_", x );
      if ( x > -1 ) {
        pswdAlpha = pswdAlpha + 1;
        } else {
        break;
      }
    }
    END;
    }
    
    
  • Gitsnik (unregistered) in reply to ParkinT
    ParkinT:
    magetoo:
    Oh. Wow.

    It is so obvious, yet someone actually stuck with this disaster until it was finished. You'd think that by the time you reach 'e' you start looking for a better way.

    Unless you are a consultant; billing hours spent on the project.

    I'm slightly ashamed to note that I have a perl script kicking around on my development machine for when I am coding. All I do is write a simple function once:

    for ( x = 0; x < passStr.length; x++ ) { x = passStr.indexOf(GITSNIK_ONE, x ); if ( x > -1 ) { pswdAlpha = pswdAlpha + 1; } else { break; } }

    And then executing the perl script with a number of iterations and a foreach in loop. I'm actually rather ashamed now, but it has led to some seriously long code that I didn't actually have to write.

    Of course I just kick it off and have a few games on the Playstation at this point. That's where my billable hours come from.

    Truly shaming now that I think about it.

    Captcha: Ingenium. Heh.

  • (cs) in reply to RGupta
    RGupta:
    ParkinT:
    magetoo:
    Oh. Wow.

    It is so obvious, yet someone actually stuck with this disaster until it was finished. You'd think that by the time you reach 'e' you start looking for a better way.

    Unless you are a consultant; billing hours spent on the project.

    And that consultant is sitting thousands of miles away in a 'coding farm' in India...

    Yea, let's keep outsourcing code development...

    Interesting. Your name appears to be Indian. Am I wrong?

  • (cs) in reply to Freddy Bob
    Freddy Bob:
    Without javascript turned on, there won't be any server-side checking because the form wouldn't even get submitted. The buttons are not a submit and a reset; they are type=buttons. The form gets submitted by the javascript. The magic deepens.

    I might have mis-understood your post, but why should that matter? Using something like Firebug, you could easily change the Javascript to your will and submit the form, thus defeating any 'validation' you had in the form.

  • Frank Nestel (unregistered)

    What is really depressing me is the huge lack of knowledge, I mean, loops where invented arround 1940, subroutines in the 1960ies, Regexps in the 1970ies, JavaScript APIs in the 1990ies. How do those poor people get along with a business of programming? Sigh.

  • (cs) in reply to somejackass
    somejackass:
    That's gotta be generated code. Not a WTF if so.

    Yes, it is; it's just in a different place. If this is generated code, then the WTF is in using software that generates this quality of code for an application like this.

  • vP (unregistered) in reply to Eric
    Eric:
    Domino's built in validation option makes it so easy though.

    Wohaa! Did the Lotus guys invent their very own regular expression syntax? It sure doesn't look too familiar to me:

    C: C is any character. Matches any single, non­special character C ?: Matches any single character *: Matches any string (any number of characters) {ABC}: Matches any character in set ABC {A­FL­R}: Matches any character in the sets A...F and L...R +C: Matches any number of occurrences of C

  • Prosthetic Lips (unregistered) in reply to anonymous

    Hey, no it's not ...

    http://wordsmith.org/anagram/anagram.cgi?anagram=Lotus+Notes&t=1000

    However, some good anagrams are:

    To lose nuts Loosest nut UnSet stool Us lone tots

    and, my favorite, "Tootles," sun!

    ;-)

    captcha: Darn, I got the "genitus."

  • (cs) in reply to donniel
    donniel:
    RGupta:
    ParkinT:
    magetoo:
    Oh. Wow.

    It is so obvious, yet someone actually stuck with this disaster until it was finished. You'd think that by the time you reach 'e' you start looking for a better way.

    Unless you are a consultant; billing hours spent on the project.

    And that consultant is sitting thousands of miles away in a 'coding farm' in India...

    Yea, let's keep outsourcing code development...

    Interesting. Your name appears to be Indian. Am I wrong?

    And that would make no difference whatsoever to his argument. Am I wrong? Can you pronounce "ad hominem?"

    Not that I think anything about this necessarily has anything to do with "Outsourcing," a convenient bugaboo for personal insecurity, masked racism, and cowardice.

    You go ahead, though. Whatever makes the little lights in your fairy tree twinkle.

  • cowdog (unregistered) in reply to ParkinT

    BINGO! This got me thinking that the person that wrote this code may actually be quite clever. Hear me out ... ;-)

    Imagine, in five minutes, s/he could have written a program whose output is "this disaster." Then s/he'd be free to play nethack for the next 2-3 hours. A non-coder would look at the 700 lines and think "nice" (whereas us visitors to the daily wtf look at the 700 lines and think "NICE").

  • Lars (unregistered) in reply to Nicd
    Nicd:
    I tried it out without running the JavaScript and found out that apparently not only does it NOT do any server-side checking of the password, it doesn't even check that the two passwords match!

    Maybe sufficient to check, that the numbers of characters, capitals, numbers, and special characters match ?

    :-) Lars

  • SomeoneWhoWroteAccessOnce (unregistered) in reply to ParkinT

    Or a php programmer

    $stuff = array("a"..."z");
    foreach ($stuff as $letter){
    echo "
    for ( x = 0; x < passStr.length; x++ ) {
          x = passStr.indexOf(\"$letter\", x );
          if ( x > -1 ) {
             pswdAlpha = pswdAlpha + 1;
          } else {
             break;
          }
       } 
    "
    }
    

    I mean real programmers are lazy right?

  • SomeoneWhoWroteAccessOnce (unregistered) in reply to SomeoneWhoWroteAccessOnce

    hmm, next time i'll read the comments before posting.

  • (cs) in reply to anonymous
    anonymous:
    Did you know Lotus Notes is an anagram of 'Shoot me please'?

    That's synonym, not anagram.

  • (cs) in reply to real_aardvark
    real_aardvark:
    donniel:
    RGupta:
    ParkinT:
    magetoo:
    Oh. Wow.

    It is so obvious, yet someone actually stuck with this disaster until it was finished. You'd think that by the time you reach 'e' you start looking for a better way.

    Unless you are a consultant; billing hours spent on the project.

    And that consultant is sitting thousands of miles away in a 'coding farm' in India...

    Yea, let's keep outsourcing code development...

    Interesting. Your name appears to be Indian. Am I wrong?

    And that would make no difference whatsoever to his argument. Am I wrong? Can you pronounce "ad hominem?"

    Not that I think anything about this necessarily has anything to do with "Outsourcing," a convenient bugaboo for personal insecurity, masked racism, and cowardice.

    You go ahead, though. Whatever makes the little lights in your fairy tree twinkle.

    Ha ha, no, I wasn't attacking him, nor saying that his being Indian undermined his argument. In fact, an Indian speaking out against outsourcing, by itself, wouldn't actually be in any way an argument against outsourcing - that would be like assuming a woman commenting about woman drivers was strengthening the argument.

    It's my fault for having made that comment without providing any context, in a way that seemed to support one side of the argument (I haven't expressed an opinion for, or against outsourcing). My apologies.

    It was just that being an Indian myself, I was a bit surprised to see a fellow Indian seemingly against outsourcing. If so, I would have wanted to hear his stand on the subject. That's all.

  • Bart (unregistered) in reply to Nicd

    Actually, it does. When the passwords don't match, the system will spit out the following Javascript alert:

    "The password entered in the New password Confirmation field does match the New Password!"

    Ohno! It DOES match! We can't have that, sir.

  • wtfCanada (unregistered)

    I loled for like 20 min.

  • - (unregistered)

    Not only that, but by using a for-loop for letters and not for numbers, if there is e.g. more than 0 'a''s in it, it counts as passStr.length 'a''s...

Leave a comment on “Complex Complex Validation”

Log In or post as a guest

Replying to comment #:

« Return to Article