Thanks, @simonmic . I’m glad the topic resonates. I have a similar experience; depending on how fresh I am with a library, I find myself on existing projects often just copying patterns from elsewhere in the codebase.
To me, it’s a question of cognitive load. I know this from learning spoken languages: you want the common patterns to be automatic and internalised to free up your mind for the actual conversation. I’d hypothesise it’s the same for a coding language. Removing the cognitive load of syntax frees up thinking power to focus on larger concepts and edge cases. Of course, in day-to-day development, just looking up a pattern achieves a similar result, as it’s much easier to recognise a solution than to create one on a blank screen.
The other benefit of this fluency is the ability to “code in your head”—to craft solutions and play around with ideas before typing. Most of us can probably design FizzBuzz just by thinking, and I find being able to quickly play with different approaches in my head, without the friction of typing, is a huge advantage.
On Practice and Memory
You mentioned holding things in limited human memory, and this is where I see the value of katas. I have no background in neuroscience, but my intuition is that our subconscious has a much larger storage capacity. For me, katas are a way to use conscious, deliberate practice to store patterns in that deeper part of the brain.
This storage I think has a relatively large cost when compared to simple note taking, the cost being in preparing the materials and then practicing them, This cost leads to the question: what’s actually worth the time and effort to store this informatin? What’s truly needed in the daily work of a Haskell developer?
I’ve started an experiment to create katas by feeding my own notes and code into an LLM. My hope is to refine this into something genuinely useful. It’s very much a work-in-progress; as I said, it’s LLM-generated (slop) at the moment, but my plan is to refine it through iteration. I expect to throw large parts of it out and craft new Katas by hand as I use them and assess the benefit with habitual use over the coming weeks and months. So part of me is very reluctant to share, but if you’re curious, this is the current state of it:
my early haskell katas
Lessons from a Language App
I love the game jam idea! And your point about it being “self-policed” is interesting because it brings up a lot of ideas from my experience building a free Irish language learning app.
We have a decent sample size of a few thousand users( I recognise its debateable how much cross over the domains are). We learned that having strict rules for sentence pairs made it fun and hard to game, while a “stuck button” provided a necessary release valve. We also added an EXP points system where seeing the score go up provides a bit of dopamin for motivation; we just deduct points for using hints. The point being the gamification really added a lot of motivation to a dry topic.
The biggest lesson was distinguishing between lesson types: for getting specifics right, strict typing exercises were best (simple string matching), but for encouraging people to actually speak, a simple self-assessment was far more effective than trying to technically analyze their voice. This was because of the implementation and maintence costs, building and maintaining an voice analyzer was infinetely more complex that just matching strings and it didnt provide much extra value to the user to justify it.
So, to bring all that back to Haskell, it seems there’s immense value in distinguishing between different kinds of practice:
- Strict Katas with Tests: For core syntax and patterns.
- Looser, Self-Assessed Exercises: For more complex topics where the goal is just to practice thinking about the problem.
- Simple Notes: For everything else that’s best left to documentation.
As you can probably tell, these ideas have really captured me recently! I’m really keen to explore this more, perhaps as a community effort. It would be interesting to see if there’s something tangible for the community in all this.