Online learning with Haskell: the Mongolia Class of 2020
Reminiscing on the delivery of the first Haskell massive online course (MOOC)
21 December 2020 Alejandro Garcia 7 mins read
Here we share feedback on this year's Haskell course which we delivered online for the first time.
Saying that the Covid-19 pandemic changed the world's plans is a cliché at this point, and the same thing happened to us here at IOG’s Education department. However, what we did not expect were the new opportunities that the global lockdown opened up for us which enabled us to deliver a fantastic online Haskell bootcamp in 2020.
If you are familiar with IOG, you probably know that the Haskell programming language and its functional approach to software development are integral to the company. It is right there in the name “Input Output”. So, it is no surprise that we have invested heavily in improving the Haskell ecosystem, from contributing to open-source projects, sponsoring developers, and much more. One of our big efforts is that every year we run a Haskell bootcamp, which involves three months of intensive in-person training with Lars Brünjes, director of education, and guest lectures by some of the best developers and computer scientists in the world. So far, there have been four iterations of this class: Ethiopia 2019, Barbados 2018, Athens 2017, and one was planned for Mongolia in 2020.
The actual class takes 10 weeks of Haskell, cryptocurrency, and smart contract training that opens up new opportunities for young students that take the challenge of the course. It is not easy, the topics are hard, the homework is even harder, and the hours are grueling. Calling this a full-time commitment is an understatement, most students in the previous editions have called it the “most difficult class of their lives”.
Despite all these factors, on completion of the 10 weeks, the students come away with experience in the most state-of-the-art topics in software development: strongly typed functional programming, embedded DSL design, property-based testing, smart contract development (with Plutus and Marlowe), as well as a strong sense of pride in having achieved something truly challenging that will influence their professional lives for decades to come.
At the beginning of 2020, the Mongolia Haskell bootcamp was well on its way to taking place in March, and then, as we all know, the planet stopped. In January, the nature of Coronavirus was relatively unknown, but by March its mortality rate and its main mediums of transmission were front-page news, flights were being canceled, and later shut down completely. This made it impossible to deliver the class in person as planned. Thanks to the tenacity, or may I say stubbornness, of Dugerdorj Davaadorj and Lars, that class was going to happen no matter what. So, we had to adapt the class to the new realities imposed by the pandemic. We expected these changes to be difficult, and as any teacher will tell you, it is easier to provide feedback when you can see the students’ reactions, and it is also easier to provide an interactive education when the students can see each other, program in pairs, or even practice “swarm” development.
What we didn’t expect is that the MOOC approach would turn out to be even better in some ways than an in-person training course. For example, in the recent edition, the class was co-taught by Lars and Andres Löh from our friends at Well-typed. Andres is a highly regarded teacher in the Haskell community and has been involved with the language for over 20 years. Basically, if you find an interesting open-source project in Haskell, Andres has probably been involved in it in some way. Then we also had guest lectures by Rob Cohen (Program Manage IOG), Joshua Miller (Project Manager IOG), and Phillip Wadler (one of the original creators of Haskell, with too many achievements to mention; his Wikipedia page is a good starting point to find out more).
Our Haskell training course started in August and as usual, there were some hiccups getting all the students settled with a proper development environment, language barriers, and some cultural differences. Basically, professors were encouraging students to ask more questions, however, in Mongolian culture students tend to work quietly only asking questions or collaborating with each other. Therefore, it was good that all the students were working together in the University lab on-site and we were very glad to have access to that facility. It was great to see that universities were open in Mongolia!
Remember, this was August 2020 with most schools closed in Europe and America, so how come the Mongolian universities were open? It turns out that Mongolia, up to that point, had recorded zero deaths from Covid-19! Let me say that again — ZERO deaths from Covid-19. We couldn’t even believe it in the beginning, but as the weeks progressed and we were able to get to know the students, we understood why. The discipline and disposition for work that our students were showing in class was the same attitude that allowed Mongolian citizens to isolate from the pandemic on January 27th. The Mongolian government took decisive actions right from the beginning, which the citizens followed precisely. We could see that while working, as everyone wore masks and kept their distance. Although the learning process was hard, students worked on many difficult exercises, consulted each other, and collaborated in spontaneous teams to encourage everyone that was participating.
The homework assignments were deployed on the GitHub Classroom platform, which allowed students to collaborate in team projects the way that professional software developers would do: committing and resolving issues in various branches in a common code repository.
As an additional benefit of the online learning environment, we were able to accept a couple of students from Mexico. This was also challenging for them as the classes were held from 11 pm until 5 am in the morning, which required a complete 10-week schedule switch for the students, as well as myself, as a reviewer.
In the end, their determination allowed them to finish the course having acquired really valuable skills and a sense of pride in the achievement itself. We want to thank the Mongolia ministry of Education and Economics for making this possible.
The feedback we received from the students was very positive, here are some comments we received from the participants:
“The course was my very first experience of functional programming. It felt like a whole new world to me and truly broadened my horizons and the way of thinking. I’m so glad that my first steps were guided by professionals. I will never be the same as before I took the class. I am very grateful; I grew both professionally and personally. I recommend it to anyone who wants to level up their programming skills.”
“After attending the Mongolia Haskell Class, I reaffirmed the beauty of functional programming. The beauty of the code makes it look so simple. I want to thank Lars and Andres for allowing me to attend your class. I admire your utmost professionalism and excitement to share your knowledge. You are an inspiration to all of us who want to become better engineers.”
“This course exceeded all my expectations. I learned so much with Lars and Andres. They are expert programmers and even better teachers. They effortlessly explained complex concepts. Now I want to develop every project in Haskell.”
As for ourselves, we are very happy with how this experiment of running a small class in a remote setting turned out, making it our first MOOC delivery. It also opens up exciting new collaborative opportunities for the education team in the future. Of course, we cannot wait to get back on the road, and get to meet these students and prospective students in real life once more, once it is safe to travel again. Hence, in 2021 we plan to run one more iteration of the class in person and one online course that is open to the world, as we continue on our journey to train 10,000 smart contract developers on Cardano. Wishing you all a happy new year as we look forward to 2021!
The IOHK education team this month released the first edition of their new Plutus ebook: Plutus: Writing reliable smart contracts. Available on Amazon and LeanPub, it's a comprehensive introductory guide to Plutus, IOHK's Haskell-based smart contract language. Haskell is a functional programming language, which means it's easier to test and less prone to human error, so anything written in Haskell -- and by extension Plutus -- is more likely to be reliable and secure. Plutus can also be used for both on and off-chain code, simplifying the development experience and eliminating errors commonly introduced in the transition between languages on and off-chain.
The new Plutus ebook covers everything from how smart contracts interact with the blockchain down to working code examples with line-by-line explanations. I spoke to Lars Brünjes and Polina Vinogradova, the main authors of the book, for more details about the book and the future plans of the education team.
Please introduce yourselves!
Lars: I am the director of education at IOHK, which means I run all our educational activities, such as Haskell courses, community videos, workshops, hackathons, books, and internal training. It's a deeply rewarding role: education is an extremely important part of our mission to bring financial services to the three billion people who don't have them. Teaching Haskell to bright young women in Ethiopia and running a Marlowe workshop in Mongolia have been unforgettable experiences for me, and I feel like I'm making a difference.
Polina: I'm a formal methods software developer at IOHK. I've worked on the formal specifications of the Cardano ledger and the wallet, but I've been doing a lot of education things recently as well. I was the teaching assistant for the Haskell course in Ethiopia, and I'm looking forward to being part of other initiatives. IOHK takes education very seriously, and I've personally reaped the benefits of that when taking internal training courses this year -- I learned a lot about testing and formal specification, and could immediately apply it to my work.
What have you been up to recently?
Polina: As the co-instructor on the Haskell course in Ethiopia, I wrote and delivered several of the lectures. It was a unique experience, and it felt like I was really helping people to change their lives. After that, I took an IOHK internal training course and taught on Marlowe workshops in Mongolia and Israel. I've been writing the Plutus ebook with Lars as well. Last year, I worked on formal methods tasks, the Shelley ledger and the wallet, but because of all the traveling and writing, I haven't had much time to work on those this year.
Lars: I've helped set up the three-month Haskell course for Ethiopian and Ugandan women in Addis Ababa, run a Marlowe workshop in Ulaanbaatar, Mongolia (and rode a camel and fell off a horse in the process) and another workshop in Tel Aviv, Israel. I've been working on the ebook with Polina, as well as developing IOHK's education strategy and working on our incentives research stream, writing Haskell simulations to illustrate and support our theoretical results.
What was the inspiration for the ebook?
Lars: The idea was to make it easier for people interested in writing high-assurance smart contracts to get started with Plutus. We tried to strike a balance between theory and practice, between background information and working code examples, to give interested readers the foundations to get started quickly. At IOHK we already know Plutus is great and we hope the book will help convince everyone else!
Polina: Besides a comprehensive step-by-step explanation of how to write Plutus smart contracts, the book also provides an overview of how accounting works in Cardano, what the benefits, goals, and challenges of smart contracts are, and where smart contracts fit into the Cardano architecture. We wrote -- and will be continuously improving and maintaining -- this book to give readers the tools not only to write the contracts but to come up with creative ways of using them.
Who is the ebook for and what will they learn from it?
Lars: The book is aimed at software developers generally and smart contract developers in particular. Plutus is basically Haskell, so familiarity with Haskell or a willingness to learn the language is important. Plutus has been created as a safer and more secure way of creating smart contracts. So everybody dreaming of writing correct and reliable smart contracts is definitely in the target audience and should have a look at Plutus!
Polina: This is not just a book for developers with Haskell experience. It's also a good read for anyone interested in alternatives to relying on third parties, such as banks or the legal system, to make sure a contract is being adhered to. Plutus offers such an alternative, where trust is instead placed on high assurance, tested and documented code. If this sounds too good to be true, check out the details in the book!
What is your favorite part of the ebook?
Lars: Hard to say -- I think the best aspect is the balance between the book's parts: theory and foundations on the one hand, easy-to-follow code examples on the other.
Polina: I would have to agree about the balance: the book includes both high-level explanations of how smart contracts work on the blockchain, as well as concrete examples of how to develop the code, with explanations at each line.
What's the next step for someone who's read the ebook?
Polina: I would suggest that if the reader feels confident about their Plutus skills, they need to think big -- what problem could this technology be used to solve? Perhaps there is some new functionality they wish was available as part of the Cardano system, and they could work on that? For example, the book mentions two Plutus use cases: introducing special kinds of (non-fungible) tokens onto the blockchain, and a custom policy for signing off on spending -- ideas like these.
Lars: I firmly believe that to learn something you have to actually use it and -- ideally -- teach it. So the next step should be to use Plutus, to work on an exciting project and implement a couple of smart contracts yourself. Then go one step further and try to explain Plutus to others, at a meetup, for example.
What other education initiatives are going on at IOHK?
Lars and Polina: We are preparing the next Plutus and Marlowe workshops, as well as the next Haskell course and working on turning that into a MOOC. We're already thinking about the next book, and how to expand our department to be able to deliver more educational content worldwide.