- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
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.
Admin
Dude where can I hire this guy?
Admin
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?
Admin
Oh, and regarding this... perhaps the second ToString() is in case the first one doesn't work? Maybe triple redundancy is needed here?
Admin
Agreed.
Admin
"...figured that the best consultant probably charged the second highest rate..."
Well, obviously, you get what you pay for (or not?!)
Admin
I want to take that programmer into a small room and do unspeakable things to him. Seriously...... [^o)] WTF?
Admin
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.
Admin
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}
Admin
The real WTF is why he didn't do this:
Admin
<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>
Admin
<font size="2">I bet his management will think twice the next time an employee says they "have" to go to the hospital.
</font>
Admin
Dude, that just won't work. You are missing one toString ;)
Admin
This may be referred to as the Daffy Duck as Robin Hood method of programming:
someString = robinHood.ToTrip().ToTrip().ToTrip().ToTrip()...;
friarTuck.ROFL = true;
Admin
<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>Admin
WTF!!!!
Never thought my code would end up here...
Admin
This is just poor-man's obfuscation...
Admin
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. ;-)
Admin
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.
Admin
ToString needs to be overloaded for this to make sense:
Admin
I have to wonder why core Java just doesn't define String.toString to throw a YouDumbassException...
Admin
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????
;)
Admin
That's why my new secure socket factory module has code that reads like this:
Admin
<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
Admin
You, sir, are my personal ninja for the day. :)
Admin
you left out thrust and spin.
Dodge! Parry! Thrust! Spin! <sproing>
Admin
Clearly this consultant didn't much like Java's
String
class--that must be why he's created is ownstring
class. One shudders to think howstring.toString()
is implemented.Admin
The best part is how the SproingError still gets thrown even when operating in testing/debug mode with a mock threat.
Admin
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.
Admin
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>
Admin
Too much.
Admin
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)
Admin
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
Admin
I don't think this is Java.
Admin
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>
Admin
"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
Admin
Comedy gold!
Admin
Now that's funny! [:D] Reading that brought back some good memories...
Admin
IMHO, a String class having a .toString method actually does make sense.
Think "late binding", and serialization.
Admin
my $someString =
echo $anotherString
;Admin
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.
Admin
OMG! I wonder how bad the highest paid consultants WTF's were! I mean he must have been worse!
Admin
Because sometimes Strings get passed around as Objects, and you want to be able to convert Objects to Strings?
Admin
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.
Admin
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.
Admin
God fucking damnit. New forum software w/ preview that works, plz...
Admin
Flames, hell, I'm putting that on a T-shirt
Admin
Priceless
Admin
Don't forget "null".
Admin
<font style="font-family: verdana;" size="1">
<font size="2">That's because you forgot to include
boolean pleaseCompile = true;
Duh.
</font></font>