I think Gambonanza, a roguelike deckbuilding chess game, fits into the former quite nicely. Now, I'm not going to explain ...
Not everyone will write their own optimizing compiler from scratch, but those who do sometimes roll into it during the course ...