The Four Phases of Learning to Code