Wednesday, June 9, 2010

Kalau Buka Pintu, Tutup Balik Ok?

java is a good subject for a painting


Pengajaran untuk hari ini : Kalau sudah membuka PrinterWriter atau apa2 IO, jangan lupa tutup balik!

Work-log: Today started very bad. I thought putting all logging files according to the incident ID is an easy task. Well, it's easy until you realize that you have to manage about 400++ distinct ids. After a while, I felt exhausted, feeling that it would take forever to finish all this. Then, fortunately, I realize that I can make a simple program for that. What I do is just read those logging files line-by-line, and check the incident id. I call this program "XMLCopyPaster". After finish writing the program, I though I was done, but actually I hadn't done yet. There was fatal error to the output files that the program produced. After a cautious look at it, I knew what was missing : printWriter.close()

No comments: