all about stupid java code

This blog is about all stupid line of codes wrote by java developers.

Friday 25 April 2008

LOG kills

›
Never activates log in DEBUG mode. That kills memory and performance. Always use INFO. Debug should be used with AOP to trace execution only...
Wednesday 16 April 2008

Money money money, bug me honey

›
Money int value; String currency; Money add(Money initial, Money toAdd) { int value = initial.getValue() + dogAmount.getValue(); ...
Tuesday 15 April 2008

OutOfMemoryError Problem To Log

›
How appears a vicious OutOfMemoryError on 2/3 of the dev computer ? The same JVM, the same sources, the same web server... Everything is the...
Thursday 20 September 2007

To be null or not to be ?

›
Book myBook = getBookFromSomeWhere(); System.out.println("myBook: " + myBook); if (myBook == null) { System.out.println("...
Wednesday 29 August 2007

Out of subject : Errare Humanum Est

›
Basically the implementation look like : if client => send email to client if enterprise => send email to client if others => send ...
Friday 3 August 2007

What time is it ?

›
// defined previously // Date aDate = ... Date date = new Date(); date = new Date(date.getTime()); if (aDate != null && aDate == dat...
Friday 13 July 2007

cast it

›
public static int roundSup(float n){ int round=0; if(n > (new Float(n).intValue())) round = new Float(n+1).intValue(); el...
›
Home
View web version
Powered by Blogger.