SIDEBAR
»
S
I
D
E
B
A
R
«
Log viewing programs
Feb 22nd, 2008 by sleepikatkat

I’ve been using log4j for years. Viewing those long files have been a pain no matter what projects I worked on.  It’s not the format itself, but just long long lines and even longer files…

Windows by default opens .log in NotePad, which isn’t designed to handle large text files.  Try opening a 5mb text file.  NotePad is going to hang.  What a pain.

I’ve been using NotePad++ and TextPad for quite a while and have grown to depend on them quite a bit.  NotePad++ is light weight and fast.  I highly recommend using it as replacement of Windows NotePad.  It has syntax highlight and can handle large files.  TextPad has syntax highlight as well.  But biggest advantage of it is the ability to do automatic reload when the file is changed from external sources.  That works very well with log files.  I have yet to find another text editor that can do auto reload as well.  Both software can do file edits (trim line, convert tabs to spaces and vice versa), find ASCII values of characters, number conversions in hex, oct, etc.

Having NotePad++ and TextPad definitely beats opening logs in WordPad or NotePad.  Sometimes I prefer to read the logs from within IDEs.  This, surprisingly, has a lot more options.  There are a number of plug-ins for Eclipse and IntelliJ to read (and tail) log files.  These log viewers work the best when you are running/debugging the application from within the IDE.

But still, imagine having to scroll 10000 lines just to find the part that you are looking for.  No matter how good TextPad and NotePad++ are, the log is still in black text white background (actually you can change the colors and fonts, too).  Every line looks just about the same as the rest!  I get dizzy having to stare at them.

Just yesterday, I found my new best friend with log files: LogMX.  It’s not free, but it’s a much better tool to view log4j logs.  Just specify the pattern that’s in the log4j/log4net config file, and open the log file.  You can let it reload the log, or suspend it any time.  Different levels of severity are in different colors, so any warning or errors REALLY stand out.  Not to mention the ability to filter the log for just certain packages and certain severity level.  Man I fell in love with it so fast and so hard that I was was telling my teammates about it the very next day!

Maybe there’s something even better out there for viewing logs, especially for log4j and log4net logs because they are so common in the development world.  Anybody knows any?  I would love to try them out.

  • Share/Bookmark
Wisdom teeth, Gone!
Feb 19th, 2008 by sleepikatkat

I finally had all my wisdom teeth pulled last Friday. Yak!

I had been postponing it for years for fear of the pain. Then this year I started to feel a nagging pain around my jaws. The stupid wisdom teeth somehow decided to grow up so fast as if they were trying to break the soil and see the sun. So I finally made up my mind about having all of them taken out. Once decided, I didn’t let my mom persuade me away with her scary tactic: “That’s pulling bones out of your mouth. You are going to lose a lot of blood. And not to mention the pain afterwards! I wouldn’t do it in a hundred years if I were you.” Yup, she still has all hers till this day; her mom’s scary tactic worked on her.

It was a point of no return for me. So I just went in, had the surgery done with general anesthesia (I so don’t want to know what happened during the surgery, especially hearing the drilling or sawing noise). I think I actually did wake up very briefly to hear some machine/motor turning on; it sounded like the doctor was going to saw… But it might as well been my silly dream. I was woken up an hour later. The doctor asked me if I would like to keep my teeth. Oh hell no I said. (My mom expressed a slight sadness that I didn’t keep them, ‘cuz they are part of my body after all, she said. That sounded almost like those ancient Chinese who kept their entire life’s clipped finger nails and toe nails in a red envelope. Creepy.)

So, it’s done. I didn’t feel too much pain afterwards luckily. I didn’t even need to take the prescribed pain killer. I just couldn’t chew very well with the back teeth. I am still eating soft food the 4th day after the surgery, which is driving me nuts at home, especially being surrounded with beef jerky, yummy unopened Valentine’s day chocolate, dried Lychee, nuts, chocolate cookies, and greasy Chinese food. Ahhh! It’s killing me!

  • Share/Bookmark
Starting on C#
Feb 8th, 2008 by sleepikatkat

Last month I started to learn and use C# for work. Everybody on the team is new to .NET. But in a Scrum environment, we have much to deliver with very little time (or no time in this case) for training. So I picked up a book or two and dived right into it…

At first I was so excited about Visual Studio 2005′s design view for all our UI need. Comparing to Java, I used to hand code every bit of UI code in a third-party SDK that’s a subset of AWT. We had to write tons of inner classes for event handling. C#’s delegate makes things sooo easy.. It’s like a dream. =)

Then when I started to work on the code, I found Visual Studio 2005′s refactoring support to be terrible comparing to Eclipse or IntelliJ. It’s a pain to move code around, or trying to change signature of a method. I won’t know what’s wrong until I compile. How I miss Eclipse & IntelliJ’s real-time error detection…

Then I found ReSharper. That’s like a heaven-sent gift! I spread the good news about it to my teammates and one of them commented “I don’t know how I have coded without it!” =) Great job in run-time error detection and tons of refactoring. I loved it, can’t live without it now.

On a different matter, I agree with one of my coworkers that just because you did it once, you become the dedicate person to do it in the future. She became our graphics person, though her title is User Experience Lead. I somehow become our team’s UI person just because I showed some interest in doing Ajax a while back, and devoted one week on trying to fix some UI bugs on the all-dreaded-Javascript code.

But I am starting to love this role. Everybody on our team likes to do hardcore Java, all the server side, database, web services, multi-threaded, multi-platform/multi-server support stuff. Nobody cared about doing UI before I came on board I guess. And now I get to work on stuff that pleases one’s eyes, easy to use, functional, intuitive, and, did I mention sort of pretty? Ha! It’s actually quite fun. But sometimes I do miss all my desire to do architecture and design work, as well as coding and debugging like a “real programmer”.

Can’t do both I guess.

  • Share/Bookmark
»  Substance:WordPress   »  Style:Ahren Ahimsa