Why write clean, refactored code?

Posted by Shamal Karunarathne on Programmers See other posts from Programmers or by Shamal Karunarathne
Published on 2011-02-22T08:21:57Z Indexed on 2011/02/22 15:32 UTC
Read the original article Hit count: 299

Hi programming lovers,

This is a question I've been asking myself for a long time. Thought of throwing out it to you.

From my experience of working on several Java based projects, I've seen tons of codes which we call 'dirty'. The unconventional class/method/field naming, wrong way of handling of exceptions, unnecessarily heavy loops and recursion etc. But the code gives the intended results.

Though I hate to see dirty code, it's time taking to clean them up and eventually comes the question of "is it worth? it's giving the desired results so what's the point of cleaning?"

In team projects, should there be someone specifically to refactor and check for clean code? Or are there situations where the 'dirty' codes fail to give intended results or make the customers unhappy?

Do feel free to comment and reply. And tell me if I'm missing something here.

Thanks.

© Programmers or respective owner

Related posts about java

Related posts about refactoring