Tuesday, March 13, 2007

How not to code

Code snippet -

 

Object obj = iter.next();

logger.trace (6 , "This is exception class: " + obj.getClass () );

AppError appErr = (AppError) obj;

logger.trace (6 , "This is exception erroCode: " + appErr.getErrorCode () );

 

Nothing wrong with this, this would work fine(provided that iterator, logger etc are initialized)...

But then....

2 Comments:

Anonymous Anonymous said...

Yaar, you will see lot of such things.
Typically such code is written by people who might be good enough to program, but are not much good at "best practices".

Or by freshers.

- Darkstorm

March 13, 2007 8:55 AM  
Blogger In The Shadows said...

Hello Yaarrr.... Darkstorm,

Kaisa hai tu?

Yep, you are right. Its a fresher. Unless you do not count someone with 1 year experience as a fresher.

March 14, 2007 10:52 AM  

Post a Comment

Subscribe to Post Comments [Atom]

Links to this post:

Create a Link

<< Home