• Anonymoose (unregistered) in reply to Swedish tard

    #define if while

  • by (unregistered) in reply to Anonymoose
    Anonymoose:
    #define if while

    #define define null

  • Krishna (unregistered)

    #define define undef

  • by (unregistered) in reply to by
    by:
    Anonymoose:
    #define if while

    #define define null

    or even better:

    #define po-tay-toe po-ta-toe

  • Mike (unregistered) in reply to airdrik
    airdrik:
    What's even better is that Math.random never returns 1.0 (the range of possible values includes 0 but excludes 1), so it is like playing Russian roulette with a anything but a revolver.
    Anything? I just tried playing Russian Roulette with a Battenburg Cake. I've got marzipan in my hair.
  • teddy (unregistered) in reply to Mike
    Mike:
    airdrik:
    What's even better is that Math.random never returns 1.0 (the range of possible values includes 0 but excludes 1), so it is like playing Russian roulette with a anything but a revolver.
    Anything? I just tried playing Russian Roulette with a Battenburg Cake. I've got marzipan in my hair.

    sounds like you've an eating problem

  • (cs) in reply to teddy
    teddy:
    Mike:
    airdrik:
    What's even better is that Math.random never returns 1.0 (the range of possible values includes 0 but excludes 1), so it is like playing Russian roulette with a anything but a revolver.
    Anything? I just tried playing Russian Roulette with a Battenburg Cake. I've got marzipan in my hair.

    sounds like you've an eating problem

    I've had a drinking problem for years... splashes person behind him

  • ysth (unregistered)

    I just wanted to say: 21th!

  • Forumtroll (unregistered)

    I love it. It makes so much sense on so many levels. I will include this in the banking/finance sector software suite I'm working on.

    Thanks for a very good idea.

    PS: I'm actually serious.

  • Pointy Haired Minion (unregistered) in reply to tehR
    tehR:
    I salute your Lovecraft reference.
    Thanks! It seemed somewhat appropriate...
    by:
    #define po-tay-toe po-ta-toe

    #undef reality #define reality my_reality

  • Jack (unregistered) in reply to Pointy Haired Minion
    Pointy Haired Minion:
    #undef reality #define reality my_reality
    Actually I think that's the guy from Mythbusters, isn't it?
    WTF Server:
    An Error Occured Not sure what it was, but it was logged.
    Yeah, logged and ignored, never to see the light of day.
  • (cs) in reply to Anon
    Anon:
    I assume your job, like mine, involves reading TDWTF too then? Because surely you're not dicking around right now as well?

    TDWTF time appears on my status report as "Researched industry best practices for code design."

  • Paul (unregistered) in reply to Rootbeer
    Rootbeer:
    Anon:
    I assume your job, like mine, involves reading TDWTF too then? Because surely you're not dicking around right now as well?

    TDWTF time appears on my status report as "Researched industry best practices for code design."

    Mine goes under "Training". We're required to get so many hours per year, but forbidden to spend any money or go anywhere.
  • Jeff (unregistered)

    This cannot possibly be real...

  • Jay (unregistered)

    Maybe this is the least of the issues with this code, but exactly why does he multiply by 1? Maybe I'm missing some type conversion that this forces? I seem to recall being taught in elementary that multiplying by 1 was an identity transformation.

  • Jay (unregistered) in reply to Paul
    Paul:
    x-sol:
    I can't make up my mind if this is evil or stupidity in action
    Just remember folks, you can be evil OR stupid. Nobody said anything about evil XOR stupid

    Maybe it's a good thing that so many people are stupid. Because if someone is both evil and stupid, this tends to make his evil relatively ineffective. Like, if Hitler had not been a brilliant speaker and politician, he would not have become the dictator who plunged the world into war and slaughtered millions of innocent people, but just that annoying guy at the bar who was constantly going on and on about the Jews.

  • Michael Mol (unregistered) in reply to jimbob

    Thank God for static_assert...

  • wtf (unregistered) in reply to Jay
    Jay:
    Maybe this is the least of the issues with this code, but exactly why does he multiply by 1? Maybe I'm missing some type conversion that this forces? I seem to recall being taught in elementary that multiplying by 1 was an identity transformation.

    Why do you put icing on a cake? Just because.

  • Pointy Haired Minion (unregistered) in reply to wtf
    wtf:
    Why do you put icing on a cake?
    Icing is not supported in the "top-of-cake" position.
  • LANMind (unregistered) in reply to slywinkle
    slywinkle:
    GenerateRandomError

    'nuff said.

    Good Lord, my exact thought.

  • LANMind (unregistered) in reply to whiskeyjack
    whiskeyjack:
    The trick is being diplomatic. In your email, give the benefit of the doubt and assume best possible scenarios, that way everyone else can draw their own conclusions about how far off the mark you are, without making you look accusatory.

    e.g. "Joe is being an ass and is ignoring my emails and refusing to give me the key" -- makes YOU look like a whining child.

    "Is Joe sick at home today? Or is he working on a really high priority project? Because I've been trying to get the key from him, and I haven't been able to get a response from him at all." -- makes everyone who has seen Joe in the office, and knows he's not working on anything super high priority, realize that he's being an ass.

    +1

    Not particularly revelatory, but it's sage enough to bear repeating.

  • icebrain (unregistered) in reply to Paul
    Anon:
    I assume your job, like mine, involves reading TDWTF too then? Because surely you're not dicking around right now as well?
    Because only offices have Internet access. There's no other way to access it.

    And everyone works at the same time, even people in different timezones.

  • luptatum (unregistered) in reply to Jeff
    Jeff:
    This cannot possibly be real...
    What makes you think that, the Twilight Zone reference?
  • (cs) in reply to Bob
    Bob:

    Amateurs!

    #define sizeof(x) (rand() % sizeof(x) + 1)

    Careful everyone... true evil walks among us...

  • Eaten by a Grue (unregistered)

    This is clearly an example of the f*ckhead pattern.

  • anonymous (unregistered)

    Wow - if this is a facade, I'd hate to see a decorator.

  • (cs)

    "If user provides input, input is in error."

    His version is a little overcomplicated, but I like the concept. Here I've wasted 2/3 of my life trying to determine if user input is bad, and all along I could have just been assuming it's bad and making up a random error.

  • (cs)

    I smell a coding contest... who can write the code that does the most to look like it is supposed to do X while not actually performing X.

  • bandwidthjunkie (unregistered) in reply to Paul

    My downstairs neighbour is evil AND stupid.

  • airdrik (unregistered) in reply to Pointy Haired Minion
    Pointy Haired Minion:
    wtf:
    Why do you put icing on a cake?
    Icing is not supported in the "top-of-cake"th position.
    FTFY
  • Richard (unregistered) in reply to Coyne
    Coyne:
    "If user provides input, input is in error."

    His version is a little overcomplicated, but I like the concept. Here I've wasted 2/3 of my life trying to determine if user input is bad, and all along I could have just been assuming it's bad and making up a random error.

    Good point. All user input is invalid. Job done. Now get the f* off my lawn!
  • Some Guy (unregistered) in reply to The Bytemaster
    The Bytemaster:
    I smell a coding contest... who can write the code that does the most to look like it is supposed to do X while not actually performing X.

    You mean like this?

    The Underhanded C Contest has been around for a while now. I suggest you get some /. in you before you lose your geek card!

  • Stark (unregistered) in reply to Rottweiler
    Rottweiler:
    Drat!

    "The character 's' is not supported in the 4th position"

    I assume you have an 's' in the 4th position of your password... you see, I can't tell because your password just appears as a series of asterisks to me.

  • frits (unregistered) in reply to Stark
    Stark:
    Rottweiler:
    Drat!

    "The character 's' is not supported in the 4th position"

    I assume you have an 's' in the 4th position of your password... you see, I can't tell because your password just appears as a series of asterisks to me.

    hunter2

    It didn't work for me.

  • foundit (unregistered)

    The same guy must be behind the PAYPlus USA software encountered by J Watson...

    http://thedailywtf.com/Articles/Password-Perplexity.aspx

    Either that, or it's a common industry pattern.

  • Mythran (unregistered)
    ...
    Console.WriteLine("Password does not match, please verify your user information:");
    var custs =
    	from cust in context.Customers
    	where cust.Password != password
    	select cust;
    
    foreach (var cust in custs) {
    	Console.Write(
    		"Is your name {0}, {1} and your SSN {2} [y|n]? ",
    		cust.LastName,
    		cust.FirstName,
    		cust.SSN
    	);
    	ConsoleKeyInfo key = Console.ReadKey();
    	Console.WriteLine(key.KeyChar);
    	
    	if (char.ToLower(key.KeyChar) == 'y') {
    		foundUser = true;
    		break;
    	}
    }
    

    Much better!

  • Abdiel (unregistered)

    I am so implementing a GenerateRandomError() function in my code tomorrow!

  • Franz Kafka (unregistered) in reply to Buddy
    Buddy:
    I know guys that evil. They always happen to be short tubby guys with short fat fingers. These bastards do the absolute minimum: come in at 11:00, check up on their their e-mail (reading any jokes out loud - you wanna hear a joke? you wanna hear a joke? ...), go out for a 90 minute lunch, come back, play games for a couple of hours, burping and farting the whole time, then head home around 3:00.

    Except when the boss is around... These fuckers have an uncanny sense to be in the right place at the right time, to step into high gear to look busy, and make themselves look like some kind of demi-god.

    True story, many years ago, new client coming up, I spent two weeks of work in one week getting the website ready, and needed just one piece of information, some password or security key or something. Of course I didn't have it when it was needed, so at 11th hour the site wasn't working. Butt munch just happens to be there late at night when the boss is freaking, helps him to look through his e-mails, conveniently skipping over my frantic requests, to find whatever. He plugs it in, site works beautifully. Next morning, he looks like a hero, I look like a douche bag. I'm getting angry now just thinking about it.

    Currently reading 'Eat or be Eaten', and it has solutions for these fucks. Basically, document your requests (in a black book that goes home with you), qualify your promises around whatever they need to deliver, and alert your boss to the nonresponsiveness of said fat fuck (using black book). There is some discussion on how to do this without appearing ineffective, and it comes across as one of the more hands-on guides to surviving office politics.

  • Franz Kafka (unregistered) in reply to Power Troll
    Power Troll:
    Buddy:
    really angry rant

    Protip: Being confrontational is often better than sitting back and getting really really mad, and then telling others on the internet. Did you ever, you know, do anything about it?

    Re: TFA, TUWTF is that refreshing the page would somehow solve a null reference.

    being confrontational, like all things, works best when done right. Learn how or suffer the consequences.

  • (cs) in reply to Franz Kafka
    Franz Kafka:
    Power Troll:
    Buddy:
    really angry rant

    Protip: Being confrontational is often better than sitting back and getting really really mad, and then telling others on the internet. Did you ever, you know, do anything about it?

    Re: TFA, TUWTF is that refreshing the page would somehow solve a null reference.

    being confrontational, like all things, works best when done right. Learn how or suffer the consequences.

    It seems to me jealousy is the root of the problem here. Learn how to be as self-reliant as possible. Build trusting relationships with receptive coworkers, avoid untrustworthy ones, and, above all, learn to let go of anger and hostility. That guy's work ethic should have no power over how you feel. If you disapprove of his behavior and this controls your emotions, he wins-twice.

  • Amiga (unregistered)

    I think i am missing the point here. Why not do what Microsoft does? I mean thats way more effective use of developers time... And it's reusable.

    while(true){
    alert("Error: " + Math.floor(Math.random() * 1000000) + " occurred");
    }
    
  • Wyrd (unregistered)

    The good part about this code is that it's written in a manner that's straightforward and easy to read/understand. I mean having a function named "GenerateRandomError()" is really self-explanatory. So good job on that part.

    TWTF is why would someone want to code something like this that's intentionally broken? Did they have some sort of vendetta? And if they did, what an odd way to go about it. I mean no logic bombs that take out the mainframe, just something that's really annoying.

    -- Furry cows moo and decompress.

  • JohnFx (unregistered)

    I think I have used quite a few applications that this developer has written. At least I am pretty sure the GenerateRandomError method was in all of them.

  • Wyrd (unregistered) in reply to Buddy
    Buddy:
    I know guys that evil. They always happen to be short tubby guys with short fat fingers. These bastards do the absolute minimum: come in at 11:00, check up on their their e-mail (reading any jokes out loud - you wanna hear a joke? you wanna hear a joke? ...), go out for a 90 minute lunch, come back, play games for a couple of hours, burping and farting the whole time, then head home around 3:00.

    Except when the boss is around... These fuckers have an uncanny sense to be in the right place at the right time, to step into high gear to look busy, and make themselves look like some kind of demi-god.

    True story, many years ago, new client coming up, I spent two weeks of work in one week getting the website ready, and needed just one piece of information, some password or security key or something. Of course I didn't have it when it was needed, so at 11th hour the site wasn't working. Butt munch just happens to be there late at night when the boss is freaking, helps him to look through his e-mails, conveniently skipping over my frantic requests, to find whatever. He plugs it in, site works beautifully. Next morning, he looks like a hero, I look like a douche bag. I'm getting angry now just thinking about it.

    They pervade every industry. I remember in many of my non-IT jobs, these short tubby guys who do dick all until the boss is around. God have mercy if they do any work on your projects, you spend twice as much time undoing their shit, then doing it right. Stupid fucks.

    I knew fat guy once that was a hard worker. I agree with you that slackers plague you where ever you go and that they suck. I just don't think it's fair to say that short, fat guys with stubby fingers are always slackers.

    -- Furry cows moo and decompress.

  • (cs) in reply to foundit
    foundit:
    The same guy must be behind the PAYPlus USA software encountered by J Watson...

    http://thedailywtf.com/Articles/Password-Perplexity.aspx

    Either that, or it's a common industry pattern.

    Good find!

    So does anyone know if PAYPlus USA chose random letters to complain about? If so, then I believe we may have a winner.

  • (cs) in reply to Wyrd
    Wyrd:
    Buddy:
    I know guys that evil. They always happen to be short tubby guys with short fat fingers. These bastards do the absolute minimum: come in at 11:00, check up on their blah blah whining-about-co-workers blah blah...
    I knew fat guy once that was a hard worker. I agree with you that slackers plague you where ever you go and that they suck. I just don't think it's fair to say that short, fat guys with stubby fingers are always slackers.
    To be fair, he wasn't saying that fat guys with stubby fingers are slackers, rather the other way around. Which is also unfair for him to say, because I've met slackers of all shapes and sizes.
  • nasch (unregistered) in reply to Wyrd
    Wyrd:
    I just don't think it's fair to say that short, fat guys with stubby fingers are always slackers.

    He didn't say that, he said the converse: slackers are always short fat guys with stubby fingers.

  • Ryan (unregistered)

    And even worse - the Math.random() * 1. What a waste of 4/8 bytes.

  • (cs) in reply to Ryan
    Ryan:
    And even worse - the Math.random() * 1. What a waste of 4/8 bytes.

    So he should remove it, and take a nibble out of crime?

  • Kasper (unregistered) in reply to Arvind
    Arvind:
    The standard doesn't allow it. Preprocessor cannot alter meanings of keywords.
    Of course it can. The preprocessing happens before the parsing even looks for keywords. The preprocessor could even run as a separate program that doesn't have to know the language that is eventually going to be compiled.

Leave a comment on “The Password Reset Façade”

Log In or post as a guest

Replying to comment #:

« Return to Article