Activity 01
Think-Pair-Share: What Changed When You Mixed Concerns?
Give pairs two versions of the same program, one that mixes UI and data logic, one that separates them. Ask each student to add a new feature to their version, then compare how much code each had to touch. Discuss why the separated version required fewer changes in unexpected places.
Explain the principle of 'separation of concerns' in software development.
Facilitation TipDuring the Think-Pair-Share, provide a concrete before-and-after code snippet so students have a shared reference point for discussion.
What to look forPresent students with a short code snippet where concerns are mixed (e.g., UI logic directly manipulating database queries). Ask them to identify at least two distinct concerns that are tangled and explain why this mixing is problematic.