What do you when you're working with someone who tends to write stylistically bad code? The code I'm talking about is usually technically correct, reasonably structured, and may even be algorithmically elegant, but it just looks ugly. We've got:
- Mixture of different naming conventions and titles (
CAPSall applied more or less at random to different variables in the same function)
- Bizarre and inconsistent spacing, e.g.
Functioncall (arg1 ,arg2,arg3 );
- Lots of misspelled words in comments and variable names
We have a good code review system where I work, so we do get to look over and fix the worst stuff. However, it feels really petty to send a code review that consists of 50 lines of "Add a space here. Spell 'itarator' correctly. Change this capitalization. etc."
How would you encourage this person to be more careful and consistent with these kinds of details?