Panasonic Youth rob sanheim writes about software, business, ruby, music, stuff and things



Posted
23 September 2005 @ 10am

Tagged
Java

Discuss

I hate when I rewrite API code

Just spent five minutes writing code to iterate over a string and break out its lines nicely. After a couple googles to check an API method, I see that BreakIterator has already done it for me in the java.text package. The moral of the store is to always google on the JDK before writing something that feels like it should be in the api. (Annoyance: why doesn’t BreakIterator impelment Iterator?)

Update: Never mind, BreakIterator turned out to be horribly over complicated for what I needed. I’m sticking with what I wrote in the first place. Sometimes you should rewrite the wheel when its a very simple need - and the available wheel is for more complex.


No Comments Yet


There are no comments yet. You could be the first!

Leave a Comment

NFJS Ajax presentation recap Bracha on adding dynamic type support to the JVM