Tuesday, April 10, 2007

Personal WTF

I read TheDailyWTF daily and I can really empathized with the victims in the story. Heck I have been shoving lots of shits myself over the years, in fact I made money from it.

Anyway, I just finished a reporting part which requires some data mungling before output to the PDF report. I looked at the one piece that bugged me whole day and I thought to myself,


I just hope whoever that is going to maintain that piece of code will forgive me. I blame myself for not putting the effort to learn JasperReport!

$F{SCORE} == null ? "" : (
(Double.parseDouble($F{SCORE})) > 91 ? "X" : (
(Double.parseDouble($F{SCORE})) > 81 ? "XY" : (
(Double.parseDouble($F{SCORE})) > 61 ? "Y" : "Z"

No comments: