Why write clean, refactored code?
- by Shamal Karunarathne
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.