Re:Signs that you are a bad programmer
by Davertron on Wednesday October 19, 2011 @04:29PM
(#3131914)
I find this is one of the things I struggle with the most. I definitely "refactor" code by moving it to a subroutine sometimes purely for readability's sake. I also try not to stress out about how reusable something might be until I actually NEED to reuse it. Otherwise it often seems like "premature optimization" trying to generalize a routine that I'm not even sure will ever get used anywhere else.
[ Parent
| on HN ]
In my experience, the drive to make things reusable from the start ends up delaying projects to a point where they might just not get done.
I also refactor for the sake of readability (and urge my co-workers to do the same). Of course, this might mean I'm a bad programmer and I shouldn't ever get 6 levels deep in logic in the first place...