How to Learn Haskell in 10 Minutes a Day
Learning any programming language is hard at the beginning. Especially if you have been writing in Java or Python your whole life and suddenly decide to switch to functional programming languages. When you start studying Haskell, you have to learn a lot of new concepts. This is hard work. You literally learn to program again.
However, if you’re an absolute beginner, you have an advantage. FP is hard only because it’s so strictly opposed to what every programmer is used to in their work. By itself, functional programming is completely logical.
To help you dive into the world of FP, today we will share useful resources that can help you become a Haskell developer even if you have zero experience in functional computing.
How to get started with learning Haskell?
We advise to balance these three components:
- Theory. Anyone can get it from books or the Internet;
- Interaction. No book is perfect. After reading, you always have questions left. An online course where it’s possible to ask a professor or other students for aid helps a lot;
- Practice. In online courses, they usually ask you to write some code. Also, today there are plenty of platforms where you can train your programming skills. But more about that later.
Anyway, our point is if you’re going to read a Haskell manual for 10 minutes a day, you aren’t going to become a programmer even in a hundred years. But if you combine reading a manual with watching at least 10 minutes of video courses daily and doing 10 minutes of real coding each day for a couple of months, at the end you will be able to program something valuable in Haskell.
Learn Haskell: the best resources for beginners
Books are certainly useful, but don’t get too obsessed with theory.
1. Learn You A Haskell
What it is: An online manual which debunks the myth that learning a programming language should be boring.
What will you learn: Everything that a Haskell beginner needs to know – types, composing functions, doing I/O, functors, monads, etc. Unfortunately, there are no exercises involved so you will have to find them elsewhere or invent your own.
Price: Free, but if you would like to support the project, purchase a hard copy of the book on Amazon for $32.
2. Haskell Programming From First Principles
What it is: Haskell Programming is about the most important principles of functional programming by someone who understands your pain.
What will you learn: The authors explain FP clearly enough for people who have never programmed before. It’s an inspiring guide from the practitioners that reveals the benefits of Haskell over OOP languages in production. People in Goodreads say it’s the best book about programming they’ve ever read.
Price: You can check out the contents and the first chapters for free on their website or purchase the book for $59.
3. Get Programming With Haskell
What it is: An approachable introduction to both Haskell and functional programming that some suggest as the best and most up-to-date introduction available right now.
What will you learn: Haskell! All the beginner stuff: manipulating types and functions, I/O, monads. The book ends with a couple of practical projects to try out.
Price: $45 for print book + ebook or 35 for just an ebook.
4. HASKELL: THE CRAFT OF FUNCTIONAL PROGRAMMING
What it is: A book suggested by the authors of “Haskell Programming From First Principles” for people with zero computing experience.
What will you learn: It introduces functional programming concepts and will teach you enough Haskell to design and write your own pet project.
Price: $60 on Amazon.
This is the stage where theory meets practice. If you don’t have time to study Haskell in university, or you are not in the right location for that, these MOOCs can effectively give you the knowledge and interaction you desire.
5. FUNCTIONAL PROGRAMMING IN HASKELL: SUPERCHARGE YOUR CODING
What it is: A course from the University of Glasgow about the powerful possibilities of functional programming languages like Haskell.
What will you learn: Nothing less than how to supercharge your coding. The course covers pure functions, types, ADTs, a few common monads and a sprinkle of formal verification. A great course to choose if you have no previous experience in FP.
6. Introduction to Functional Programming
What it is: Introduction to Functional Programming is an online course taught by Erik Meijer, a computer scientist and contributor to Haskell community. Prior knowledge of programming and computer science basics is advisable.
What will you learn: The professor will walk you through the fundamentals of functional programming, its history and philosophy. He will use Haskell to provide you with the understanding of how to “think like a fundamentalist”. Then, you will be able to apply this knowledge to mainstream programming languages.
Price: Free access but the certificate costs $50.
There are also additional courses on Udemy:
- This comprehensive course contains 74 hours of material on Haskell. Learn the basics of functional programming, Haskell type system and other neat stuff while creating a word grid game in Haskell. After that, you can watch the Mastering Haskell lectures to gain more detailed knowledge.
- This Haskell course will teach you the basics of Haskell, and that’s it. You can easily pass the course in one day as the total video length amounts to just one hour. Come here for a quick intro, and don’t expect anything else.
There are a bunch of online coding games out there. Even though nothing can beat Flexbox Froggy, these help you apply your Haskell skills in a fun way that makes the practice a little bit more bearable.
7. CODIN GAME
What it is: One of our favorite gaming platforms for programmers. You play the game but all the commands are written in your target language.
What will you learn: Get real coding experience. The game starts simple and gradually progresses to more complicated tasks.
8. CODE WARS
What it is: A platform where anyone can train their programming skills by solving tasks of different complexity.
What will you learn: You will be able to put what you’ve taught yourself into practice while enjoying the game.
9. AUTOMATE SOMETHING
Even though playing games is fun, and a very great way to procrastinate for hours, at one point you will have to build something.
Fortunately, there is a great way to get rid of existential anguish of not-knowing-what-to-build that actually achieves practical improvements in the world around you. Automate something. You know, make the computer do the boring stuff.
At this point, you should be good enough with Haskell to throw yourself into creating programs that achieve real-world results, sit for hours resolving dumb bugs, and curse the lack of documentation in most of Haskell libraries.
So get out there, build stuff that matters and suffer the consequences.
Additionally, there are some more useful materials in our blog. To start, you can read this introductory post. To those who would like to learn more about Haskell community, we recommend to check out the history of Haskell. And, of course, stay tuned to our blog for more amazing materials about functional programming!