3 ms·
First, be polite. Actually, I've found this to be a useful mantra for all things business-related. Next, realize that if it works, the developer may consider
by HeyLaughingBoy 12y ago
First, be polite. Actually, I've found this to be a useful mantra for all things business-related.
Next, realize that if it works, the developer may consider it done. Many organizations don't see maintainability as an important goal and stop at functionality.
So, with those two things in mind, I'd suggest to the developer to keep functions small (do you have a coding standard?). Show him how the logic can be refactored (a surprising number of good developers never think about refactoring).
Next, consider that you may be imposing your personal preferences on him. Does your team as a whole generally follow the practices that you are telling him? I find that this can be a difficult topic in code review: of course I want everyone to do things the way I do them, but I have to stop short of trying to create little "mini-me's"
tl;dr: be nice, point out how the rest of the team codes, suggest a rewrite based on the concepts you bring up.