November 17, 2009
If the comments are ugly, the code is ugly | ITworld. Programming, whether you're doing it as an open source enthusiast or because you're workin' for The Man, is an exercise in attention to detail. Someone who writes software must be a nit-picker, or the code won't work.
via Slashdot
Leave a Comment » |
Java, Programming |
Permalink
Posted by Greg Ballinger
November 9, 2009
Java String Concatenation and Performance ~ Joey’s Scribble’s. “The quick and dirty way to concatenate strings in Java is to use the concatenation operator (+). This will yield a reasonable performance if you need to combine two or three strings (fixed-size). But if you want to concatenate n strings in a loop, the performance degrades in multiples of n.” An article that compares the speed of 4 different ways to concatenating Strings in Java. Using StringBuilder is clearly the fastest but it is interesting to see the range of differences. The comments to the article also mention when StringBuffer should be preferred.
via Dz0ne
Leave a Comment » |
Java |
Permalink
Posted by Greg Ballinger