Tuesday 16 December 2008

Improving coding practices

I am in process of taking a deep breath after releasing quite a complex piece of software. And while recovering from overdue missed and unread news I came across this article entitled "Comments == Code smell", which struck accord with me...

I like the author to challenge readers' view on the subject. Indeed when we DRY the code well enough, we have a chance that it becomes fluent and tells us all about itself. There are many reasons mentioned to why define fine names for your methods. Another one is to make methods meaningful, in the context of the domain we deal with (BTW: I hope DSLs can help here...).


Lets take a look at this from the point of view of people who support the system making sure all questions are answered; all issues are understood. For them failure, with exposed call stack containing properly named methods, will ensure that the data flows according to the business process definition or not, cutting this way support time to bare minimum (easy to guess: no comments, especially those in line, will guide them).

Here is the space for the BDD tools to show their beautiful face. As generated code can and should remain meaningful. Helping us humans making sense out of the mess when need be.

No comments: