I'm a tech team leader on a team of about 5 developers. The team size is somewhat dynamic as team members periodically leave for other projects and others join the team from other projects.
Periodically I stumble upon my team members' code, either when making modifications to it, writing something nearby, or just reviewing their code. Sometimes (often enough to write this post, I guess) their code is poorly written, with either small mistakes (like converting two Date objects to strings in order to compare them) or larger ones (writing 2+ almost identical medium-to-large sized functions with only one line differences, instead of one function that can handle both cases.)
What's the best way to improve their skills and point out these mistakes to them? Sometimes I go over these segments of code with them, explaining why they should be written differently. But I don't want to be nitpicky and have them come over too often to review their code. Are code reviews the answer here? If so, how should they be organized? Should they include all team members or be individual? How often should they be held? Any other advice?
There is another question that reads similar, but it is actually different, because in addition to being curious about code reviews, I'd also like to know of other possible ways of improving my team members' coding skills. Also, deadlines don't play a role in my question because we can easily review and/or fix the code either before or after an upcoming version delivery.