When starting to learn oTree, you may face uncertainty about where to put a particular piece of code. Should it go in before_next_page, after_all_players_arrive, creating_session, etc? Should it be a player, group, or subsession function?

Here is a quick guide comparing these various functions.