DEV Community

Discussion on: What is the nightmare for programmers?

Collapse
 
tolomei69 profile image
tolomei

Refactoring someones code that it's written VERY badly.... 100 in scale of hating...

Collapse
 
leobm profile image
Felix Wittmann

every code smells after a while....
I'd like to refactor others code. I first write testcases for the existing code (if no tests exist) and then I try to clean up the original code step by step.
I then always have the feeling that I have really improved something.

Important is that you really understand the "business logic" before you just throw away something you didn't understand.

Collapse
 
surajondev profile image
Suraj Vishwakarma

Yesss that's painful