Code Room
Code reviewMedium
Question
Review this Java method that renders a CSV body from rows. It works for small exports but a customer report with ~200k rows takes minutes and spikes GC.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
String toCsv(List<Row> rows) { String out = ""; for (Row r : rows) { out = out + r.id() + "," + r.name() + "," + r.amount() + "\n"; } return out;}Run or narrate your approach, then ask the coach.