Showing posts with label software. Show all posts
Showing posts with label software. Show all posts

Monday, March 2, 2009

The art of application logging - The Series (Intro)

Quite recently, I found myself in a very sticky situation. Systems are literally dropping around me and the management found it pleasantly appealing and convenient to spear me to solve the problem asap. Not a big deal you tend to say........unless this is your first week in work.

Try as hard as i may, but I could not sieve through the logs due to these reasons.

  • The tomcat default logs are more than 5 GB. Please can anybody tell me any machine readily available to open up those files.
  • From the point above, you can imagine all possible log statements (SQL query construction, every debug/trace statements, love letters, personal bank accounts (i wish!!), XML strings) are being included.

Needless to say, I was floundering around the logs (or something that at least resembles it). Imagine the shock I got when I opened up the codes in the versioning repository and came across this all over the place

try{
// Some garbage here
.......
.......

// Some crap here
.......
.......

// Some undocumented 'only-I-know-what-I-am-doing!!' here
.......
.......

}
catch (Exception ex)
{
ex.getMessage();
}


and thats it!!! Nothing was done to the exception!!! THAT'S SIMPLY IT!!!! WTF!!!!


Some folks may claim that the glorious author of this code is pressed for time and blah blah blah ...yadda yadda yadda. (Make no mistake! This is not a one-off. It's all over the damn place!!)

PLEASE!! Who isn't??! That is not a good excuse to be a selfish, inconsiderate and downright irresponsible programmers. I am sorry but we do have ethics. Newsflash to the business/marketing/operation guys!


So are we talking about exception handling or logging here? Unless anybody can come up with a robotic artificial intelligent system that can fix itself upon exception caught, then yes, whenever an exception is generated, the least thing you can do is to log it somewhere. So they goes hand in hand sometimes.

I cannot place enough emphasis on proper logging. Whenever our application has been fully tested and deployed, we do not have the luxury of time and resources to do scoped-down testings or try to reproduce errrors. We look at logs and get the inputs and try to simulate the outputs at our localized settings. And sometimes the errors could not be reproduced localized. However the users are NOT our QA testers, nor are they our experimental guinea pigs. By introducing proper logs, we can analyze, derive the problem and come up with the fixes asap.

A nice rant here...

Application Logging - Yes it is important

I will follow up with a series on some of the key points to consider for logging.

Wednesday, February 25, 2009

A sad day....

I just got to know an ex-company of mine has undergone bad times. Based in Amsterdam, apparently it was also not spared of the global economic gloom. My buddies , who are still attached to that company, was informed (informally , as I understand) that the company is undergoing a massive retrenchment exercise for the KL office. My guess is that the whole IT team faced the brunt, due to its operation overheads.

Maybe one day I would like to do a research on the value (intrinsic or extrinsic) of having internal IT department. But for now....

This company holds a dear place in my heart as I happened to be the first Programmer/IT staff to be recruited for development purpose. I was given the task to setup the firewall and all the Linux servers. I really treasured those days sweating out the WatchGuard Firewall policies, IBM Blade Servers and the SunFire Server running on Solaris. I also had the chance to do a RAID cluster among all these servers.

And mostly the company opened up my oppportunity to delve into the world of J2EE, playing around with EJB 2.1 (which I really hated at that time.....and to think about it..I still hate it! I love the later EJB 3.0 though..). I was introduced to JBOSS App servers and JMS Queues.

I really hope that those guys can move on seamlessly through their careers! Hold on guys!

Monday, February 16, 2009

Welcome to the Moose Corner!

After years of slogging and perspiration doing software development, I have decided to create my own corner (blog) to publish some findings and also to discuss some of the interesting issues a software developer usually come across.

It's a general conception that a software developer (regardles whether he is a software architect, team leader or even a humble coder) have to learn and understand basic software skills, methodologies, process and sometimes even design patterns.

However, how many times have we come across situations where its not stated in the textbook, or maybe sometimes what stated in the textbooks do not seem to be the most ideal of solution.

I hope to publish and discuss some of these so called grey areas or maybe get some opinions or 2!

And lastly why 'toffeemoose'??

Well I support one of the best club (Everton), nicknamed Toffee and Moose is the nickname I gotten as a coder.

Perhaps one day I will even publish the whole story if anybody is interested.