(Examples include things like magic numbers instead of #defines, use of strings instead of well-defined enums, pull requests with lots of commented out code. They can also go to deeper topics, like bad database schemas or poor data access patterns.)
Why must you pick a side quickly? If you treat incompetence or inexperience as an interpersonal dispute, you aren't managing. Instead, your team will quickly view you as appeasing incompetence, and this will quickly drain morale. This is especially the case if one person should be moved to a less-challenging role, or fired.
From personal experience: In these situations the technical lead fixed the code before merge, and management eventually pushed the other person out. But, it was a long slog while management tried to be diplomatic with someone who just wasn't willing, or able, to be professional.