- 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
Frist! Askimet! I say Frist!
Admin
Is this some sort of nebulous testing class designed like the evil monkey of distributed systems?
Admin
Oh...My...Deity.
Admin
Must be British code. If it was American it would have used Trash.
Admin
What's so mysterious about this class?
Based on the comments, seems like it's a predictable memory allocation utility, likely to test load on a JVM.
Admin
This code is rubbish.
Admin
Garbage In Garbage Out?
Admin
Rubbish in Rubbish out, more precisely.
Admin
Shouldn't the non-Javadoc comments also be anonymized?
Admin
Not knowing what code is for does not mean it is bad code
Admin
Can you please post the code for the RubbishCollector?
Admin
0.0
No, Akismet, this is not spam...
Admin
gblx == Global Crossing?
Admin
Rubbish Under Heap, Rubbish Over Heap. RUH-ROH.
captcha: dolor - already a valid and quite suitable English word, thank you
Admin
I came here to post pretty much this. It looks quite strongly like it's designed to allocate a lot of memory as part of some sort of test.
Admin
A utility for testing garbage collection of the jvm might be useful in some circumstances. This one certaintly isn't.
I especially like how
Admin
My guess on the code would be that its a class for testing the actual size of objects.
so why is it here ... seems perfectly reasonable... not even the naming is that bad for just being some "run once" code not meant for production but just to get some knoledge about Java.
Admin
Java has spurious wakeups so the wait call has a chance to return before the time runs out...yet I presume that waiting forever was the intention of the code.
Admin
<quote>"most of the time, it's different versions (sometimes older, sometimes newer) of the same class that were created as part of a good-intentioned refactoring that was never quite completed."</quote>
That indicates a failure to understand feature branches in scm.... Seems like I can tell good work from bad work simply by their understanding of scm.
Admin
Admin
Must be.
(And kiss my ar**, A-kiss-me-too. Plus, the RWTF is that I looked up the meaning of word 'kismet', just for the curiosity. 'Fate', how does that describe a spam filter?)
Admin
It decides the fate of your comment: published or not.
Admin
This is the most amazing Rubbish I've ever seen. Probably the best part of all is that one lone comment in there:
That about says it all, with respect to what this thing does.
No wonder the author name was left blank.
Admin
TRWTF is that they actually made a rubbish generator interface.
Admin
you must be new around here
Admin
The real WTF is the "com.initech" at the beginning when it is clear from the rest of the code, that it actually belongs to gblx.com :-)
Admin
I can't fail to notice the awful amount of WTFs that are submitted that are either in Java, VB, and ASP.
Maybe if people would stick to real programming languages for their projects, the shitty wannabies would stay out of their companies, and they'd actually save some money or, at the very least, headaches.
For the record, a "real" programming language would be C/C++ for low-level / time critical requirements and python for high-level / non-critical applications ;)
Admin
Admin
The only reason I agree that a C/C++/python app may come out better is that less new coders know them, therefore they have a distinct average coder skill.
Admin
Anyone making such a statement shouldn't be in the development world themselves. Such a bold and black and white statement is just assinine.
Admin
Anagram of "mistake".
Or "meat ski".
Admin
Admin
TRWTF is still not having some sort of code formatting on this site.
Admin
Yes, it's obviously a testing class (probably, as other comments have posted, for the memory allocator or related). But why so much code? Why not just declare an array, stuff X random strings into it, and save it in some global (or pseudo-global, this being Java) location so it doesn't get GC'd?
Admin
This code would never work in NET! We have garbage collection.
Admin
I would have to agree with the earlier comment that this is just garbage collection load testing code. It very specifically is creating chained object references so that the garbage collector will have to do some work.
The code looks sloppy and isn't very self documenting...but it looks like single purpose relatively throw-away code. I'm guessing they used it at one point while testing various architecture options and never looked back.
Admin
tl;dr
Admin
dolor sit amet
Admin
I read the original thinking "too obvious a troll". I was wrong.
Admin
Lazy? Or maybe...?
(I wish aksimet was lazy)
Admin
My hypothesis is that R.S.'s place may have issues with code being reused in programs where they are not intended to be used. He may have finally tracked down the origination of the code that caused those TPS reports to run so ungodly long.
Admin
So, what does it do?
Admin
Why is this a WTF? Looks like reasonable memory allocation and/or garbage collection testing. As long as it is indeed dead code, and not run on each call to some often-called function...
Admin
Admin
So, a memory allocator/garbage collector stress tester. OK? I guess finding it necessary could be a WTF...
Admin
Admin
Not sure if trolling.
Well a language that allows sloppy or inexperienced people to produce useful work isn't without advantage. Also vast numbers of programs are written in Java and VB so there is a lot of fodder and most of it is boring enterprise sh't the no one cares about. Vs for sale proprietary software where if management finds out you disclosed code to an outsider without an NDA, you'll get the frog march.
You can only get away with programming C when you have hard resource constraints. C++ when you need speed and your user base is large. Python had the problem a lot of scripting languages have, no installer. So nontechnical people can't use the program without hand holding.
Admin
Our MIS system is like that, well, except it just churns out shit of course.
Admin
I don't see what's so bad about that code.
OK, it looks a bit over-engineered for what it seems to be supposed to do, but most Java code looks overengineered to me at first glance.
Admin
Hang on laddie, what are you saying?