Teacher-guided coding