• Skawt (unregistered) in reply to cynical cynic
cynical cynic:
At last, the explanation to all the Bert Glanstrom comments!
```public static boolean isFunnyOrInsightful(comment c)
{
return !isFunny(c) && !isInsightful(c);
}```
Shouldn't the function be named isFunnyAndInsightful?
• (cs) in reply to Bob

[quote author="Bob"] Welcome to the 21st century. News Flash: Judaism is no longer funny.[/quote] Ya see, Hebrew does not meet Judaism, you antisemitic schmuck.

• Ramesses II (unregistered) in reply to Hitler
Hitler:
Bob:
דותן כהן:
Larry:
the article:
```if (_tblItem.getTable().getModel() != null
&& _tblItem.getTable() != null
&& _tblItem != null)
```
TRWTF is languages that read left-to-right.

סליחה?‏

Welcome to the 21st century. News Flash: Judaism is no longer funny.
Really? Because it was hilarious in the 20th century!

Oh, that old joke?

• (cs) in reply to Anonymous
Anonymous:
Hey there Ancient Mathematician, you might be just the person I need to help me with an ancient Roman math problem. The following sum is written in Roman numerals. Can you solve it and provide your answer also in Roman numerals?

(IV + I) - V = ?

(IV + I) - V = N, FTW.

• (cs) in reply to shimon
shimon:
Bob:
Welcome to the 21st century. News Flash: Judaism is no longer funny.
Ya see, Hebrew does not equal Judaism, you antisemitic schmuck.
Just a fix.
• Herby (unregistered)

When one considers

if (1 == 0) printf ("fail")

