4 ms·
Code that I've seen like that is usually an organic method that grew to meet additional requirements and edge cases. This seems like a great teaching moment on
by sleazebreeze 11y ago
Code that I've seen like that is usually an organic method that grew to meet additional requirements and edge cases.
This seems like a great teaching moment on how to break up 400 LOC into smaller, more understandable modules. I would encourage you to block out some time with the dev to pair program and refactor it. If you refactor it yourself and then show them, they'll never learn how to do a better job in the future.
- proksoup 11y agoI think refactor and show them could help them learn. No need to be that pessimistic is all I mean. Pairing would be better. If the employee does not have time to pair, I would still do the refactor and ask the boss how much time they will be given to review the changes (I would assume/expect they would be given many hours to do that, if it took many hours to refactor) ....