In many Drupal projects, theming becomes “preprocess everywhere”: very long functions, repeated logic, and Twig templates full of "if" statements. This makes the theme hard to maintain and hard to review.
In this 30-minute talk, I will show simple rules to decide: what goes in Twig, what goes in preprocess, and when to use render arrays. We will look at common mistakes (printing entities in Twig, adding “active” classes from the URL, attaching libraries only when needed) and quick before/after refactors you can apply in Drupal 10.