Comment On The Replacement

A few months back, Joachim Roppert had to go to the hospital for a few weeks. Unfortunately, he was in the middle of a "mission-critical" development project, so his company decided to bring on a short-term consultant to keep the project alive. They were a bit concerned about the quality of work the consultant might provide and figured that the best consultant probably charged the second highest rate. So, they hired him. [expand full text]
« PrevPage 1 | Page 2 | Page 3 | Page 4Next »

Re: The Replacement

2006-02-21 14:44 • by 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.

Re: The Replacement

2006-02-21 14:46 • by Rain dog
Dude where can I hire this guy?

Re: The Replacement

2006-02-21 14:46 • by ChiefCrazyTalk

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?   


 

Re: The Replacement

2006-02-21 14:49 • by ChiefCrazyTalk
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?

Re: The Replacement

2006-02-21 14:49 • by connected
61031 in reply to 61027

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.

Re: The Replacement

2006-02-21 14:50 • by ParkinT
61032 in reply to 61027

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


 


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

Re: The Replacement

2006-02-21 14:50 • by Randolpho
61033 in reply to 61027
I want to take that programmer into a small room and do unspeakable things to him. Seriously...... [^o)] WTF?

Re: The Replacement

2006-02-21 14:51 • by brazzy
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.



Re: The Replacement

2006-02-21 14:52 • by ParkinT
61035 in reply to 61027

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}

Re: The Replacement

2006-02-21 14:53 • by Randolpho
61036 in reply to 61030
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();


Re: The Replacement

2006-02-21 14:54 • by tafs7

He forgot to use the following assignment:


StringBuilder yetAnotherString = new StringBuilder(anotherString);
someString = yetAnotherString.ToString();


ouch....

Re: The Replacement

2006-02-21 14:55 • by cconroy
61038 in reply to 61035
I bet his management will think twice the next time an employee says they "have" to go to the hospital.



Re: The Replacement

2006-02-21 14:58 • by elwood_j_blues
61039 in reply to 61036
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 ;)

Re: The Replacement

2006-02-21 14:59 • by David

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;

Re: The Replacement

2006-02-21 15:00 • by E
61041 in reply to 61036

I think everyone needs to add another level of WTF to this:


someString = new String(((string)string.Copy(anotherString.ToString().Clone().ToString()).ToString()).ToString().ToCharArray());


Enjoy :)

Re: The Replacement

2006-02-21 15:04 • by Replica
WTF!!!!

Never thought my code would end up here...

Re: The Replacement

2006-02-21 15:11 • by Jason
This is just poor-man's obfuscation...

Re: The Replacement

2006-02-21 15:12 • by GoatCheez
61044 in reply to 61036
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. ;-)

Re: The Replacement

2006-02-21 15:12 • by Mike J
61045 in reply to 61042
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.

Re: The Replacement

2006-02-21 15:13 • by Disgruntled DBA
ToString needs to be overloaded for this to make sense:

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

Re: The Replacement

2006-02-21 15:15 • by JoeyLemur
I have to wonder why core Java just doesn't define String.toString to throw a YouDumbassException...

Re: The Replacement

2006-02-21 15:15 • by Hitsuji
61048 in reply to 61042

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


 


;)

Re: The Replacement

2006-02-21 15:24 • by sammybaby
61049 in reply to 61040

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

Re: The Replacement

2006-02-21 15:24 • by Rank Amateur
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.



string dateStart = "DateTime.MinValue";


No, it has to be this way. I tried DateTime dateStart, but it wouldn't compile.


--Rank

Re: The Replacement

2006-02-21 15:29 • by Randolpho
61051 in reply to 61040
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. :)

Re: The Replacement

2006-02-21 15:30 • by Randolpho
61052 in reply to 61049
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>

Re: The Replacement

2006-02-21 15:33 • by barney

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.


Re: The Replacement

2006-02-21 15:35 • by OneFactor
61054 in reply to 61049
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.

Re: The Replacement

2006-02-21 15:36 • by pmagill
61055 in reply to 61053
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.

Re: The Replacement

2006-02-21 15:37 • by WTFer
61056 in reply to 61041
Anonymous:

I think everyone needs to add another level of WTF to this:


someString = new String(((string)string.Copy(anotherString.ToString().Clone().ToString()).ToString()).ToString().ToCharArray());


Enjoy :)


I'll give it a shot

someString = "" + Convert.ToString(new String(((string)string.Copy(anotherString.ToString().Clone().ToString()).ToString()).ToString().ToCharArray()));


Re: The Replacement

2006-02-21 15:37 • by Anonymous too
61057 in reply to 61029
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.

Re: The Replacement

2006-02-21 15:38 • by Oliver Klozoff

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)

Re: The Replacement

2006-02-21 15:38 • by Djinn
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

Re: The Replacement

2006-02-21 15:39 • by Willie
61060 in reply to 61053
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.

Re: The Replacement

2006-02-21 15:40 • by pmagill
61061 in reply to 61056
WTFer:
Anonymous:

I think everyone needs to add another level of WTF to this:


someString = new String(((string)string.Copy(anotherString.ToString().Clone().ToString()).ToString()).ToString().ToCharArray());


Enjoy :)


I'll give it a shot

someString = "" + Convert.ToString(new String(((string)string.Copy(anotherString.ToString().Clone().ToString()).ToString()).ToString().ToCharArray()));




My addtion:

someString = Convert.ToString("").ToString + Convert.ToString(new String(((string)string.Copy(anotherString.ToString().Clone().ToString()).ToString()).ToString().ToCharArray()));


Re: The Replacement

2006-02-21 15:42 • by Not Second Best
61062 in reply to 61032
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



Re: The Replacement

2006-02-21 15:43 • by Stoffel
Alex Papadimoulis:
string docOwnerUsername = "null";


Comedy gold!

Re: The Replacement

2006-02-21 15:44 • by R.Flowers
61064 in reply to 61040
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...

Re: The Replacement

2006-02-21 15:44 • by Strydyr
61065 in reply to 61053
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.


 

Re: The Replacement

2006-02-21 15:48 • by anonymous
61066 in reply to 61061
my $someString = `echo $anotherString`;

So what else is new?

2006-02-21 15:50 • by Mikademus
61067 in reply to 61063
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.

Re: The Replacement

2006-02-21 15:52 • by Anon
61068 in reply to 61032
OMG! I wonder how bad the highest paid consultants WTF's were! I mean he must have been worse!

Re: The Replacement

2006-02-21 15:53 • by Anonymous
61069 in reply to 61047


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?

Re: The Replacement

2006-02-21 15:54 • by Volmarias
61070 in reply to 61065
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.

Re: The Replacement

2006-02-21 15:56 • by Volmarias
61071 in reply to 61070
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.

Re: The Replacement

2006-02-21 15:57 • by Volmarias
61072 in reply to 61071
God fucking damnit. New forum software w/ preview that works, plz...

Re: The Replacement

2006-02-21 16:04 • by BtM
61073 in reply to 61035

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

Re: The Replacement

2006-02-21 16:05 • by ZeoS
Alex Papadimoulis:
someString = anotherString.ToString().ToString();


Priceless

Re: The Replacement

2006-02-21 16:05 • by eddieboston
61075 in reply to 61045
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".

Re: The Replacement

2006-02-21 16:06 • by cconroy
61076 in reply to 61050
Rank Amateur:
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.



string dateStart = "DateTime.MinValue";


No, it has to be this way. I tried DateTime dateStart, but it wouldn't compile.





That's because you forgot to include



    boolean pleaseCompile = true;



Duh.

« PrevPage 1 | Page 2 | Page 3 | Page 4Next »

Add Comment