• (cs)

    Someone really needs to create a Better Consultants Bureau, to track who all of these shitty consultants are and who is actually worth their quotes.

  • Rain dog (unregistered)

    Dude where can I hire this guy?

  • ChiefCrazyTalk (unregistered)

    Eyes + Goggles = nothing.

     

    Seriously,  can someone call themselves a developer and not understand what "null" is?  And how much was this so-called second highest consultant being paid?   

     

  • ChiefCrazyTalk (unregistered)
    Alex Papadimoulis:

    someString = anotherString.ToString().ToString();

     

    Oh, and regarding this... perhaps the second ToString() is in case the first one doesn't work?  Maybe triple redundancy is needed here?

  • (cs) in reply to Matt B

    Matt B:
    Someone really needs to create a Better Consultants Bureau, to track who all of these shitty consultants are and who is actually worth their quotes.

    Agreed.

  • (cs) in reply to Matt B

    "...figured that the best consultant probably charged the second highest rate..."

     

    Well, obviously, you get what you pay for (or not?!)

  • Randolpho (unregistered) in reply to Matt B

    I want to take that programmer into a small room and do unspeakable things to him. Seriously...... [^o)] WTF?

  • (cs)

    Making the decision by looking who asks for the second-highest rate is only marginally less idiotic that looking for who asks for the lowest. How about asking gasp technical questions? Like, in an interview for a permanent position? There really shouldn't be much difference when hiring consultants. But ofcourse it requires you to already have at least one person who can ask the right questions and tell well-thought-out answers from buzzword bullshit.

  • (cs) in reply to Matt B

    Matt B:
    Someone really needs to create a Better Consultants Bureau, to track who all of these shitty consultants are and who is actually worth their quotes.

     

    As I have always said, "Those who can, do.

    Those who can't, sell

    and those who can't sell are CONSULTANTS"

     

    {Just a joke, no flames please}

  • Randolpho (unregistered) in reply to ChiefCrazyTalk
    Anonymous:
    Alex Papadimoulis:

    someString = anotherString.ToString().ToString();

     

    Oh, and regarding this... perhaps the second ToString() is in case the first one doesn't work?  Maybe triple redundancy is needed here?

     

    The real WTF is why he didn't do this:

    someString = ((string)string.Copy(anotherString.ToString().Clone().ToString()).ToString()).ToString();
    
  • (cs)

    <FONT face=Tahoma size=2>He forgot to use the following assignment:</FONT>

    <FONT face=Tahoma size=2><FONT face="Courier New">StringBuilder yetAnotherString = <FONT style="BACKGROUND-COLOR: #ffffff" color=#0000ff>new</FONT> StringBuilder(anotherString);
    someString = yetAnotherString.ToString();</FONT></FONT>

    <FONT face=Tahoma size=2>ouch....</FONT>

  • (cs) in reply to ParkinT

    <font size="2">I bet his management will think twice the next time an employee says they "have" to go to the hospital.

    </font>

  • (cs) in reply to Randolpho
    Anonymous:
    Anonymous:
    Alex Papadimoulis:

    someString = anotherString.ToString().ToString();

     

    Oh, and regarding this... perhaps the second ToString() is in case the first one doesn't work?  Maybe triple redundancy is needed here?

     

    The real WTF is why he didn't do this:

    someString = ((string)string.Copy(anotherString.ToString().Clone().ToString()).ToString()).ToString();
    

    Dude, that just won't work. You are missing one toString ;)

  • David (unregistered)

    Alex Papadimoulis:

    someString = anotherString.ToString().ToString();

    This may be referred to as the Daffy Duck as Robin Hood method of programming:

    someString = robinHood.ToTrip().ToTrip().ToTrip().ToTrip()...;

    friarTuck.ROFL = true;

  • E (unregistered) in reply to Randolpho

    <FONT size=2><FONT face="Courier New">

    <FONT face="Courier New"><FONT size=2>I think everyone needs to add another level of WTF to this:

    </FONT></FONT></FONT>

    <FONT face="Courier New">someString = </FONT></FONT><FONT face="Courier New"><FONT color=#0000ff size=2>new</FONT><FONT size=2> String(((</FONT><FONT color=#0000ff size=2>string</FONT><FONT size=2>)</FONT><FONT color=#0000ff size=2>string</FONT><FONT size=2>.Copy(anotherString.ToString().Clone().ToString()).ToString()).ToString().ToCharArray());</FONT></FONT>

    <FONT face="Courier New"><FONT size=2>Enjoy :)

    </FONT></FONT>
  • Replica (unregistered)

    WTF!!!!

    Never thought my code would end up here...

  • Jason (unregistered)

    This is just poor-man's obfuscation...

  • (cs) in reply to Randolpho
    Anonymous:
    Anonymous:
    Alex Papadimoulis:

    someString = anotherString.ToString().ToString();

     

    Oh, and regarding this... perhaps the second ToString() is in case the first one doesn't work?  Maybe triple redundancy is needed here?

     

    The real WTF is why he didn't do this:

    someString = ((string)string.Copy(anotherString.ToString().Clone().ToString()).ToString()).ToString();
    



    No no no no no.... The REAL WTF is the forum software! lol ;-P
    Seriously though... well, not really seriously, but the REAL WTF is why he didn't use an IFormatProvider!

    Seeing as this guy was priced as the second highest makes me want to start killing again. ;-)
  • Mike J (unregistered) in reply to Replica

    Actually to do this correctly, he should've had an isString function to make sure it's a string variable before calling the toString method.

    The isString() function would of course return either True, False or FileNotFound.

  • (cs)

    ToString needs to be overloaded for this to make sense:

    anotherString.ToString(true).ToString("No, Really!")

  • (cs)

    I have to wonder why core Java just doesn't define String.toString to throw a YouDumbassException...

  • (cs) in reply to Replica

    No i think the best method for copying strings is this, i use it all the time:

    string brillantPaulaString = (string)((yetAnotherString.substr(0,yetAnotherString.Length()-1)).ToString());

     

    Or maybe he was just showing off that he knew how to use all the functions of the string class/string casting????

     

    ;)

  • (cs) in reply to David

    Anonymous:

    This may be referred to as the Daffy Duck as Robin Hood method of programming:

    someString = robinHood.ToTrip().ToTrip().ToTrip().ToTrip()...;

    friarTuck.ROFL = true;

    That's why my new secure socket factory module has code that reads like this:

    def respondToAttack(threat)
       begin
          threat.dodge
          threat.parry
          threat.guard   
       rescue SproingError
          Logger.logEntry("SPRRROOOOIINNGGG.")
          self.beak.straighten
       end
    end
  • (cs)
    Alex Papadimoulis:

    Standard:
    Initialize all variables at the point of declaration; null is prefered for reference types and strings while min- and max- values are preferred for value types, e.g. DateTime.MinValue.

    <FONT face="Courier New">string dateStart = "DateTime.MinValue";</FONT>

    No, it has to be this way. I tried <FONT face="Courier New">DateTime dateStart</FONT>, but it wouldn't compile.

    --Rank

  • Randolpho (unregistered) in reply to David
    Anonymous:

    This may be referred to as the Daffy Duck as Robin Hood method of programming:

    someString = robinHood.ToTrip().ToTrip().ToTrip().ToTrip()...;

    friarTuck.ROFL = true;

    You, sir, are my personal ninja for the day. :)

  • Randolpho (unregistered) in reply to sammybaby
    sammybaby:

    That's why my new secure socket factory module has code that reads like this:

    def respondToAttack(threat)
       begin
          threat.dodge
          threat.parry
          threat.guard   
       rescue SproingError
          Logger.logEntry("SPRRROOOOIINNGGG.")
          self.beak.straighten
       end
    end

     

    you left out thrust and spin.

     

    Dodge! Parry! Thrust! Spin! <sproing>

  • barney (unregistered)

    Clearly this consultant didn't much like Java's String class--that must be why he's created is own string class. One shudders to think how string.toString() is implemented.

  • (cs) in reply to sammybaby
    sammybaby:

    Anonymous:

    This may be referred to as the Daffy Duck as Robin Hood method of programming:

    someString = robinHood.ToTrip().ToTrip().ToTrip().ToTrip()...;

    friarTuck.ROFL = true;

    That's why my new secure socket factory module has code that reads like this:

    def respondToAttack(threat)
       begin
          threat.dodge
          threat.parry
          threat.guard   
       rescue SproingError
          Logger.logEntry("SPRRROOOOIINNGGG.")
          self.beak.straighten
       end
    end

    The best part is how the SproingError still gets thrown even when operating in testing/debug mode with a mock threat.

  • pmagill (unregistered) in reply to barney

    This is Java?  I could have sworn this was C#.  Oh of course, this would NEVER happen in C#.  Maybe this is Better VB.Net.

  • (cs) in reply to E
    Anonymous:
    <font size="2"><font face="Courier New">

    <font face="Courier New"><font size="2">I think everyone needs to add another level of WTF to this:</font></font>

    <font face="Courier New"><font size="2"></font></font></font> </font>

    <font size="2"><font face="Courier New">someString = </font></font><font face="Courier New"><font color="#0000ff" size="2">new</font><font size="2"> String(((</font><font color="#0000ff" size="2">string</font><font size="2">)</font><font color="#0000ff" size="2">string</font><font size="2">.Copy(anotherString.ToString().Clone().ToString()).ToString()).ToString().ToCharArray());</font></font>

    <font face="Courier New"><font size="2">Enjoy :)</font></font>


    I'll give it a shot

    <font size="2"><font face="Courier New">someString = </font></font><font face="Courier New"><font color="#0000ff" size="2">"" + Convert.ToString(new</font><font size="2"> String(((</font><font color="#0000ff" size="2">string</font><font size="2">)</font><font color="#0000ff" size="2">string</font><font size="2">.Copy(anotherString.ToString().Clone().ToString()).ToString()).ToString().ToCharArray()));</font></font>


  • Anonymous too (unregistered) in reply to ChiefCrazyTalk
    Anonymous:

    Seriously,  can someone call themselves a developer and not understand what "null" is?  And how much was this so-called second highest consultant being paid?   



    Too much.
  • (cs)

    Errr.
    I can't paste. WTF?


    Alex, PLEASE find some new forum software!

    Anyway...

    "Initialize all variables at time of declaration".

    That's one good way to eliminate any chance of compiler catching the use of an uninitalized variable.



    (crosses fingers and hopes this post looks ok)
  • (cs)

    That really is some poor coding. Advice for Joachim:

    If you came back from the hospital with crutches...
       ... please whack this guy repeatedly between the legs

    If you came back in a wheelchair...
        ... wheel up on his feet and proceed to beat the crap out him standing up

    If they gave you a lot of meds ....
        ... the above two scenarios will be much more fun

  • Willie (unregistered) in reply to barney
    Anonymous:

    Clearly this consultant didn't much like Java's String class--that must be why he's created is own string class. One shudders to think how string.toString() is implemented.

    I don't think this is Java.

  • pmagill (unregistered) in reply to WTFer
    WTFer:
    Anonymous:
    <font size="2"><font face="Courier New">

    <font face="Courier New"><font size="2">I think everyone needs to add another level of WTF to this:</font></font>

    <font face="Courier New"><font size="2"></font></font></font> </font>

    <font size="2"><font face="Courier New">someString = </font></font><font face="Courier New"><font color="#0000ff" size="2">new</font><font size="2"> String(((</font><font color="#0000ff" size="2">string</font><font size="2">)</font><font color="#0000ff" size="2">string</font><font size="2">.Copy(anotherString.ToString().Clone().ToString()).ToString()).ToString().ToCharArray());</font></font>

    <font face="Courier New"><font size="2">Enjoy :)</font></font>


    I'll give it a shot

    <font size="2"><font face="Courier New">someString = </font></font><font face="Courier New"><font color="#0000ff" size="2">"" + Convert.ToString(new</font><font size="2"> String(((</font><font color="#0000ff" size="2">string</font><font size="2">)</font><font color="#0000ff" size="2">string</font><font size="2">.Copy(anotherString.ToString().Clone().ToString()).ToString()).ToString().ToCharArray()));</font></font>




    My addtion:

    <font size="2"><font face="Courier New">someString = Convert.ToString(</font></font><font face="Courier New"><font color="#0000ff" size="2">"").ToString + Convert.ToString(new</font><font size="2"> String(((</font><font color="#0000ff" size="2">string</font><font size="2">)</font><font color="#0000ff" size="2">string</font><font size="2">.Copy(anotherString.ToString().Clone().ToString()).ToString()).ToString().ToCharArray()));</font></font>


  • Not Second Best (unregistered) in reply to ParkinT
    ParkinT:

    "...figured that the best consultant probably charged the second highest rate..."

     

    Well, obviously, you get what you pay for (or not?!)




    "The second highest rate. . ."

    In the Soviet Union, they held a race between a Chevrolet Corvette and a Lada.   For those who don't know, a Lada was a Piece-of-shit copy of a Fiat 128, built in the Gulag, and all that.

    The Soviet News Agency Tass reported on the race.

    "The Lada finished Second"
    "The Corvette finished next to last. . ."

    hmmmmmm



  • (cs)
    Alex Papadimoulis:
    string docOwnerUsername = "null";


    Comedy gold!
  • (cs) in reply to David
    Anonymous:

    Alex Papadimoulis:

    someString = anotherString.ToString().ToString();

    This may be referred to as the Daffy Duck as Robin Hood method of programming:

    someString = robinHood.ToTrip().ToTrip().ToTrip().ToTrip()...;

    friarTuck.ROFL = true;

    Now that's funny! [:D] Reading that brought back some good memories...

  • (cs) in reply to barney
    Anonymous:

    Clearly this consultant didn't much like Java's String class--that must be why he's created is own string class. One shudders to think how string.toString() is implemented.

    IMHO, a String class having a .toString method actually does make sense.

    Think "late binding", and serialization.

     

  • anonymous (unregistered) in reply to pmagill

    my $someString = echo $anotherString;

  • (cs) in reply to Stoffel

    Seriously, I can't understand why everyone still seem to be so suprised over things like this. We already know that for every good programmer there are, say, 10 medicore and 100 asshat ones. We also know that managerial knowledge of code and coders is null (pun intended), wherefore they will use other standards for assessing "quality". In short, most code will be bad code. SNAFU rules unimpeded. FUBAR is and will be. Real Programmers will be increasingly disillusioned. News at 11.

  • Anon (unregistered) in reply to ParkinT

    OMG! I wonder how bad the highest paid consultants WTF's were! I mean he must have been worse!

  • Anonymous (unregistered) in reply to JoeyLemur
    I have to wonder why core Java just doesn't define String.toString to throw a YouDumbassException...

    Because sometimes Strings get passed around as Objects, and you want to be able to convert Objects to Strings?

  • (cs) in reply to Strydyr

    Actually, while this is pretty dumb, it's not completely dumb.

    We're told that he does String foo = bar. Guess what: this passes the reference, at least in Java. Incidentally, this is also the same as String foo = bar.toString() (as toString simply returns a reference to bar). This are NOT the same as String foo = bar.clone(); which creates a COPY of bar and passes the reference of the copy to foo.

    However, since there doesn't appear to be a String.Copy method, I have the sinking suspicion that he created a string class, which extends String, just for the sake of lazy typing. I wouldn't be surprised if the Copy method was "return (String)(this.clone());". Actually, strike that. I would be, since that would at least be halfway intelligent. I get the feeling that he's actually creating a new string, then appending each character to it (in the processes, creating a new string each time).

    BRB, finding a corner to cry in.

  • (cs) in reply to Volmarias

    his are NOT the same as String foo = bar.clone(); which creates a COPY of bar and passes the reference of the copy to foo.

    Typo; meant to write "(String)bar.clone()" instead of "bar.clone()", which would probably give a casting exception as clone returns an Object.

  • (cs) in reply to Volmarias

    God fucking damnit. New forum software w/ preview that works, plz...

  • (cs) in reply to ParkinT

    ParkinT:


    As I have always said, "Those who can, do.
    Those who can't, sell
    and those who can't sell are CONSULTANTS"

    {Just a joke, no flames please}

    Flames, hell, I'm putting that on a T-shirt

  • (cs)
    Alex Papadimoulis:
    someString = anotherString.ToString().ToString();


    Priceless

  • (cs) in reply to Mike J
    Anonymous:
    Actually to do this correctly, he should've had an isString function to make sure it's a string variable before calling the toString method.

    The isString() function would of course return either True, False or FileNotFound.



    Don't forget "null".

  • (cs) in reply to Rank Amateur

    <font style="font-family: verdana;" size="1">

    Rank Amateur:
    Alex Papadimoulis:
    </font>

    <font size="1">Standard:
    Initialize all variables at the point of declaration; null is prefered for reference types and strings while min- and max- values are preferred for value types, e.g. DateTime.MinValue.</font>

    <font size="1">

    </font>

    <font size="1">string dateStart = "DateTime.MinValue";</font>

    <font size="1">No, it has to be this way. I tried </font><font size="1">DateTime dateStart</font><font size="1">, but it wouldn't compile.</font>

    <font style="font-family: verdana;" size="1">


    <font size="2">That's because you forgot to include

        boolean pleaseCompile = true;

    Duh.
    </font>
    </font>

Leave a comment on “The Replacement”

Log In or post as a guest

Replying to comment #:

« Return to Article