Comment On The Utility Package

"It took months of low quality, late delivered code," Scott C writes, "but a certain coder on our team was finally let go." [expand full text]
« PrevPage 1 | Page 2 | Page 3Next »

Re: The Utility Package

2009-11-02 09:04 • by anonym (unregistered)
if isIntentegerInRange(1, 1, 1)
print frist

Re: The Utility Package

2009-11-02 09:04 • by GiG (unregistered)
isNull("WTF?") == isNotNull("WTF?");

Re: The Utility Package

2009-11-02 09:04 • by Oxin (unregistered)
I never thought I'd see a function that implies a boolean return value simply return the hex code for red as a string. Mind boggling.

Re: The Utility Package

2009-11-02 09:04 • by SR (unregistered)
public static boolean isCommentnteFrist(String commentnte) {

// probably not by now
}

Re: The Utility Package

2009-11-02 09:12 • by sjakie (unregistered)
289536 in reply to 289535
SR:
public static boolean isCommentnteFrist(String commentnte) {

// probably not by now
}


You forgot the result:

public static boolean isCommentnteFrist(String commentnte) {

// probably not by now
throw new RetardedDeveloperException(false);
}

Re: The Utility Package

2009-11-02 09:16 • by vt_mruhlin
An intenteger is for when you really mean that one number.

Re: The Utility Package

2009-11-02 09:19 • by TheRider
289538 in reply to 289536
sjakie:


You forgot the result:

public static boolean isCommentnteFrist(String commentnte) {

// probably not by now
throw new RetardedDeveloperException(false);
}
I particularly like the boolean parameter and its implications. Does "false" mean the developer happens not to be retarded? Wouldn't that exception then be silently swallowed? And what is the correct exception handling policy for this kind of exception, particularly when issued with a true parameter? Delete the developer's hard disk?

Re: The Utility Package

2009-11-02 09:19 • by levbor
I use intentegers all the time intententionally.

Re: The Utility Package

2009-11-02 09:23 • by Anonymous (unregistered)
This sort of code is like a recurring nightmare. I can't even count the number of times I've seen this crap before and it's a foregone conclusion that I'll see it again. Note to HR: stop hiring these people FFS! You are the reason we must suffer these fools!

Re: The Utility Package

2009-11-02 09:25 • by eViLegion (unregistered)
289541 in reply to 289534
Oxin:
I never thought I'd see a function that implies a boolean return value simply return the hex code for red as a string. Mind boggling.


Yeah, I choked when I saw that.

Re: The Utility Package

2009-11-02 09:26 • by sjakie (unregistered)
289542 in reply to 289538
TheRider:
sjakie:


You forgot the result:

public static boolean isCommentnteFrist(String commentnte) {

// probably not by now
throw new RetardedDeveloperException(false);
}
I particularly like the boolean parameter and its implications. Does "false" mean the developer happens not to be retarded? Wouldn't that exception then be silently swallowed? And what is the correct exception handling policy for this kind of exception, particularly when issued with a true parameter? Delete the developer's hard disk?


I see your confusion, but apparently you haven't worked with nte methods before, or with the Integernte framework. Any experienced retarded developer knows that, right!

Just for clarity:

public static boolean isCommentnteFrist(String commentnte) {

// probably not by now
throw new RetardedDeveloperException(false);
}

public static boolean isCommentFrist(String commentnte) {

// probably not by now
throw new RetardedDeveloperException(true);
}

Obviously any RetardedDeveloperException ultimately causes one of your CPU cores to be used for melting marshmallows by chipmunks on LSD.

Re: The Utility Package

2009-11-02 09:26 • by spxza
It's not an additional "nte" it's an additional "ent", made to work on trees.

Re: The Utility Package

2009-11-02 09:26 • by Coyne
289544 in reply to 289538
TheRider:
sjakie:


You forgot the result:

public static boolean isCommentnteFrist(String commentnte) {

// probably not by now
throw new RetardedDeveloperException(false);
}
I particularly like the boolean parameter and its implications. Does "false" mean the developer happens not to be retarded? Wouldn't that exception then be silently swallowed? And what is the correct exception handling policy for this kind of exception, particularly when issued with a true parameter? Delete the developer's hard disk?


Correct handling policy pattern for RetardedDeveloperException:


