Wednesday, April 16, 2014

Bad Code: Don’t abuse instances

Here we are creating a car object to create another car object, we could have used a static method for this.
This bad code is not only inefficient but quirky and cumbersome. it makes you wonder about the original authors intention. A good code should make its intentions clear by using right amount of clear comments and good names.