Vivek Agarwal’s Portal/Java Blog

An IBM Gold Consultant’s weblog about IBM, Lotus, WebSphere, J2EE, IT Processes, and other IT technologies

Posts Tagged ‘OOD’

Want to test your object-oriented coding skills? Check out this code smelling exercise …

Posted by Vivek Agarwal on June 21, 2008

Sometime back, I wrote on Bad Smells in Code that were defined as – “A code smell identifies classic mistakes made in developing code. These mistakes typically result in code that is difficult to understand, maintain, debug, and extend.” In my previous blog entry, I captured some code smells that are commonly found in code written by new (and some experienced) programmers. Sample smells include “duplicated code”, “long method”, “inappropriate intimacy”, “large classes”, “inconsistent names”, and others. I had promised to be back later with my “code smelling exercise” that I used during my presentation to make my points about code smells. Well here it is … Read the rest of this entry »

Posted in Java | Tagged: , , , , , , , , , | Comments Off on Want to test your object-oriented coding skills? Check out this code smelling exercise …

Dusting off the “Bad Smells in Code” presentation!

Posted by Vivek Agarwal on June 7, 2008

Recently, I dusted off a presentation (i.e. re-skinned and reused) that I had done back in year 2000 about “Bad Smells in Code” that was derived from Martin Fowler’s book Refactoring: Improving the Design of Existing Code. While the Refactoring book itself was a little too prescription oriented for my liking, the chapter about code smells was very good in my opinion. I look upon code smells as fairly common classic mistakes made in developing code that you are best advised to avoid – they are usually indications that something is not right in paradise and needs a closer look, and possibly some refactoring (i.e. clean-up) is in order. This blog entry focuses on object-oriented code smells.

Read the rest of this entry »

Posted in Java | Tagged: , , , , , , | 5 Comments »