Commons-Lang, a bile answer

September 14th, 2003 by Hen

Ooo. We’ve been biled.

Anyways, responses.

Why use Commons-Lang and not My_Own_Collation.jar?

Mainly for liability. I found that if I used my own code at work, it was nearly always owned by the company I worked for, or they did not want me to use my own code. I have no desire to break all the documents jobs force us to sign. Having some of my code in Lang is a nice way to protect myself.

Why do I use Commons-Lang?

Well, because it’s got lots of my_own_collation code in there anyway. No idea about the rest of you.

Do I think Commons Lang is an amazing project?

God no. It’s all pretty much basic stuff, though people often come up with weird situations for serializing and inner classes that screws things up. There’s a lot of created-by-committee code, that the ASF way does specialise in, which has good and bad sides I think.

Why is there lots of null-protection going on?

The original StringUtils was the backing for Jakarta String Taglib. Rather than have the taglib code worry about how to handle nulls all the time, I let the underlying library do so. It’s stuck and there’s enough people who like it to keep it there.

Are you lazy if you use Commons Lang?

Nope. You’re just a believer in code-reuse. The other side of the coin is to never re-use code, which I think has some major pluses. If I always code from scratch, I have far less in the way of dependency management to worry about. At the same time, I end up with a million pieces of code to fix when I realise that using toUpperCase for capitalising a String is not globalised.

Commons-Lang is full of stupid code!

First off, I’ve the highest Java-IQ on Hani’s scale that I’ve heard of yet, so I probably don’t qualify to answer this question. But yes, it’s stupid, useful code.
Clever code is not something I would want to work with as it’s usually ‘too-clever’.

One Response to “Commons-Lang, a bile answer”

  1. R.J. Says:

    CHEEEER!