Archive

Posts Tagged ‘Coding’

String literals

June 2nd, 2008 makii Comments off

When coding in Java, I usually try to avoid string literals in the code, especiall when they reference other software components like templates, which are filled with values in arbitrary places throughout the code. This is what I found in a project which we’re going to insource soon:

#-[ user@host ]- ~/work/project/trunk
#-[0]-> find . -type f -name "*.java" -exec grep -r "\"salutation2\"" {} \; | wc -l
24
#-[ host@host ]- ~/work/project/trunk
#-[0]-> kill -9 $SOFTWARE_SERVICE_PROVIDER

No comment.

Categories: Coding, Java Tags: ,