It wasn't that long ago (about 6 months or so) that I wrote in the description for a talk I was giving in New York City that though I kept trying, I "still can't write Haskell." I wasn't joking at the time, or being coy - I couldn't put even a simple program together. Since then, I've turned a bit of a corner and have made modest progress working on an "Intermediate" level Haskell program involving nasty State Monad bits, Networking and disk persistence, not to mention a lot of brow scratching and internal trauma and anxiety.
People have asked me a few times "how I learned" or have asked me for recommendations for how they should learn the language. Since I took what I think is a very conventional but not often discussed path to "competency" with the language, I figured I'd write it down so people can learn from it.
Also, though this post is not a conference talk, it was partially inspired by the following tweet, in that I hope it exposes to you just how long it has taken me to do even basic things and how that is okay:
at future conferences I'd love to see some *men* talk about their vulnerability and impostor syndrome— literally santa (@jennschiffer) December 11, 2014
I put together a rough time line of how I "learned Haskell." It covered about 3.5 years worth of time during which I purchased ~4 books on the subject, asked for countless hours of advice and help from people on the internet and in person, and repeatedly try to make progress on even the most basic non-trivial programs I could think of. I thought I would publish that time line and fill it with things like key conversations I had with people or little insights I had, but then I realized that that was pointless. Let me explain.
The first documentation I could find of me messing around with Haskell at all was a little more than 3 years ago:
Also, Haskell is very intriguing.— mrb (@mrb_bk) November 3, 2011
The point I wanted to get across with the incidental nature of the time line that I threw away is that the only thing that helped was passing time. It's not true that "every time I tried to learn" it got easier, because how I was trying wasn't consistent. The reason why learning a language like Haskell is hard is because there is a hell of a lot to learn.
Another reason to not publish a time line about how I learned a specific language is because in reality, it's not at all that interesting. What the world needs is more posts encouraging people to forge their own paths and try, try, try to achieve the very challenging goals that they're setting out for themselves. It doesn't matter if it's learning an "academic" language or something more "practical" - the lesson remains the same.
When I first started learning, I tried to mess with things I knew well, like parsing binary formats, or things I needed, like a fast little git application, or things I loved, like visual art or music processing. I tried networking, distributed programming. I tried to build from the bottom up. I tried to start from the top.
I tried everything I could think of and was frustrated over and over again. The tool chain was complicated, error messages made no sense. I didn't know how to put basic things together and I struggled again and again. I knew what I wanted to create but was unable to. I lacked the knowledge and the ability.
I repeatedly felt like I had no idea what I was doing, and I wasn't getting a whole lot of positive feedback in my attempts in general. The only thing that kept me going was wanting to be able to do this thing that I didn't know how to do. Though I couldn't even carry on a basic conversation about the language in person, I sought people to chat about it with. Though I couldn't understand the type errors, I tried to type check my simple programs.
I tried over and over again to turn my self doubt into a pure functional program, and eventually, it clicked.
So I have come to the conclusion that the only thing that works is time and repetition, and that may seem daunting, but guess what? Time is passing. You're learning Haskell right now. Or anything else you want to, for that matter.
P.S. I'm anticipating that some clever people will come to the conclusion that if I had only tried to "learn the language properly," I would have had an easier time. My response is: if that's your conclusion, you're missing the point.