• (cs)

    //try to connect to Sequel Server


    Classic!
  • (cs)

    If you don't like the requirements, just add functionality that applies only to you.

  • (cs) in reply to Ytram
    Ytram:

    //try to connect to Sequel Server


    Classic!


    Yeah, I hope Sequel Server is as good as the first one.
  • (cs)

    How can you logically justify MANUALLY throwing an ArgumentOutOfRangeException from a login method? That blows my mind.

  • (cs)
    Alex Papadimoulis:
      if(Environment.UserName == "yuri")
    {
    if(MessageBox.Show(
    "Would you like to update the SQL server with the current version?"
    ,"Update",MessageBoxButtons.YesNo) == DialogResult.Yes)
    {
    service.SetProgramVersionOnSQL();
    }
    }


    He's one of those guys who leave his cellphone on 24/7 to make a good impression for the boss.:o

  • (cs)

    so let me get this straight?  The Mad Ukranian deleted all his own source code when he left the company?

  • language guy (unregistered)

    Umm, they can't be "fairly unique design habits".  They are either unique or they are not.  No qualifier is allowed.

  • (cs)
    Alex Papadimoulis:
    try  //try to connect to Sequel Server
    {
      if(!service.ConnectToSQL(LoginInfo.GetConnectingStringArrayToSQL()))
      {
        ...
      }
    }
    catch(ArgumentOutOfRangeException)
    {
      ...
    }
    catch(Exception ex1) //connection to SQL server failed
    {
      ...
    }

      Normally, one assumes that if a method returns a boolean indicator of its success then it also internally traps any exceptions. Perhaps if more detail is needed, the method could return some kind of status code instead of just a boolean.

  • (cs) in reply to fregas

    fregas:
    so let me get this straight?  The Mad Ukranian deleted all his own source code when he left the company?

    Hmmm.  Anyone else think this is really management's fault?  So many times I have seen the 'architect' role given to relatively inept people.  They basically let a bad and unscrupulous programmer walk all over them.  I guess they either didn't have source control or Yuri was also the admin for that too.

  • Sean Connery (unregistered)

    Is this the ukranian equivalent of hungarian notation?

  • (cs) in reply to John Bigboote
    John Bigboote:
    How can you logically justify MANUALLY throwing an ArgumentOutOfRangeException from a login method? That blows my mind.


    It seems to me that "string parser" similar to connectionString.Substring(connectionString.IndexOf("foo"),... would do the trick in case "foo" is not present in connectionString.

    I know it's silly, but what else might throw that kind of exception ? Do you really think it's thrown manually ?
    Well, maybe you're right: I've seen that kind of logic too, just a little bit more sophisticated
    <font size="2">try
    {
        Login();
    }
    catch(InvalidPasswordException ipex)
    {
    ...
    }
    </font>

  • (cs) in reply to language guy

    Anonymous:
    Umm, they can't be "fairly unique design habits".  They are either unique or they are not.  No qualifier is allowed.

    Grammar nazi. I suppose you also jump all over people who use the word "decimate" in any other sense besides "to reduce by one tenth".

     

  • (cs) in reply to language guy
    Anonymous:
    Umm, they can't be "fairly unique design habits".  They are either unique or they are not.  No qualifier is allowed.


    Given some of the stuff we see on here then they could be described unfairly as unique. :)
  • (cs)
    Alex Papadimoulis:

      MessageBox.Show(
        "New version of the TPS Manager program is required.\n" +
        "Please contact the administrator of TPS Manager and ask for the updated version.");

    shouldn't this be:

    MessageBox.Show("We are using a new cover sheet for our TPS Manager program.  Did you get the memo?");

  • AnonymousCoder (unregistered) in reply to dreifus

    Do I have to point the obvious WTF here again?

    Yes, You guessed it!!! No isTure() function... it should've been:

      if(!IsTrue(service.ConnectToSQL(LoginInfo.GetConnectingStringArrayToSQL())))
      {
        Close();
        return;
      }
    }

    Alternatively Mad Ukrainian could've used isNotTrue function to avoid costly "!" evaluation.

    Additionally:

      if(Environment.UserName == "yuri")

    that should've been done with isYuri function

      if(isYuri(Environment.UserName) )

    {...}

    private bool isYuri(string uri)

    {

       if (uri=="yuri")

    {

       return isTrue(true);

    }else

    {

    return isNotTrue(true);

    }

    }

  • (cs) in reply to AnonymousCoder
    Anonymous:

    Do I have to point the obvious WTF here again?

    Yes, You guessed it!!! No isTure() function... it should've been:

      if(!IsTrue(service.ConnectToSQL(LoginInfo.GetConnectingStringArrayToSQL())))
      {
        Close();
        return;
      }
    }

    Alternatively Mad Ukrainian could've used isNotTrue function to avoid costly "!" evaluation.

    Additionally:

      if(Environment.UserName == "yuri")

    that should've been done with isYuri function

      if(isYuri(Environment.UserName) )

    {...}

    private bool isYuri(string uri)

    {

       if (uri=="yuri")

    {

       return isTrue(true);

    }else

    {

    return isNotTrue(true);

    }

    }




    Are you going to define the isTure method or not? Come on Anonymous - I can barely contain my excitement.
  • (cs)
    Alex Papadimoulis:

    ... today's example of checking a constant variable in the code against a version listed in the database.



    Would anybody please point to the line of code where this checking occurs ?
  • AnonymousCoder (unregistered) in reply to Richard Nixon
    Richard Nixon:
    Anonymous:

    Do I have to point the obvious WTF here again?

    Yes, You guessed it!!! No isTure() function... it should've been:

      if(!IsTrue(service.ConnectToSQL(LoginInfo.GetConnectingStringArrayToSQL())))
      {
        Close();
        return;
      }
    }

    Alternatively Mad Ukrainian could've used isNotTrue function to avoid costly "!" evaluation.

    Additionally:

      if(Environment.UserName == "yuri")

    that should've been done with isYuri function

      if(isYuri(Environment.UserName) )

    {...}

    private bool isYuri(string uri)

    {

       if (uri=="yuri")

    {

       return isTrue(true);

    }else

    {

    return isNotTrue(true);

    }

    }




    Are you going to define the isTure method or not? Come on Anonymous - I can barely contain my excitement.

    Sure I'd be happy to.

    <FONT color=#0000ff size=2>

    private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>bool</FONT><FONT size=2> isTrue(</FONT><FONT color=#0000ff size=2>bool</FONT><FONT size=2> theTruth)

    {

    </FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (isUri(System.Environment.UserName()))

    {

    </FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>true</FONT><FONT size=2>;

    }

    </FONT><FONT color=#0000ff size=2>else

    </FONT><FONT size=2>

    {

       <FONT color=#0000ff>return</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>false</FONT><FONT size=2>;</FONT>

    </FONT><FONT size=2>

    }

    }

    CAPTCHA this time was BOZO, how Ironic.  

    </FONT>
  • (cs)

    Miscellaneous mini wtf:

    Alex Papadimoulis:
      if(Environment.UserName == "yuri")


    I can't tell if this is C++, C#, or Java, but regardless of that, isn't it generally a bad idea to compare a String reference/pointer to a constant? Should be < Environment.Username.equals("yuri") >.

  • (cs) in reply to Brendan Kidwell

    Or am I just stuck thinking in Java's rigid syntax? :^) Never really used C#, and I avoid C++.

  • (cs) in reply to Brendan Kidwell
    Brendan Kidwell:
    Miscellaneous mini wtf:

    Alex Papadimoulis:
      if(Environment.UserName == "yuri")


    I can't tell if this is C++, C#, or Java, but regardless of that, isn't it generally a bad idea to compare a String reference/pointer to a constant? Should be < Environment.Username.equals("yuri") >.



    It's C#, and there's no issue with the comparison being done, other than the fact that it's a nasty hack/security hole.
  • Dominic Adelaar (unregistered) in reply to AnonymousCoder
    Anonymous:
    Sure I'd be happy to.<font color="#0000ff" size="2"> </font>

    <font color="#0000ff" size="2">private</font><font size="2"> </font><font color="#0000ff" size="2">bool</font><font size="2"> isTrue(</font><font color="#0000ff" size="2">bool</font><font size="2"> theTruth)</font>

    <font size="2">{</font>

    <font color="#0000ff" size="2">if</font><font size="2"> (isUri(System.Environment.UserName()))</font>

    <font size="2">{</font>

    <font color="#0000ff" size="2">return</font><font size="2"> </font><font color="#0000ff" size="2">true</font><font size="2">;</font>

    <font size="2">}</font>

    <font color="#0000ff" size="2">else</font>

    <font size="2">

    {

       <font color="#0000ff">return</font><font size="2"> </font><font color="#0000ff" size="2">false</font><font size="2">;</font>

    </font><font size="2">

    }

    }

    CAPTCHA this time was BOZO, how Ironic.  

    </font>


    isTrue(true) == isTrue(false) ?
  • (cs) in reply to AnonymousCoder
    Anonymous:
    Richard Nixon:
    Anonymous:

    Do I have to point the obvious WTF here again?

    Yes, You guessed it!!! No isTure() function... it should've been:

      if(!IsTrue(service.ConnectToSQL(LoginInfo.GetConnectingStringArrayToSQL())))
      {
        Close();
        return;
      }
    }

    Alternatively Mad Ukrainian could've used isNotTrue function to avoid costly "!" evaluation.

    Additionally:

      if(Environment.UserName == "yuri")

    that should've been done with isYuri function

      if(isYuri(Environment.UserName) )

    {...}

    private bool isYuri(string uri)

    {

       if (uri=="yuri")

    {

       return isTrue(true);

    }else

    {

    return isNotTrue(true);

    }

    }




    Are you going to define the isTure method or not? Come on Anonymous - I can barely contain my excitement.

    Sure I'd be happy to.

    <font color="#0000ff" size="2"> </font>

    <font color="#0000ff" size="2">private</font><font size="2"> </font><font color="#0000ff" size="2">bool</font><font size="2"> isTrue(</font><font color="#0000ff" size="2">bool</font><font size="2"> theTruth)</font>

    <font size="2">{</font>

    <font color="#0000ff" size="2">if</font><font size="2"> (isUri(System.Environment.UserName()))</font>

    <font size="2">{</font>

    <font color="#0000ff" size="2">return</font><font size="2"> </font><font color="#0000ff" size="2">true</font><font size="2">;</font>

    <font size="2">}</font>

    <font color="#0000ff" size="2">else</font>

    <font size="2">

    {

       <font color="#0000ff">return</font><font size="2"> </font><font color="#0000ff" size="2">false</font><font size="2">;</font>

    </font><font size="2">

    }

    }

    CAPTCHA this time was BOZO, how Ironic.  

    </font>


    You fail today. I said I wanted a "isTure" method - which is the typo from the post I was responding to. A programmer with poor attention to detail...could you post some of your code here? I'm sure it would be entertaining.
  • (cs)
    //try to connect to Sequel Server

    I hate to rant, but I can't stand people who say/type 'sequel server' instead of "Es Kyoo El"/SQL when talking about it.  Pronouncing vowel-deprived acronyms is one of the most obnoxious habits ever.
  • (cs) in reply to Brendan Kidwell
    Brendan Kidwell:
    Miscellaneous mini wtf:

    Alex Papadimoulis:
      if(Environment.UserName == "yuri")


    I can't tell if this is C++, C#, or Java, but regardless of that, isn't it generally a bad idea to compare a String reference/pointer to a constant? Should be < Environment.Username.equals("yuri") >.



    If he follows conventions, then this definitely isn't Java (unless nearly everything is static)
  • Casey (unregistered)

    I have never posted here before, and I hate to be an arse, but this is not really even a WTF in my opinion, if this guy did anything wrong, its because he hard coded his user name into the application, but I think we have all been guilty of worse before.

    The point here is they were verifying that the client connecting to the database was the current version and if it wasnt they didnt allow the user to continue.  What he did is if he connected with version that was newer or older, he put in code to set the version in the database.

     

  • (cs) in reply to AnonymousCoder
    Anonymous:

    Sure I'd be happy to.

    <font color="#0000ff" size="2"> </font>

    <font color="#0000ff" size="2">private</font><font size="2"> </font><font color="#0000ff" size="2">bool</font><font size="2"> isTrue(</font><font color="#0000ff" size="2">bool</font><font size="2"> theTruth)</font>

    <font size="2">{</font>

    <font color="#0000ff" size="2">if</font><font size="2"> (isUri(System.Environment.UserName()))</font>

    <font size="2">{</font>

    <font color="#0000ff" size="2">return</font><font size="2"> </font><font color="#0000ff" size="2">true</font><font size="2">;</font>

    <font size="2">}</font>

    <font color="#0000ff" size="2">else</font>

    <font size="2">

    {

       <font color="#0000ff">return</font><font size="2"> </font><font color="#0000ff" size="2">false</font><font size="2">;</font>

    </font><font size="2">

    }

    }

    CAPTCHA this time was BOZO, how Ironic.  

    </font>


    I don't think it'll pass unit test.
    Besides, you forgot to provide second argument, bool confirm
  • (cs) in reply to Richard Nixon
    Richard Nixon:

    You fail today. I said I wanted a "isTure" method - which is the typo from the post I was responding to. A programmer with poor attention to detail...could you post some of your code here? I'm sure it would be entertaining.


    Yeah, I'm sure there is a correlation between a coder's posting habits and his coding ability.

    Are you saying also that you've never made a simple typo?  Never left a semi-colon out?  Never mistyped a variable name?  Yeah right.
  • (cs) in reply to Casey
    Anonymous:
    but I think we have all been guilty of worse before.

    Speak for yourself.

  • (cs) in reply to Ytram
    Ytram:
    Richard Nixon:

    You fail today. I said I wanted a "isTure" method - which is the typo from the post I was responding to. A programmer with poor attention to detail...could you post some of your code here? I'm sure it would be entertaining.


    Yeah, I'm sure there is a correlation between a coder's posting habits and his coding ability.

    Are you saying also that you've never made a simple typo?  Never left a semi-colon out?  Never mistyped a variable name?  Yeah right.


    He made 2 mistakes.

    1. The original typo.
    2. Not reading my request closely enough.

    The 2nd mistake he made was the one I was talking about when I said he had poor attention to detail. The typo has nothing to do with it, tough guy.
  • (cs) in reply to Cthulhon
    Cthulhon:
    //try to connect to Sequel Server

    I hate to rant, but I can't stand people who say/type 'sequel server' instead of "Es Kyoo El"/SQL when talking about it.  Pronouncing vowel-deprived acronyms is one of the most obnoxious habits ever.


    Worse yet, some people pronounce C# as C-Sharp instead of C-Pound as it obviously should be.
  • (cs) in reply to Richard Nixon
    Richard Nixon:

    He made 2 mistakes.

    1. The original typo.
    2. Not reading my request closely enough.

    The 2nd mistake he made was the one I was talking about when I said he had poor attention to detail. The typo has nothing to do with it, tough guy.


    You still seem to be making a connection between a person's posting habit and their coding ability.  Do you seriously think that someone is going to devote the same amount of attention to reading/responding to a post on a message board that they are going to devote to their job?
  • (cs) in reply to Ytram
    Ytram:
    Richard Nixon:

    He made 2 mistakes.

    1. The original typo.
    2. Not reading my request closely enough.

    The 2nd mistake he made was the one I was talking about when I said he had poor attention to detail. The typo has nothing to do with it, tough guy.


    You still seem to be making a connection between a person's posting habit and their coding ability.  Do you seriously think that someone is going to devote the same amount of attention to reading/responding to a post on a message board that they are going to devote to their job?


    Oddly enough, I do. From the best, I expect attention to detail in everything they do.
  • MrMe (unregistered) in reply to Ytram

    Ytram:


    You still seem to be making a connection between a person's posting habit and their coding ability.  Do you seriously think that someone is going to devote the same amount of attention to reading/responding to a post on a message board that they are going to devote to their job?

    It seems to me that a lot of the programmers who post here spend way too much time bickering and chiding eachother over the smallest non-issues.  It feels like a highschool locker room full of the stereotypical "jock" arguing over who's stronger.  Take a step back and look what types of things you are posting and take a moment to reflect on your bickering and you will realize how childish and pointless it is. 

  • (cs) in reply to Richard Nixon
    Richard Nixon:
    Oddly enough, I do. From the best, I expect attention to detail in everything they do.


    Get used to disappointment then.
  • (cs) in reply to Cthulhon
    Cthulhon:
    //try to connect to Sequel Server

    I hate to rant, but I can't stand people who say/type 'sequel server' instead of "Es Kyoo El"/SQL when talking about it.  Pronouncing vowel-deprived acronyms is one of the most obnoxious habits ever.


    Why? Did you think they were referring to something other than SQL Server?

    Is there a Big Book of Techie Pronunciations that all programmers are required to follow?
  • (cs) in reply to Ytram
    Ytram:

    You still seem to be making a connection between a person's posting habit and their coding ability. 


    Isn't it obvious ?

  • (cs) in reply to Ytram
    Ytram:
    Richard Nixon:
    Oddly enough, I do. From the best, I expect attention to detail in everything they do.


    Get used to disappointment then.


    Notice that I said "from the best." Seeing a lack of attention to detail allows me to quickly ignore those people.
  • (cs) in reply to dreifus
    dreifus:
    Cthulhon:
    //try to connect to Sequel Server

    I hate to rant, but I can't stand people who say/type 'sequel server' instead of "Es Kyoo El"/SQL when talking about it.  Pronouncing vowel-deprived acronyms is one of the most obnoxious habits ever.


    Worse yet, some people pronounce C# as C-Sharp instead of C-Pound as it obviously should be.


    Say "C Pound" in the U.K. and you'll be referring to low-grade currency.

    Saying "C Hash" there would be clearer.
  • (cs) in reply to Cthulhon
    Cthulhon:
    //try to connect to Sequel Server

    I hate to rant, but I can't stand people who say/type 'sequel server' instead of "Es Kyoo El"/SQL when talking about it.  Pronouncing vowel-deprived acronyms is one of the most obnoxious habits ever.


    I suppose you ALWAYS say the letters (color coded for readability) R-A-M, C-D-R-O-M, L-A-N, A-N-S-I, A-S-C-I-I, M-I-M-E, etc?  Relax dude.  Thankfully we're not all as uptight as you.
  • MrMe (unregistered) in reply to Mung Kee

    Mung Kee:
    Cthulhon:
    //try to connect to Sequel Server

    I hate to rant, but I can't stand people who say/type 'sequel server' instead of "Es Kyoo El"/SQL when talking about it.  Pronouncing vowel-deprived acronyms is one of the most obnoxious habits ever.


    I suppose you ALWAYS say the letters (color coded for readability) R-A-M, C-D-R-O-M, L-A-N, A-N-S-I, A-S-C-I-I, M-I-M-E, etc?  Relax dude.  Thankfully we're not all as uptight as you.

     

    Just in order to beat Cthulhon to the punch, he did say "Pronouncing vowel-deprived acronyms is one of the most obnoxious habits ever." and all of your examples contain vowels.

  • Ded Morris (unregistered) in reply to MrMe
    Anonymous:

    Ytram:


    You still seem to be making a connection between a person's posting habit and their coding ability.  Do you seriously think that someone is going to devote the same amount of attention to reading/responding to a post on a message board that they are going to devote to their job?

    It seems to me that a lot of the programmers who post here spend way too much time bickering and chiding eachother over the smallest non-issues.  It feels like a highschool locker room full of the stereotypical "jock" arguing over who's stronger.  Take a step back and look what types of things you are posting and take a moment to reflect on your bickering and you will realize how childish and pointless it is. 

    I agree completely. I hate the nitpicking.

    Oh, by the way.  Shouldn't it be "high school" not "highschool", as well as "stereo-typical" not "stereotypical.

    One more thing.  You didn't put a space between "each" and "other".

    And what about ...

  • (cs)
    Alex Papadimoulis:

    "New version of the TPS Manager program is required.\n" +
    "Please contact the administrator of TPS Manager and ask for the updated version.");




    I call shinanagans... SHINANAGANS!
  • (cs) in reply to MrMe
    Anonymous:

    Ytram:


    You still seem to be making a connection between a person's posting habit and their coding ability.  Do you seriously think that someone is going to devote the same amount of attention to reading/responding to a post on a message board that they are going to devote to their job?

    It seems to me that a lot of the programmers who post here spend way too much time bickering and chiding eachother over the smallest non-issues...



    OMG!!11!oneidontreadbooks!!1  "eachother?!"  What the heck is that?!!  I've never heard of that word!  You are so stupid!  Tell me your name so I can remember not to hire you!  You, with your obvious lack of attention to detail, have the nerve to call youself a programmer?!  I would say that you need to go back to flipping burgers, but based on this post of yours, you'd probably get those stuck together too.  Man, I feel sorry for your employer.

    Sorry, what were you saying?


    ;)
  • (cs) in reply to MrMe
    Anonymous:

    Mung Kee:
    Cthulhon:
    //try to connect to Sequel Server

    I hate to rant, but I can't stand people who say/type 'sequel server' instead of "Es Kyoo El"/SQL when talking about it.  Pronouncing vowel-deprived acronyms is one of the most obnoxious habits ever.


    I suppose you ALWAYS say the letters (color coded for readability) R-A-M, C-D-R-O-M, L-A-N, A-N-S-I, A-S-C-I-I, M-I-M-E, etc?  Relax dude.  Thankfully we're not all as uptight as you.

     

    Just in order to beat Cthulhon to the punch, he did say "Pronouncing vowel-deprived acronyms is one of the most obnoxious habits ever." and all of your examples contain vowels.



    <sarcasm>
    Ah, I see.  So the vowels are the key.  Well that changes everything.  All of the sudden 'sequel server' sounds like nails on a chalkboard to me. 
    </sarcasm>
  • (cs) in reply to Str8Dog
    Str8Dog:
    Alex Papadimoulis:

    "New version of the TPS Manager program is required.\n" +
    "Please contact the administrator of TPS Manager and ask for the updated version.");




    I call shinanagans... SHINANAGANS!


    Calm down.  Alex will commonly use references to that movie when anonymizing code.
  • (cs) in reply to Mung Kee
    Mung Kee:
    Anonymous:

    Mung Kee:
    Cthulhon:
    //try to connect to Sequel Server

    I hate to rant, but I can't stand people who say/type 'sequel server' instead of "Es Kyoo El"/SQL when talking about it.  Pronouncing vowel-deprived acronyms is one of the most obnoxious habits ever.


    I suppose you ALWAYS say the letters (color coded for readability) R-A-M, C-D-R-O-M, L-A-N, A-N-S-I, A-S-C-I-I, M-I-M-E, etc?  Relax dude.  Thankfully we're not all as uptight as you.

     

    Just in order to beat Cthulhon to the punch, he did say "Pronouncing vowel-deprived acronyms is one of the most obnoxious habits ever." and all of your examples contain vowels.



    <sarcasm>
    Ah, I see.  So the vowels are the key.  Well that changes everything.  All of the sudden 'sequel server' sounds like nails on a chalkboard to me. 
    </sarcasm>


    Even the ones with vowels in them sound stupid when pronounced as a word and not an acronym.  I submit to you "GUI" and "URL".
  • (cs)

    Now I see the WTF!

       if(Environment.UserName == "yuri")
     

    Isn't sufficient.  It should be:

    if (!name.length < 4 && ! name.length > 4 and ! name < 44017 &&  ! name > 44017

       && name = "yuri")

  • (cs) in reply to Ytram
    Ytram:
    Str8Dog:
    Alex Papadimoulis:

    "New version of the TPS Manager program is required.\n" +
    "Please contact the administrator of TPS Manager and ask for the updated version.");




    I call shinanagans... SHINANAGANS!


    Calm down.  Alex will commonly use references to that movie when anonymizing code.


    Ahh... Well... In that case... Carry on with the grammar flame war.
  • (cs) in reply to Whackjack
    Whackjack:
    Even the ones with vowels in them sound stupid when pronounced as a word and not an acronym.  I submit to you "GUI" and "URL".


    Yeah, like those other crazy ones like LASER and RADAR.

Leave a comment on “The Revenge of the Mad Ukrainian”

Log In or post as a guest

Replying to comment #:

« Return to Article