Writing as a learning tool: Integrating theory and practice