- 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
This reminds me of this time I was in this place and was doing something. It did or didn't' work out that time. I had bad dreams about inserting a tape or drive that same night.
Captcha: commoveo: BYOO - Bring your own oreos.
Admin
Wha? :|
Admin
From here on all my code is going to implement ISelfAware. A new project called "SkyNet" or something just came through.
Admin
Can someone explain the wtf with the hashmap to me?
Admin
Yeah, I don't know either. I thought it was related, but I haven't slept in 28 hours, and hurting a bit from it.
Incassum.
Admin
Oh crap - we are not commenting in the correct Universe
Admin
No, it is not.
Admin
Admin
Admin
Obviously this is from an embedded system without a file system. Why would you need a file pointer there?
Admin
Admin
The guy had put in a "clear" statement to force a newly created HashMap to be empty.
The gag, of course, is that newly created containers (...in any sane implementation, who knows what half-assed home-baked version of HashMap this guy might have been lumbered with) are always created empty because anything else is madness. So he was (we are led to presume) doing something completely pointless, and adding a comment explaining it which really only highlighted his own lack of understanding.
Or so we must assume. Maybe in his codebase HashMaps really are created containing random garbage. Seems unlikely, though.
Admin
Only if you implement ISelfConscious.
Admin
Admin
The code with the cleared new HashMap is absolutely correct.
Probably somewhere in later code, the author implemented some GOTO functionality by changing the address register of the CPU. Then you could jump directly behind the newly created HashMap! Of course you need to clear it then, to be sure that no elements are left.
Admin
Hi Honey! Did you miss me? kisses
Admin
Admin
And the 1 = 0 test also clearly comes from an embedded system -- who knows what universe a user might carry the system to?
Admin
Broken? now you are not putting the needed
Admin
This exposes self for a JavaBean; allowing access to the self pointer by token. Off hand, I don't know of any other way to accomplish this directly.
In my own code, I check for the "self" token explicitly and just return the self pointer in that case instead of passing the token on to the JavaBean itself. But, this solution works also.
Admin
Admin
Admin
He should have put 3 calls to clear(). Once to clear out the random garbage, once to clean out the rest of the garbage, and once again for lucky.
Admin
0 and 1 are neither composite nor prime. Non-whole numbers do not qualify either. A prime is a number with by only two integer factors: 1 and itself. A composite number is the product of several primes. 1 does not qualify for either, because 1 has only one factor, which is 1, so it not prime. Also it has no prime factors, therefore it is not composite.
0 is divisible by every number (0/x = 0, for all x | x != 0). 0/0 is handled by limits in calculus class. Therefore, 0 is not prime. That said, 0 is not composite because one of its factors is not prime, as 0 is a factor and, as just shown, 0 is not prime.
Therefore, 0 and 1 are each considered neither prime nor composite.
Admin
/* 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 !
Admin
The random, prime number being set to 215 is PERFECT!
Nobody trying to crack the encryption would EVER try 215, as it's not random and it's not prime.
PS., Hey frits, maybe you could just change your sig to be the Bert Glanstron thing; that would save your secret admirer a lot of time.
Admin
Admin
golf clap
Admin
That works ... NOT!
x OR y ≡ ¬(¬x AND ¬y) [[ http://en.wikipedia.org/wiki/De_Morgan%27s_laws ]]
Admin
Admin
TRWTF in the first code fragment is that the submitter can't read comments. I don't know MBeans, but based on this comment I'm willing to bet that they impose some kind of proxy, and this method is used to trick the proxy into letting you bypass it. On second thought, TRWTF is that their framework assumes you might have a need to bypass a proxy...
1 is not prime; look it up. 215 is neither prime nor random, but then again a lot of people say "random" when they mean "arbitrary". My guess is they needed an arbitrary prime for something obscure (like a home-brew hash table), and the value was later changed by someone who had no clue why it needed to be prime. Or maybe it didn't need to be prime any more, but it was too much work to change the constant name (since the whole point with named constants is to isolate change).
Bad joke != WTF. The (1 == 0) test is a developer having a laugh.
Admin
wtf??? what does that mean? get me outta here!!!!!!!!
Admin
Rocky V + Rocky II = ?
Admin
Admin
Admin
I recently inherited a system with these lines in the crontab:
Some days I wonder just what happened to the last person who had to work on that server.
Admin
That's also the standard Java generics syntax. I suspect both Java and full WTFness, but cannot prove it.
Admin
Fail
Admin
To those saying that 215 and 1 aren't random numbers: go study statistics.
A random number is "a number generated for or part of a set exhibiting statistical randomness".
Since you have no idea about what generated such number, you can't say if the numbers are random or not. It's not an intrinsic property of the number, but of where it came from.
Admin
סליחה?
Admin
סליחה?
Admin
Admin
Admin
The answer is "II".
In ancient Roman numerals, the value is the sum of the digits. "IV" = 1 + 5. The representation for 4 was "IIII"; the convention of writing "IV" did not come until the middle ages.
On the other hand, you want to know how to represent zero, and the answer is "NULLUM" or "NIL". ( Ancient Romans did not have lower case letters. )
Admin
Yea, but surely any optimizing compiler would remove the code at compile time?
Admin
I had a coworker do this. He was absolutely nonplussed as to why his code was throwing object reference exceptions when the field wasn't even required.
Admin
Admin
Admin
Sup dawg, I heard you like references, so we've put a reference in your reference so you can get self while you have self!
Admin