We describe COGNITIO, a computational theory of learning and cognition, and provide evidence of its psychological validity by comparing the protocols of a student learning to program in Smalltalk against a COGNTTIO-based computer simulation of the same. COGNITIO is a production system cognitive architecture that accounts parsimoniously for human learning based on three learning mechanisms: schema formation, episodic memory, and knowledge compilation. The results of simulation support the validity of COGNITIO as a computational theory of learning and cognition. W e also draw some implications of COGNITIO for the teaching of complex problem solving skills.