- 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
Remember, you don't want to read about something that's working nicely in deployment with no trouble and which it is easy to update. And there's not likely to be many stories about the use of something really obscure like Malbolge in production because there's nobody doing that.
Admin
Admin
Anyone that can't write quality code in a Turing complete language isn't a real programmer.
Admin
Admin
^^ This.
I used to write better code in BASIC when I was 12, than some people do today in C/C++. No language choice will fix a bad programmer.
Admin
Admin
If you want to produce a reasonably predictable amount of garbage
This produces slightly more with overhead. ;)
Admin
Yes but it won't keep the CPU warm.
Admin
I guess no one of you has ever written something like this, because then you would know that:
the wait() is there so you can attach a debugger to this little test program
the "o" should not get optimized away so you have something to inspect in the debugger.
While most of the stuff in that class obviously was left over from copy/pasting, the main() method is not bad at all. And if you really look close, you would see that almost no "wtfy" code actually gets used when you run that class.
I keep wondering why so many people feel the need to post such code to tdwtf, when they obviously have no idea about programming themselves. The only fault of the guy writing the main() method was, that he left a lot of dead code in there.
Admin
Much easier if done in Perl: @P=split//,".URRUU\c8R";@d=split//,"\nrWTFekcah xinU / lreP rehtona tsuJ";sub p{@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord($p{$})&6];$p{$}=/ ^$P/ix?$P:close$}keys%p}p;p;p;p;p;map{$p{$}=~/^[P.]/&&close$}%p;wait until$?;map{/^r/&&<$>}%p;$_=$d[$q];sleep rand(2)if/S/;printwhile{($s,$m,$h)=localtime(); if(length($h)==1){$h="0".$h}h;$r=$h;$h1=s+ubstr($h,0,1); $h2=substr($h,1,1);if (length($m) == 1){$m="0".$m} $w=$m; $t=$m; $m1=s+ubstr($m,0,1);$m2=substr($m,1,1); if (length($s) == 1) {$s="0".$s} $e=$s;$y=$s;$s1=s+ubstr($s,0,1); $s2=substr($s,1,1);while ($h1>0) { if ($h1 %2 == 0) { $str1.=0; } else+ { $str1.=1; } $h1=int($h1/2);} $str1.="0" while length($str1)<4;$str1=reverse$str1)+;while ($m1>0) { if ($m1%2 == 0) { tr2 .= ; } else { $str2.=1; } $m1 = int($m1/2);+ } $str2.= "0" e ength($str2) < 4; $str2 = reverse($str2); while ($s1>0) { if (+$s1 % 2 == 0){$str3.=0;} else {$str3.=1;} $s1=int($s1/2); } $str3 .= "0" while leng+th($str3) < 4; $str3=reverse$str3);while ($h2>0) { if ($h2 %2 == 0){$str4.=0; } else+ {$str4.= 1; } $h2 = int($h2/2); } $str4 .= "0" while length($str4) < 4; $str4 = r+everse($str4); while ($m2>0) { if ($m2 % 2 == 0){ $str5 .= ; } else { $str5.=1; }$m2+=int($m2/2); } $str5 .= "0" while length($str5) < 4; $str5 = reverse($str5); while ($s2>0) { if ($s2%2 == 0){ $str6 .= 0;} else {$str6 .= 1; } $s2= int($s2/2); } $str+6 .= "0" whilelength($str6) < 4;$str6=reverse($str6);while($q>0){ if ($q % 2 == 0) {+ $str7 .= 0; }else { $str7 .= 1; } $q = int($q/2); } $str7 .= "0" while length($str7 +) < 6; $str7 = reverse($str7); while ($w>0){ if ($w % 2 == 0){ $str8 .= 0; } else{ $s+tr8 .= 1; }$w=int($w/2);} $str8.="0" hile length($str8) < 6; $str8=reverse($str8); +while ($e>0) {if ($e % 2 == 0) { $str9 .= 0; } else { $str9 .= 1; } $e = nt$e/2); +} $str9 .= "0"while length($str9) < 6; $str9 = everse$str9); @x1 = split//,$str1; +@x2 = split//,$str4; @x3 = split// ,$str2; @x4 = split//, $str5; @x5 = plit//,+ $str3; @x6 =split//, $str6; @x7 = split//, $str7; x8 = split//, $str8; @x9 = s+plit// ,$str9;print "\n\n\n x20] $x4[0] $x6[0] \n $x2[1] $x3[1] $x4[1] $x+5[1] x61]" ;print "\n $x1[2] $x2[2] $x3[2] $x4[2] $x5[2] $x6[2] \n $x1[3] x23] $+x3[3] $x4[3]";print " $x5[3] $x6[3] \n\n\n\n\n @x7\n @x8\n x9\n\n\n\n\n $r:$t:$y\n+n\n"; sleep 1;( $str1, $str2, str3, $str4, $str5, $str6, $str7, $str8, str+9 ) ""; }
Admin
Love the null reference exception I see coming from function generateRubbish...
Admin
Unless you have to program the GC
Admin
...as commonly occurs when writing code for embedded systems. (Sorry, but someone had to say it. :-) )
Admin
Hey, I know plenty of people who hate anything they don't udnerstand.
Admin
Somewhere or other I read a discussion of how it can sometimes be difficult to reproduce an error because the circumstances involved may not be apparent. And then the writer concluded, "Sometimes the only way to reliably reproduce an error is to give a demo for an important customer."
Well, sure. Just like in a compiled language, incorrect code may work correctly if you use the right compiler or the right version of the compiler.
I've written plenty of C programs that worked fine when compiled on Windows but didn't work when compiled on Linux, etc etc.
Frankly I think this sort of incompatiblity is much less of a problem in Java than in compiled languages, because the developers of Java put a lot of effort into cross-platform compatibility.
Admin
No, gblx=Goblex, cousin of goblin
captcha: augue - cousin of queue
Admin
The difference is that when C/C++ code breaks on a new compiler, there is a developer in front of the terminal, grumbling at the result. When a Java program breaks because the 'wrong' version of Java is installed, it's some poor sap end user.
Admin
http://perl.plover.com/obfuscated/
Screw you, Akismet. No linked URL, then.
Admin
I completely agree. I've seen horrible things done in "real" programming languages, like C++, and beautiful, concise, eloquent things done in VB.
Admin
Admin
Frankly I think nobody gives a shit, since we're in 2012 and 99.9% of the software produced today is web-based, and noone in their right mind would consider something else than c/c++ on *nix as backend.
blabla cross-platform gheyness is done for, nobody needs the "w/e for android" when it's available in web-based.