Activity 01
Gallery Walk: Code Smell Identification
Post five code samples around the room, each demonstrating a different code smell (long method, duplicate code, magic numbers, deeply nested logic, poor naming). Student groups rotate and annotate each sample with the smell they identify and a suggested fix. Debrief as a class to build a shared catalog of smells.
Explain the purpose and benefits of code refactoring.
Facilitation TipDuring the Gallery Walk, circulate with a checklist of common smells so students practice looking for concrete patterns, not just general opinions.
What to look forPresent students with a short code snippet containing 2-3 common code smells (e.g., a long method, duplicated code). Ask them to identify the smells and write one sentence explaining why each is a problem.