I've just analyzed how language and library changes would improve my
source. it was just a ten minute grep-and-sed exercise.

I've quickly scanned though a selected group of projects, which share
dependencies.

Of 2k .java files, the most imported classes are:
java.util.List (imported in 22.51% of the files)
java.util.Date (15.78%)
java.math.BigDecimal (15.47%)
java.io.Serializable (12.06%)
org.junit.Test (11.31%)
java.util.Map (10.60%)

Everything else gets imported into less than 10% of files

I use org.apache.commons.lang.StringUtils on 5% of all sourcefiles and
is it the single most imported third-party import outside tests. It
counts for 0.3 percent of all lines of nontest code.
Of all StringUtils methods, the one I use the most is defaultIfEmpty,
which counts for a third of the class use. Next is the null-safe
trim(), which counts for one in ten uses.

Reinier: split and join are on places 5 and 7 of my list. Not that important.

In conclusion, for MY style of programming:
1) I desperately need closures and collection literals. Tough I am
mostly happy with apache commons or google collections.
2) I crave for a better Date and Time. There is no Joda-time
dependency on these projects.
3) I want the scala bigdecimal (with +. -, <=, etc)
4) Better language support for null handling.
5) My old complains about the presence of Pair, Base64, Hex, Tuple and
others are not that necessary seeing how I use the language.

Go figure!

On Wed, Mar 4, 2009 at 4:22 PM, Dominic Mitchell <[email protected]> wrote:
>
> On 4 Mar 2009, at 18:46, Joshua Marinacci wrote:
>> what does String.join do?
>
> Joins strings together using a separator.  Just like every other
> language in the last 20 years.  :)
>
> The google collections guys have a nice implementation, which accepts
> Objects as well as Strings and makes nice use of varargs.
>
>   
> http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/base/Join.html
>
> -Dom
>
> >
>



-- 
Marcelo Morales

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to