Learning and tumbling with code