Examples of simple event-driven programs