try {
lameDeveloperCode();
} catch (RetardedDeveloperException e) {
if (e.isRetarded() {
goodDeveloperCode();
} else {
throw new RetardedDeveloperFib(e);
}
}

Re: The Utility Package

2009-11-02 09:28 • by grzlbrmft (unregistered)
Oh cool, I just added this to my code repository.

... the RetardedDeveloperException.

Re: The Utility Package

2009-11-02 09:35 • by stringyIntegers (unregistered)
289546 in reply to 289532
anonym:
if isIntentegerInRange("one", 1, 1)
print frist


anonym:
if isIntentegerInRange("0001", 1, 1)
print frist



anonym:
if isIntentegerInRange("1", 1, 1)
print frist


Aren't these more likely? It checks a string against the range.

Re: The Utility Package

2009-11-02 09:43 • by the real wtf fool
First code snippet for a long time where every function along the way all I could think to myself was

Re: The Utility Package

2009-11-02 09:43 • by SR (unregistered)
289548 in reply to 289545
grzlbrmft:
Oh cool, I just added this to my code repository.

... the RetardedDeveloperException.


Good man. Just make sure it handles FILE_NOT_FOUND correctly.

Re: The Utility Package

2009-11-02 09:45 • by Sean (unregistered)
289549 in reply to 289536
sjakie:
SR:
public static boolean isCommentnteFrist(String commentnte) {

// probably not by now
}

You forgot the result:

public static boolean isCommentnteFrist(String commentnte) {
// probably not by now
throw new RetardedDeveloperException(false);
}

In keeping with the theme, shouldn't that be...

public static object isCommentnteFrist(String commentnte) {
// probably not by now
return new RetardedDeveloperException(false);
}

Re: The Utility Package

2009-11-02 09:52 • by toth
I don't see the WTF. As far as I can see, this developer is ahead of all of us. Who among us could write a method that checks not the integer that we pass in, but the integer that we intended to pass in? This is an ESP library. I'm in awe.

Re: The Utility Package

2009-11-02 09:52 • by sjakie (unregistered)
289551 in reply to 289543
spxza:
It's not an additional "nte" it's an additional "ent", made to work on trees.


Oh sorry, must have misread that.

Never liked the ent framework, reminds me too much of Hobbit++ not to mention ring buffers and ELF-Eventhandling.

Re: The Utility Package

2009-11-02 09:52 • by Sanity (unregistered)
And yet... isNull(x) == isNotNull(x). That can't be good.

Re: The Utility Package

2009-11-02 09:54 • by Steve the Cynic (unregistered)
289553 in reply to 289536
sjakie:
SR:
public static boolean isCommentnteFrist(String commentnte) {

// probably not by now
}


You forgot the result:

public static boolean isCommentnteFrist(String commentnte) {

// probably not by now
throw new RetardedDeveloperException(false);
}


In these politically correct days, of course, we must:


throw new DifferentlyEnabledDeveloperException(false);


And, of course, retarded developers aren't new:


function defenestrate()
{
throw old RetardedDeveloper(out_the_window);
}


abbas: Mediaeval Latin abbot, Arabic name, etc.

[2]

Re: The Utility Package

2009-11-02 09:56 • by You didn't see me right (unregistered)
Thank you dailywtf for confirming once again that whatever happens, I'll never write code as bad as an isEmpty function that returns either an empty string or the hex code for red. Thank you for reaffirming my belief in myself.

Re: The Utility Package

2009-11-02 10:00 • by monkeyPushButton (unregistered)
289555 in reply to 289549
Sean:
sjakie:
SR:
public static boolean isCommentnteFrist(String commentnte) {

// probably not by now
}
You forgot the result:

public static boolean isCommentnteFrist(String commentnte) {
// probably not by now
throw new RetardedDeveloperException(false);
}
In keeping with the theme, shouldn't that be...
public static object isCommentnteFrist(String commentnte) { 

// probably not by now
return new RetardedDeveloperException(false);
}
I'd just like to return retarded developers. Anyone have an address on that?

Re: The Utility Package

2009-11-02 10:03 • by KimmoS (unregistered)
289556 in reply to 289552
The Tao master once explained the nature of x to a young student.

"Is x Null?" asked the Student.

"Is x not Null?" asked the Master in turn.

The Student was enlightened.

Re: The Utility Package

2009-11-02 10:06 • by snoofle
289557 in reply to 289534
Oxin:
I never thought I'd see a function that implies a boolean return value simply return the hex code for red as a string. Mind boggling.
As opposed to FileNotFound? You must be new! Welcome!

Re: The Utility Package

2009-11-02 10:07 • by amischiefr
289558 in reply to 289532
anonym:
if isIntentegerInRange(1, 1, 1)
print frist

You sir fail just as bad as the guy in the article. The first element is a string...

isIntegerInRante("1",1,1) would at least compile.

Re: The Utility Package

2009-11-02 10:08 • by Sean (unregistered)
289559 in reply to 289555
monkeyPushButton:
Sean:
sjakie:
SR:
public static boolean isCommentnteFrist(String commentnte) {

// probably not by now
}
You forgot the result:

public static boolean isCommentnteFrist(String commentnte) {
// probably not by now
throw new RetardedDeveloperException(false);
}
In keeping with the theme, shouldn't that be...
public static object isCommentnteFrist(String commentnte) { 

// probably not by now
return new RetardedDeveloperException(false);
}
I'd just like to return retarded developers. Anyone have an address on that?

RTFA!!! It is clearly 0xFF0000.

Re: The Utility Package

2009-11-02 10:11 • by dkf
289560 in reply to 289556
KimmoS:
The Tao master once explained the nature of x to a young student.

"Is x Null?" asked the Student.

"Is x not Null?" asked the Master in turn.

The Student was enlightened.
Mu!

Null is the value that is not a value. To ask what it's value nature is is to deny its Null nature, and yet it is a value nonetheless. Compare with NaN in IEEE floating point.

Re: The Utility Package

2009-11-02 10:13 • by Chi Happens (unregistered)
I'm implementing this in my code, I think it's grand.

public bool IsTrue(boolean TrueOrFalse)
{
bool Error = false;
if(TrueOrFalse == true)
{
Error = false;
}
return Error;
}

but it didn't seem to work right, so I made another
public bool IsTrue(boolean TrueOrFalse)
{
bool Error = false;
if(TrueOrFalse.ToString().ToUpper() == "TRUE")
{
Error = true;
}
return Error;
}

this one seems to work better.

;)

