Wed 16 May 2007
“Different” use of the ternary
Posted by dkaz under Java, Programming
Amusing use of the ternary from our codebase..
log.debug( ( randomize ? "R" : "Not r" ) + "andomizing content" );
:)
Wed 16 May 2007
Posted by dkaz under Java, Programming
Amusing use of the ternary from our codebase..
log.debug( ( randomize ? "R" : "Not r" ) + "andomizing content" );
:)
May 16th, 2007 at 8:42 pm
On second thought, I bet this entire debug code block took a half hour to optimize…
Not so funny…if you paid someone to write it.
:)
if ( log.isDebugEnabled() ) {
log.debug( "Loading partner content for category: " + pcCategoryNumber );
log.debug( ( randomize ? "R" : "Not r" ) + "andomizing content" );
log.debug( "Loading " + numToLoad + " article" + ( numToLoad != 1 ? "s" : "" ) +
", will display " + ( numToLoad > numToDisplay ? String.valueOf( numToDisplay ) : "all" ) + " of them" );
}