Commons-io: By retards, for retards
A week or two ago yet another Jakarta commons project was inflicted on a largely unsuspecting world. This release didn’t so much as arrive with a bang or make an entrance, it sort of guiltily snuck in hoping no one would notice.
If you were to have a look at the contents of this latest abomination, you’d realise why it’s guilty and ashamed from the outset. Let’s take a brief walk through this remarkable insight into the mind of a a happy idiot java beginner. Yes folks, most of you too were this stupid and ignorant once, so let’s not judge these genuises too harshly.
Oh and for those of you desperate for more JBoss goodies:
From: "Nathalie Mason"Received: from galaga ([65.81.161.44]) by imf15bis.bellsouth.net JOnAs motherfuckers. At least when the JBoss/BEA killer thread got posted on the ServerSide we didn't have to stoop so low as to post it ourselves. "We think JOnAS...is...maybe..er.a better app server than JBoss." If they are going to use negative PR tactics, they are going to have to come up with stronger language than that What one of you guys needs to do is make up an alias on Serverside and post something like "JOnaS rules, JBoss sucks big donkey dicks" That way they'll get the choirboys after them too
May 27th, 2004 at 3:46 pm
A most detailed investigation.
The Filter issue is your own personal coding choice, bespoke vs lego. I’m with the lego.
DeferredOutputStream will be asked to justify its existence, as will the IOUtils.toByteArray method.
Finally, I’ll have you know that per dictum #1267, by order of the chair, red-haired Jakarta committers have dyed their hair blonde.
May 27th, 2004 at 3:51 pm
http://jakarta.apache.org/commons/io/
shame on you Hani :)
May 27th, 2004 at 4:30 pm
The IOUtils class, which has only static members states this in its constructor:
“Instances should NOT be constructed in standard programming.”
Do I need to point out that the constructor is public?
May 27th, 2004 at 4:52 pm
The reason for the public constructors is because scripting tools like Velocity have problems calling static methods. They have to invoke methods on an instance, even if the methods are static.
I’m not even sure if this is still true (about Velocity) but I think that this is the reason.
May 27th, 2004 at 6:39 pm
Avoiding copypaste, what would you choose?:
1. programing macros in a static class? (***Util)
2. programing a new Class with one method? (for thread safety)
3. programing/using a codegenerator that does the copypaste at build-time?
4. programing a good structured design?
5. programing a good oo design?
6. use a commons-**** package?
May 27th, 2004 at 7:26 pm
now
thats
what a bile should look like :)
May 27th, 2004 at 7:39 pm
While you’re being pedantic, it’s “dismiss them out of hand”, not “dismiss them out of hands”… unless, of course, you were doing a bad wanker joke… but anyone who needs both hands to wank is either doing it wrong or really shouldn’t be wanking.
May 27th, 2004 at 9:20 pm
if they wanted to be useful, a toCharArray() that deals with char encoding properly would have been great (unicode can be a minefield to the unwary).
I have to profess though, the rest of IOUtil is pretty handy, its very easy to fuck up those pesky Reader->Writer kind of operations in weird and wonderful ways…
May 27th, 2004 at 9:24 pm
duh, they did! scuse my ignorance, but the copy(*) methods take encodings as args or use the default if unspecified. oh well, back to my hole…
May 27th, 2004 at 9:39 pm
one last thing [haven't learnt yet, probably should post with a pseudonym] re. immutable Strings … on oldie but a goldie:
public String getAString() { //get a reference to the private field value in String class. java.lang.reflect.Field stringValue = String.class.getDeclaredField("value"); //make it accessible stringValue.setAccessible(true); //unsuspecting string String sittingDuck = "sittingDuck!!!!!"; //black magic happening here stringValue.set(sittingDuck, "hastaLaVistaBaby".toCharArray()); //guess the output of this! return "sittingDuck!!!!!"; }apparently this has been fixed in some recent JDK, but not sure which… doesn’t affect getBytes() but, which I have just noticed ALSO has char encoding support … dang I’m slow today!!! [note to self, NEVER post under real name the day after a big rehearsal]
May 28th, 2004 at 9:24 am
hani-
if I remember properly, you wished for the existence of such a device in a previous bile. this might be something for you:
Printer which takes in toilet paper
May 28th, 2004 at 11:02 am
>but anyone who needs both hands to wank is either >doing it wrong or really shouldn’t be wanking.
>
>Posted by fletch at 27.05.2004 19:39:46
OR has a really BIG FAT CLOWN!
May 28th, 2004 at 11:03 am
What’s encapsulation and information hidding?
“Though the code may use Java objects, it does so in a manner reminiscent of a by-gone era: utility functions operating on data structures. Welcome to 1972!”
May 28th, 2004 at 11:09 am
What is does “immutable” mean?
Sorry for my poor Engrish. I am from Pakistan where we murder each other over 100 rupees.
May 28th, 2004 at 11:54 am
Shame on you! Not everyone in the world is as healthy and fat as pigs like Americans.
Sorry for my bad English. I’m from Indonesia, where all candidates running for presidency can all go to hell … especially Amien Rais (fuck you!), except Susilo Bambang Yudhoyono (yay! Good Old Nationalist Military Figure — kick away those retarded religious candidates)
> What is does “immutable” mean?
> Sorry for my poor Engrish. I am from Pakistan > where we murder each other over 100 rupees.
May 28th, 2004 at 11:54 am
Oopss… I mean Wealthy. That proved my bad English.
May 28th, 2004 at 12:27 pm
I said I am from Pakistan. I am thin as toothpick.
I still want know now what mean “Immutable”?
Sorry for by mad English. I am from the pit of the arm Rawalpindi. We have no immutables.
May 28th, 2004 at 3:02 pm
From the out sight, Apache looks good. and true,some of them may be good.
But with so many utils crap around, it really sucks now a days.
Yeah, how about somebody releasing an util library to wrap up all the fu**ing utils around??
Why the hell on earth, these people should leave the programmers to do the job? If somebody cannot do even a code to use string properly, why the hell on earth, they should be paid as programmers?
Sucks is the milder word!
May 29th, 2004 at 3:11 am
While Henri likes his Lego, I think he’s playing with it on his own. Does anyone actually use these Jakarta bollocks in their products ? I mean, do you insist that your users will have to download this filth or do you just write what you need since it takes so little time to do it?
May 29th, 2004 at 6:21 am
There are some real gems available from the Jakarta project. My personal time saving favourites are the simple and effective org.apache.commons.lang.builder.HashCodeBuilder and org.apache.commons.lang.builder.EqualsBuilder.
I wouldn’t be without them.
June 4th, 2004 at 5:10 am
http://trijug.org/downloads/JBOSS1.ppt
crazy & funny & pathetic
June 22nd, 2004 at 6:35 am
Yeah, right, time saving. Till the day you realize that the company app server has restricted relflection capabilities and you end up writing the same old bull hashCode methods anew.