one must consider that in ancient times (the 60's come to mind), it WAS possible to change the values of constants in Fortran. Unusual? Yes! but it could be done. In Fortran ALL arguments to subroutines are passed by REFERENCE, including constants. So, when you passed a constant, the subroutine COULD change it. Not very advisable, but it could be done.

Some compilers could tell the difference between passed "read only" arguments, and others, but these were not common (I knew of one).

In additon, a good test of a Fortran compiler was to have the following statement:

IF (1 .EQ. 0) END

Many compilers had a fit on this statement!

So, yes, alternate universes DO exist, Strange but true!

• Bob (unregistered) in reply to shimon
shimon:
shimon:
Bob:
Welcome to the 21st century. News Flash: Judaism is no longer funny.
Ya see, Hebrew does not equal Judaism, you antisemitic schmuck.
Just a fix.
Really? WTF else speaks Hebrew? God?
• (cs) in reply to One
One:
Do we get to have a discussion about whether or not 1 is a prime number?

I would rather a discussion about whether .999... == 1

• Matt (unregistered) in reply to Anonymous
Anonymous:
(IV + I) - V = ?

(IV + I) - V = LIMA_NON_REPERIO

• (cs) in reply to Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:
Uh...:
public static int RANDOM_PRIME_NUMBER = 215
Ok, I see how this might be random when he entered it, but I do not see how it is prime.
Of course it's prime. Just not in base 10, or anything else you might reasonably expect. (Try 6, or 36).

hex comes close... very close...

Here are the bases below 250 in which 215 is prime.

83 = 215 base 6 1181 = 215 base 24 1601 = 215 base 28 2351 = 215 base 34 2633 = 215 base 36 4283 = 215 base 46 6791 = 215 base 58 8783 = 215 base 66 11633 = 215 base 76 12251 = 215 base 78 15581 = 215 base 88 26111 = 215 base 114 30881 = 215 base 124 31883 = 215 base 126 38231 = 215 base 138 41621 = 215 base 144 43961 = 215 base 148 47591 = 215 base 154 67901 = 215 base 184 69383 = 215 base 186 91811 = 215 base 214 109751 = 215 base 234 119321 = 215 base 244 121283 = 215 base 246

• (cs)
```/* This program will only run if the laws of mathematics hold */
if(is_prime(1))
{
fprintf("Oh crap - we are not running in the correct Universe\n");
exit(215);
}```
• bl@h (unregistered) in reply to Anonymous
<script type="text/javascript">document.write('
Anonymous:
I like the way there appears to be a dedicated error code for "not running in the correct Universe". I'd have gone for -42 instead of 17 but well done anyway. Wait, can you pass negative exit codes? I suppose it doesn't matter, if that error code ever gets returned we have to assume that the apocalypse is upon us.
+1 for the win')</script>

<noscript>

Anonymous:
I like the way there appears to be a dedicated error code for "not running in the correct Universe". I'd have gone for -42 instead of 17 but well done anyway. Wait, can you pass negative exit codes? I suppose it doesn't matter, if that error code ever gets returned we have to assume that the apocalypse is upon us.
+1 for the win</noscript>

• Hex (unregistered)
/* This program will only run if the laws of mathematics hold */ if(1 == 0) { fprintf("Oh crap - we are not running in the correct Universe\n"); exit(17); }

+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++

• DaveK (unregistered) in reply to Anonymous
Anonymous:
Ancient Mathematician:
WthyrBendragon:
One:
Do we get to have a discussion about whether or not 1 is a prime number?

Well, it is only integer factorable to 1 and itself so, yes, 1 is prime.

However, random it is not.

Well, if you were old enough, you'd know that 1 is not even a number, so it can't be a prime. And if you're young enough, you should know that 1 is a unit, so it can't be a prime. Only if you're stuck some time between -200 and 1900 is 1 a prime.
Hey there Ancient Mathematician, you might be just the person I need to help me with an ancient Roman math problem. The following sum is written in Roman numerals. Can you solve it and provide your answer also in Roman numerals?

(IV + I) - V = ?

(Holy cow, I got lucky there!)

• Anonymous (unregistered) in reply to hatterson
hatterson:
One:
Do we get to have a discussion about whether or not 1 is a prime number?

I would rather a discussion about whether .999... == 1

Well, technically there is nothing to discuss because they most certainly are equal and it is a simple proof to confirm this beyond doubt. But damn, what a mindfuck eh? I remember when I first had to tackle this concept back in maths class, many years ago. Took a long time to get my head around. But once it clicked it was like a lightbulb going off in my head, I literally blurted out "fuck me!" in the middle of my maths class, directly to the lecturer. He was a bit of an old bastard and I thought he was going to go ballistic, but he just looked at me with a knowing smile and gently nodded. I had joined the club.

• undefined (unregistered) in reply to Herby
Herby:
one must consider that in ancient times (the 60's come to mind), it WAS possible to change the values of constants in Fortran.

JavaScript was funnier, it was possible to do false=true in it. It does not work in modern browsers because ECMAScript 4 or 5 changed this.

• swedish tard (unregistered) in reply to undefined
undefined:
Herby:
one must consider that in ancient times (the 60's come to mind), it WAS possible to change the values of constants in Fortran.

JavaScript was funnier, it was possible to do false=true in it. It does not work in modern browsers because ECMAScript 4 or 5 changed this.

#undef false #define false true

if(true == true) asplode;

• swedish tard (unregistered) in reply to swedish tard
swedish tard:
undefined:
Herby:
one must consider that in ancient times (the 60's come to mind), it WAS possible to change the values of constants in Fortran.

JavaScript was funnier, it was possible to do false=true in it. It does not work in modern browsers because ECMAScript 4 or 5 changed this.

#undef false #define false true

if(true == true) asplode;

Well. Doh.

if(true == false) obviously...

• (cs) in reply to Bob
Bob:
shimon:
shimon:
Bob:
Welcome to the 21st century. News Flash: Judaism is no longer funny.
Ya see, Hebrew does not equal Judaism, you antisemitic schmuck.
Just a fix.
Really? WTF else speaks Hebrew? God?
Jewish atheists, duh.
• An Non (unregistered) in reply to Mark

Just to point out - The proxy is there to allow visibility of the MBean in different classloaders (not simply 'JVM' as I brainfart-edly said in my first post) and even nodes in a clustered environment, i.e. the very reason you expose something as an MBean. The underlying problem though is that if the functionality should be accessible by local components the MBean interface should not be the interface being used to access it (Rather the MBean should be exposing some local delegates behaviour). So its not a WTF in the framework - rather, as is to oft the case, how the framework is being (mis)used.

• Jay (unregistered) in reply to Steve The Cynic
Steve The Cynic:
Ah, but you forget that the things we call Roman numerals were for writing down numbers, not for performing arithmetic. One of the principal advantages of the modern versions of Arabic numerals (the 0..9 system that we use today) is that they use the same notation for writing down numbers and for doing arithmetic.

What a curious statement. Addition and subtraction are surely easier with Roman numerals than with Arabic. For addition, just stuff the two numbers together. I + I = II. XXI + XV = XXIXV, clean it up to XXXVI. Etc. Of course you have to learn when to "carry", for example IIII + I = V. (You do know, don't you, that the romans wrote 4 as IIII? The IV convention came much later.) But that's surely easy. You just stuff the two numbers together, then look for groups of 5 I's and replace them with a V, two V's with an X, etc. So XXXXVII + III = XXXXVIIIII, first clean up gives XXXXVV, second clean up XXXXX, third clean up L. I'm sure Roman school children learned to do this at one glance, just like we can add 987+13 and say 1000 without having to do the carries one at a time.

For subtraction, just remove things in the first number that are found in the second number. Like III - I, take one of the I's away, leaving II. Again, you have to learn to "borrow", i.e. turn a V into IIIII, etc. So VI - II = IIIII I - II = IIII.

Multiplication is only slightly harder. Just multiply digit by digit, like we do in Arabic, and then clean up. XV * II = XXVV = XXX. You quickly learn that XV=L, etc, just like people with Arabic numbers learn their times tables. So XVI * V = XV + VV + IV = L XXV V = LXXX. Note that Romans only had 7 "digits" -- I, V, X, L, C, D, M -- do their times table was 7 x 7 versus our 9 x 9, 49 versus 81, significantly less to learn.

I suspect that for someone just learning arithmetic, Roman numerals were easier than Arabic.

Division ... that starts to get hard. Writing very large number ... that's hard too. I'm not suggesting we go back to Roman numerals. Just pointing out that they had their advantages.

• MG (unregistered) in reply to Skawt
Skawt:
cynical cynic:
At last, the explanation to all the Bert Glanstrom comments!
```public static boolean isFunnyOrInsightful(comment c)
{
return !isFunny(c) && !isInsightful(c);
}```
Shouldn't the function be named isFunnyAndInsightful?

Nope. Apply De Morgan's laws. (!p) && (!q) = !(p || q). Of course, isFunnyOrInsightful is not accurate either.

I am probably missing some joke.

• Jay (unregistered) in reply to DaveK
DaveK:
Bob:
shimon:
shimon:
Bob:
Welcome to the 21st century. News Flash: Judaism is no longer funny.
Ya see, Hebrew does not equal Judaism, you antisemitic schmuck.
Just a fix.
Really? WTF else speaks Hebrew? God?
Jewish atheists, duh.

And most first-century Christians.

Though technically you should probably say "Hebrew-speaking atheists". "Jewish atheists" would be something of a paradox, like "Buddhist Moslems". Not that people don't say it all the time.

• Anonymouse (unregistered)

The real WTF is this site's source around the "log code" hyper-hyper link. That, and that a function to return this is very different from simply this, in the case of function pointers one is a WTF.

• (cs) in reply to hatterson
hatterson:
One:
Do we get to have a discussion about whether or not 1 is a prime number?

I would rather a discussion about whether .999... == 1

They are equal.

If 0.999... != 1, then by the density of the real numbers, there must be some number X where 0.999... < X < 1. Suppose such a number exists. Please show me how to write this number.

(The above is not a proof, but hopefully it's convincing enough)

• Captain Obvious (unregistered)

Come on, people, everyone knows the Roman numeral for 0 is _ !

• 1st Century Christian (unregistered) in reply to Jay
Jay:
DaveK:
Bob:
shimon:
shimon:
Bob:
Welcome to the 21st century. News Flash: Judaism is no longer funny.
Ya see, Hebrew does not equal Judaism, you antisemitic schmuck.
Just a fix.
Really? WTF else speaks Hebrew? God?
Jewish atheists, duh.

And most first-century Christians.

Though technically you should probably say "Hebrew-speaking atheists". "Jewish atheists" would be something of a paradox, like "Buddhist Moslems". Not that people don't say it all the time.

Hey, guys. I just climbed into my time machine to post this here, since you needed a non-Jew that speaks Hebrew. Just FYI we Christians are Jews too.
• Gunslinger (unregistered) in reply to briggs davis
Comment held for moderation.
• Lego (unregistered) in reply to boog
boog:
Anonymous:
Hey there Ancient Mathematician, you might be just the person I need to help me with an ancient Roman math problem. The following sum is written in Roman numerals. Can you solve it and provide your answer also in Roman numerals?

(IV + I) - V = ?

Important stuff to know. Consider the following real-world application:

Rocky V + Rocky II = ?

= ZZZZzzzzzz...

• (cs) in reply to MG
MG:
Skawt:
cynical cynic:
At last, the explanation to all the Bert Glanstrom comments!
```public static boolean isFunnyOrInsightful(comment c)
{
return !isFunny(c) && !isInsightful(c);
}```
Shouldn't the function be named isFunnyAndInsightful?

Nope. Apply De Morgan's laws. (!p) && (!q) = !(p || q). Of course, isFunnyOrInsightful is not accurate either.

I am probably missing some joke.

Of course you are. Also, the name is completely accurate in describing the Bert Glanstron thought process:

• I want to post something that is either funny or insightful.

• OK, what should I write? I know, "Dear whomever, In case..."

• Let me check this using my internal isFunnyOrInsightful function.

• Yep, it passes. Therefore, it must be funny or insightful. (Did I write unit tests for that function?)

• Siskel and Ebert (unregistered) in reply to boog
boog:
Anonymous:
Hey there Ancient Mathematician, you might be just the person I need to help me with an ancient Roman math problem. The following sum is written in Roman numerals. Can you solve it and provide your answer also in Roman numerals?

(IV + I) - V = ?

Important stuff to know. Consider the following real-world application:

Rocky V + Rocky II = ?

Is that the one where an aging Tommy Gunn fights a re-animated Apollo Creed?

• (cs) in reply to Skawt
Skawt:
cynical cynic:
At last, the explanation to all the Bert Glanstrom comments!
```public static boolean isFunnyOrInsightful(comment c)
{
return !isFunny(c) && !isInsightful(c);
}```
Shouldn't the function be named isFunnyAndInsightful?

Refactored via DeMorgan

```public static boolean isNotFunnyOrInsightful(comment c)
{
return !(isFunny(c) | isInsightful(c));
}```
• hhhhhhhhhhhhhhhhhhhhhh (unregistered) in reply to Anonymous
Anonymous:
Severity One:
Unless 1 == 0, that's Java.
So I appreciate that Java supports generics now, as per my previous comment, but I have to take exception at the above statement which is patently false. The code provided is valid C# syntax, assuming one had written a custom class called HashMap<T,T>. So your assertion is false because 1 != 0 but it is still possible for that code to be C#.

</pendantry>

to be a bit more pedantified, and note i have not read further than this comment nor gone back to the original code, they would also have had to implement an abstract class/interface called Map. So it's either Java, or someone who loves Java forced to write C# at gunpoint. Or something.

• yetihehe (unregistered) in reply to sep332
sep332:
/* This program will only run if the laws of mathematics hold */ if(1 == 0) { fprintf("Oh crap - we are not running in the correct Universe\n"); exit(17); }

weird, I'm listening to a Pronobozo album right now called Zero=One=Everything !

*(0) = 1; //Invalid write exception ;)

• (cs)

FWIW, the android SDK,

`wtf(...)`

This error handler is NOT a wtf - its designed to be an application-level version of a Kernel Ooops. This includes :

things like (for instance) file pointers to real files going poof

`fclose()`
failing,
`2.5 + 2.9 < 5`
returning true (I recall on some box without floating point helpers, this happened!)

and most importantly, system functions throwing uncaught exceptions.

• ShatteredArm (unregistered) in reply to smxlong
smxlong:
hatterson:
One:
Do we get to have a discussion about whether or not 1 is a prime number?

I would rather a discussion about whether .999... == 1

They are equal.

If 0.999... != 1, then by the density of the real numbers, there must be some number X where 0.999... < X < 1. Suppose such a number exists. Please show me how to write this number.

(The above is not a proof, but hopefully it's convincing enough)

Why does there have to be a number between the two?

Maybe there is a proof, but this is how I look at it:

What is the largest number that is less than 1? I think you'd have to conclude that it is 0.999... wouldn't you?

And if a < b, then a != b.

• vo (unregistered)
```if(completed == 1)
if(stardate[1] != 2)
month = stardate[2];
else
month = stardate[2];
else
month = stardate[2];
```

You laugh, but the above code works when applied to wormholes.

• (cs)

Correct path is

developer DOT android DOT com slash reference slash android slash util slash Log DOT html

Not letting me enter any type of address...

• DELETED -

Can't use the delete button. Keeps kicking me to the home page.

"This is in our production code," notes Joseph Daigle, "I can only hope they rolled a die to ensure this was actually random."
`public static int RANDOM_PRIME_NUMBER = 215;`
Hrmm... not random, not a prime number. Looks like we got a winner here.

Not really....I mean...it's still a number...so only 2 out of 3...

• nonymus (unregistered) in reply to Mythran
Mythran:
"This is in our production code," notes Joseph Daigle, "I can only hope they rolled a die to ensure this was actually random."
`public static int RANDOM_PRIME_NUMBER = 215;`
Hrmm... not random, not a prime number. Looks like we got a winner here.

Not really....I mean...it's still a number...so only 2 out of 3...

public static int RANDOM_PRIME_NUMBER = 's' + 'd';

then?

• schlabotnik (unregistered) in reply to Anon a mouse

yes, 43, but most of us quit at the first factor

• schlabotnik (unregistered) in reply to frits

yeah, some of this is pretty sad, it shouldn't even compile

• (cs) in reply to 1st Century Christian
1st Century Christian:
Jay:
DaveK:
Bob:
shimon:
shimon:
Bob:
Welcome to the 21st century. News Flash: Judaism is no longer funny.
Ya see, Hebrew does not equal Judaism, you antisemitic schmuck.
Just a fix.
Really? WTF else speaks Hebrew? God?
Jewish atheists, duh.

And most first-century Christians.

Though technically you should probably say "Hebrew-speaking atheists". "Jewish atheists" would be something of a paradox, like "Buddhist Moslems". Not that people don't say it all the time.

Hey, guys. I just climbed into my time machine to post this here, since you needed a non-Jew that speaks Hebrew. Just FYI we Christians are Jews too.

A lot were, but the majority didn't speak Hebrew. They predominantly spoke Aramaic and Greek. Even among the Jews of that period, only those religiously educated knew Hebrew. Kind of like Catholics and Latin.

Are we going in circles?

• Mark (unregistered) in reply to ShatteredArm
ShatteredArm:
Why does there have to be a number between the two?

No two distinct real numbers are adjacent; there's always another number in between.

Maybe there is a proof, but this is how I look at it:

What is the largest number that is less than 1?

This argument is really just begging the question. Yes, if 0.999... were "the largest number less than 1", then it would not be equal to 1; but you're assuming it's not equal to 1 when you call it "the largest number less than 1"; reaching your answer by way of assuming your answer is TRWTF.

In fact, there is no such thing as "the largest number less than 1" (at least not if we're working in the real numbers). "The largest number less than 1" is a series of words wtih no meaning. It's like asking how deep a hole has to be before you cannot walk around it.

If you assume there has to be an answer to the question "what is the largest number less than 1", then tell me this: what is the largest number less than 0.999...? Surely that's just as valid a question.

In base 10, 0.999... and 1 are just two different notations for the same number, just as the fraction (2/2) is another notation for the same thing.

• Tough Eddie (unregistered)
<script type="text/javascript">document.write('
')</script> <noscript></noscript>
Too bad JavaScript is interpreted: if it were a compiled language, it would have filtered this out.
• Shinji (unregistered)
Comment held for moderation.
• ÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Â ÃƒÂ¢Ã¢â€šÂ¬Ã¢â€ž (unregistered)

Yesterday's failure to post an article is a What a Terrible Failure.

• schlabotnik (unregistered) in reply to Maurits
Maurits:
Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:
Uh...:
public static int RANDOM_PRIME_NUMBER = 215
Ok, I see how this might be random when he entered it, but I do not see how it is prime.
Of course it's prime. Just not in base 10, or anything else you might reasonably expect. (Try 6, or 36).

hex comes close... very close...

Here are the bases below 250 in which 215 is prime.

83 = 215 base 6 1181 = 215 base 24 1601 = 215 base 28 2351 = 215 base 34 2633 = 215 base 36 4283 = 215 base 46 6791 = 215 base 58 8783 = 215 base 66 11633 = 215 base 76 12251 = 215 base 78 15581 = 215 base 88 26111 = 215 base 114 30881 = 215 base 124 31883 = 215 base 126 38231 = 215 base 138 41621 = 215 base 144 43961 = 215 base 148 47591 = 215 base 154 67901 = 215 base 184 69383 = 215 base 186 91811 = 215 base 214 109751 = 215 base 234 119321 = 215 base 244 121283 = 215 base 246

I like nothing more than going to places where EVERYONE is smarter than me :)

Thanks.

• jc (unregistered) in reply to Anonymous

(IV + I) - V = nulla

Roman for nothing. True fact, check it out.

But it gets crazier than that in roman numerals, they didn't really have any numbers represented greater than 1,000, which was used interchangeably for infinity.