Re: The Utility Package

2009-11-02 10:14 • by Kiss me I'm Polish
I read "public sad String isNull()"
Poor, public, sad, static function :(

Re: The Utility Package

2009-11-02 10:16 • by sjakie (unregistered)
289563 in reply to 289559
Sean:

RTFA!!! It is clearly 0xFF0000.


Clearly? You are so terribly mistaken, retarded developers use Hexentdecimal addressing. The first occurrence of a retarded developer might more likely be at 0xWTF001FRIST42. Although that one might be on a crack pipe...

Re: The Utility Package

2009-11-02 10:18 • by Anonymous Coward (unregistered)
289564 in reply to 289552
Sanity:
And yet... isNull(x) == isNotNull(x). That can't be good.
That ban be good:

if( isNull(x) == isNotNull(x) ) print("this is a quantum computer");

Re: The Utility Package

2009-11-02 10:19 • by the real wtf fool
289565 in reply to 289558
amischiefr:
anonym:
if isIntentegerInRange(1, 1, 1)
print frist

You sir fail just as bad as the guy in the article. The first element is a string...

isIntegerInRante("1",1,1) would at least compile.


Missed that. Surely it should be isStrintegerInRange? (and isStrintentegerInRange for the differently abled)

Re: The Utility Package

2009-11-02 10:22 • by n9ds
Clearly it's supposed to be "in-ten-tegers" because you know some number systems go up to 11.

Re: The Utility Package

2009-11-02 10:24 • by Peanut Gallery (unregistered)
289568 in reply to 289541
eViLegion:
Oxin:
I never thought I'd see a function that implies a boolean return value simply return the hex code for red as a string. Mind boggling.


Yeah, I choked when I saw that.


Maybe they forgot to mention the programmer was only 9 years old and got his job the old fashion way (nepotism).

Re: The Utility Package

2009-11-02 10:28 • by Anonymous (unregistered)
289569 in reply to 289558
amischiefr:
anonym:
if isIntentegerInRange(1, 1, 1)
print frist

You sir fail just as bad as the guy in the article. The first element is a string...

isIntegerInRante("1",1,1) would at least compile.


=D That's funny... And kind of ironic

Re: The Utility Package

2009-11-02 10:35 • by Anonymous (unregistered)
You hurt codes feelings, code is sad =(

Re: The Utility Package

2009-11-02 10:37 • by BSDGuy (unregistered)
289571 in reply to 289545
Same here, I wonder if FreeBSD dev is willing to mentor me in implementing said exception in C...

Re: The Utility Package

2009-11-02 10:39 • by BSDGuy (unregistered)
289572 in reply to 289571
on second thought, that code hurts my head way too much and I need coffee. WTG retard coder (Monkey at keyboard?)!

Re: The Utility Package

2009-11-02 10:40 • by MrsPost
289573 in reply to 289540
Anonymous:
This sort of code is like a recurring nightmare. I can't even count the number of times I've seen this crap before and it's a foregone conclusion that I'll see it again. Note to HR: stop hiring these people FFS! You are the reason we must suffer these fools!

Note to hiring managers: stop letting HR screen your candidates FFS! You are the reason we must suffer these fools!

Re: The Utility Package

2009-11-02 10:45 • by Good Intenteger (unregistered)
289574 in reply to 289532
anonym:
if isIntentegerInRange(1, 1, 1)
print frist


I prefer this:

if isIntentegerInRange(1.ToString(), 1, 1){}

Re: The Utility Package

2009-11-02 10:47 • by campkev
if isInTENTegerInRange(1, 1, 1)
//To Do: Come up with witty comment about Irish Girl

Re: The Utility Package

2009-11-02 10:49 • by akatherder
I saw this code the other day from a developer who thought he was clever for using ternary syntax:

$myBooleanValue = ($param==1)?"true":"false";

The best part? He justified it because the code someone else had written was expecting a string value of "true" or "false" for $myBooleanValue.

Re: The Utility Package

2009-11-02 10:51 • by BD (unregistered)
This is one of the better ones I've seen lately.

A seemingly-boolean function that returns the hex code for red?
A function with a parameter named "integer" that is actually a String?

Re: The Utility Package

2009-11-02 10:56 • by Drew (unregistered)
289578 in reply to 289574
This isn't enterprisey enough.

IntegerRangeFinderFactory f = new IntegerRangeFinderFactory("pie", 27, new Thing());
IntegerRangeFinder rf = f.getIntegerRangeFinder("left", "KHAN!!!");
if(rf.createIntegerRangeFinderFinder().finder().cleft().isIntentegerInRange(IntegerStringMakerDoohickeyMaBob.parseTheFrackinIntegerIntoaString(1), 1, 1) {
try {
throw moreCode();
} catch(NotEnoughCodeException e) {
throw new RetardedDeveloperException(e, "Lies!");
} finally {
stillNotEnoughCode(moar_code_plx, DailyWTF.WOODEN_TABLE);
}
}

Re: The Utility Package

2009-11-02 11:02 • by jspenguin
289579 in reply to 289571
BSDGuy:
Same here, I wonder if FreeBSD dev is willing to mentor me in implementing said exception in C...


longjmp(retarded_developer_buf, 1);

Re: The Utility Package

2009-11-02 11:05 • by aihtdikh
I think this is my favourite wtfery ever.
Every little wtf is like a tiny hidden gem - I have to go over each method again and again to find all the things that my brain refused to acknowledge last time, they're just so gorgeously horrific.
/me reads it again...

Addendum (2009-11-02 11:11):
I love that the isEmpty method returns a string, and you have to check whether it's returned the empty string, to find out if your first string was empty.

Re: The Utility Package

2009-11-02 11:09 • by Bobble (unregistered)
That looks like hangover code.

Re: The Utility Package

2009-11-02 11:11 • by NightDweller
Whenever i start a new job i am faced with a huge collection of wtfs faulty design and crappy code.

Fortunately for me, i think amongst the wost thing i saw was:
String doSomeAction(SomeClassType someObject){
try{
return SomeObject.DoSomeAction();
}
catch (NullPointerException e){
return null;
}

}

bad, i know , wtf - i know..but its no where near as bad as
String green="#00FF00";
if (isNull(green))
{
green = isEmpty("","event");
//green might have been set to red, but fortunately isNull will return false...
}

green = null;

if (isNotNull(green))
{
green = isEmpty(green,"notNullEvent");
//at this point we'd have a null pointer exception...
//good thing we made sure our string is not null.
}



« PrevPage 1 | Page 2 | Page 3Next »

Add Comment