4 excuses to write poor quality code

1. This module can't be unit tested, it's too [insert-adjective-here].
      • If it's too [insert-adjective-here], how do you even know it's working in the first place? And what about after we extend it with a new feature?
2. Breaking logic into methods incurs a performance hit.
      • So does inheritance, and separation into classes. Does this mean your design should consist of a single class with a single method where all business logic is placed?
3. Commenting code is time consuming and hinders development.
      • Same goes for going to the bathroom, but you don't see people skip that, do you?
4. Coding conventions are too rigid, I'll call my fields whatever I want.
      • Now that's just an excuse to write ugly code.

I guess one cannot get away with such statements without saying there are always exceptions, so here it is - there are always exceptions. I'm not talking about the corner cases you stumble across once in every who knows how long, I'm referring to the everyday coding practices which account for most of our codebase.

If you said "true that" to any of the large font-ed text - you're sitting on a time bomb, i.e, that time you'll need to change, extend, or debug your code. In a way, you're just like the fellow below. You may not have the same stylish tie, but other than that you're pretty much in the same condition when it comes to well being.


  1. I read in some forum:
    "Coding conventions are too rigid, they restrict my creativity."


Post a Comment

Popular posts from this blog

Sending out Storm metrics

Dependency Injection - The good, the bad and the ugly