Mercury Engineering reveals their intensive 'Learn Haskell by Exercises' program that transforms complete beginners into proficient Haskell developers in just ten business days through an innovative exercise-driven pedagogy with layered feedback systems.
Mercury Engineering has developed an unconventional yet remarkably effective approach to teaching Haskell, a language renowned for its steep learning curve. Their 'Learn Haskell by Exercises' (LHbE) program immerses new hires—from interns to senior engineers—in a ten-day intensive that takes them from basic syntax to advanced monad transformer stacks, all without traditional lectures or textbooks.
The Exercise-Driven Revolution
At the core of LHbE lies a fundamental pedagogical shift: active practice supplants passive learning. The program consists of ten carefully sequenced exercise sets, with learning emerging not from reading materials but from doing. This approach stands in stark contrast to conventional programming education, which often emphasizes theoretical understanding before practical application.
"You wouldn't learn how to play the piano solely by reading books," the Engineering Training team explains. "You need to actually sit down at the keys, practice, run into trouble spots, make mistakes, and adjust." This philosophy extends to their skepticism of extended prose materials. What began as supplementary reading evolved into optional resources, then eventually was removed entirely when outcomes improved without it.
Curriculum Architecture
The LHbE curriculum progresses systematically from foundational concepts to sophisticated abstractions:
- Set 1: Basic syntax, type signatures, and higher-order functions
- Set 2: Program structure, type reasoning, and Maybe for error handling
- Set 3: Algebraic datatypes, pattern matching, and JSON handling
- Set 4: Typeclasses, constraints, and testing methodologies
- Set 5: Record syntax, accessor functions, and database modeling
- Set 6: Either for richer error handling, type applications, and parsing
- Set 7: Foldable structures, evaluation differences, and Functor
- Set 8: Applicative operations and type design principles
- Set 9: Monad fundamentals and typeclass hierarchy
- Set 10: Monad transformers and stack design patterns
This structured progression allows learners to reach complex concepts like monad transformer stacks within just ten business days, a timeline that would seem nearly impossible in traditional educational settings.
The Mentorship Ecosystem
Central to LHbE's success is its one-on-one mentorship component. Each learner meets with a dedicated mentor for thirty minutes daily, creating a personalized learning journey. The mentoring approach follows Socratic principles, with mentors trained to ask probing questions rather than provide direct answers.
"The worst mentor behavior is 'stealing learning'," the team notes. "This is incredibly common, even among mentors who think they aren't doing it. It's like going to a gym and helping someone else lift their weights, or picking up a friend's controller in a game and beating a boss for them."
Mentors focus on developing metacognitive awareness through questions like:
- "What's the type of x? How can we prove that?"
- "Where can we look to see that?"
- "How can we become more sure?"
These questions shift the focus from merely getting correct answers to developing robust reasoning processes.
Layered Feedback Hierarchies
Perhaps LHbE's most innovative element is its multi-layered feedback system, designed to create rich learning environments at every stage:
Real-Time Feedback Hierarchy
- Immediate: Continuous typechecking with tools like ghciwatch, with compiler output always visible
- Less than 15 seconds: Leveraging type error messages and typed holes for precise feedback
- Less than one minute: Strategic use of Hoogle to investigate unknown types and functions
- Less than five minutes: Targeted LLM queries for broader questions
- Less than 15 minutes: Mentor consultation after exhausting other resources
This hierarchy creates increasingly broader feedback loops while maintaining efficiency, teaching learners to diagnose and solve problems systematically.
Checking Hierarchy
Beyond real-time feedback, LHbE implements multiple verification layers:
- Typechecker: The first line of defense against incorrect implementations
- Tests: Automated correctness verification beyond what types can catch
- LLMs: Optional style and efficiency review after completion
- PR Review: Architectural feedback and deeper conceptual discussions
Metacognitive Feedback
The deepest layer of feedback targets learners' thinking processes themselves:
- Thoroughness: Developing habits of self-verification and continuous improvement
- Type Reasoning: Emphasizing that "the answer to 'how should I think about Haskell code?' is 'by reasoning with types'"
- Curiosity: Cultivating the instinct to investigate unknown constructs through Hoogle
- Transparent Uncertainty: Encouraging learners to acknowledge knowledge gaps
- Agency: Fostering responsibility for one's own learning journey
Outcomes and Implications
In the past six months, Mercury has run LHbE with over 50 learners, achieving remarkable results. The program's success challenges several assumptions about programming education:
- Complexity vs. Time: Haskell's notorious difficulty can be overcome with appropriate pedagogy
- Theory-Practice Gap: Practical implementation can precede theoretical understanding
- Individual Differences: Prior Haskell knowledge matters less than learning approach
- Resource Efficiency: Intensive mentoring can be more effective than extended passive learning
The approach suggests that programming education might benefit from reconceptualization—not as the gradual accumulation of knowledge, but as the development of problem-solving skills within rich feedback environments.
Broader Educational Implications
Mercury's methodology extends beyond Haskell instruction, offering insights into effective technical education more broadly:
- Structured Struggle: Productive difficulty accelerates learning when properly scaffolded
- Contextualized Problems: Learning sticks better when grounded in realistic scenarios
- Linear Progression: Simplified paths can reduce decision fatigue and maintain focus
- Mental Model Construction: Abstract concepts emerge from concrete examples
- Feedback Saturation: Learning accelerates in environments with abundant, layered feedback
As the Mercury team notes, "the quality of your mental models can make a huge difference" in our "pervasive partial-knowledge environment" where programmers constantly operate with incomplete information.
The LHbE program represents not merely an effective Haskell curriculum, but a potential reimagining of how complex technical skills might be taught in the modern software development landscape. By prioritizing active practice, structured struggle, and rich feedback environments, Mercury has created a template for accelerating technical proficiency that challenges conventional wisdom about learning timelines and educational approaches.
Comments
Please log in or register to join the discussion