This was initially a long post, detailing all the manual steps required to set up a complete Haskell development environment, however, thanks to a hint by Krzysztof Cieślak, this process is now fully automated, allowing you to get started in minutes. All thanks to a Visual Studio Code feature called devcontainers, supporting running the development environment in a Docker container.
Functional Programming in Haskell - Stepik course notes - module 2
This is the second module (out of 5) of my English summary of the Haskell MOOC on Stepik, available only in Russian. Read the first part in the Introduction module.
- Introduction
- Programming fundamentals (this page)
- Lists
- Data types
- Monads
Functional Programming in Haskell (Stepik course notes) - module 1
There’s a fantastic free online course (MOOC) for the Russian-speaking developer community on Stepik for learning Haskell - a two-part course titled Functional Programming in Haskell by Denis Moskvin, (then) associate professor at the St. Petersburg Academic University. I recently re-watched the course (having completed it previously) and decided to take notes and summarize the course content in English for your enjoyment.
I would like to thank Denis Moskvin for providing this amazing resource for free, and urge you, if you speak Russian and want to learn Haskell, to work through the course material and exercises!
Below is the summary of the first module, Introduction, out of 5.
Right fold superpowers!
It’s amazing how sometimes just having a different framing of the problem helps with developing a much deeper understanding of the problem. I was working through the exercises of the Data61 Functional Programming course, assisted by Brian McKenna’s video streams, and I came accross a definition of a right fold that can be thought of as “constructor replacement”:
The expression
foldr f z listreplaces inlist:
- Every occurence of the cons constructor
(:)withf- Any occurrence of the nil constructor
[]withz
Becoming Foolish
The book The Pragmatic Programmer: From Journeyman to Master by Andy Hunt and Dave Thomas suggests that as developers, we should “learn at least one new language every year.” (pg. 14)
When I recently asked a roomful of developers, if there’s anyone who had learned a new language this year, only very few hands went up. A year ago today, that would have been me in the audience, keeping my hands down.
From .NET to Scala and beyond: a journey to Functional Programming
Original title was “Monads solve a problem you might not have, but it’s a nice problem to have”, which is an homage to a great post by Krzysztof Koźmic about IoC containers.
I can’t think of another 5-letter word that strikes fear in the hearts of so many developers, coming from an object-oriended/imperative language to a functional one. So much so, this, and other M-words are outright banned on some resources.
This post will not attempt to explain monads, at least, not on purpose. This fantastic post by Max Kreminski does this better than I ever could - by showing that most “monad tutorials” (or, educational blog posts in general) have problem-solution ordering issues. Please take a moment to read this wonderful post before continuing.
Enough!
Layered architectures were good, until they weren’t. Someone said ORMs, and we were tearing out our SQL statements in favor of magic.
ORMs were good, until they weren’t. You couldn’t use the generated entities in your presentation layers, because they knew too much. Someone said DTOs.
Wanted: a maintainer for Agent Mulder (and other ReSharper plugins)
Sometime in 2011, I’ve seen a cool feature of Castle Windsor IoC container - the ability to create typed factories based on an interface, without any implementation. That day I realized 2 things: a) containers are magic, and b) such magic would never be allowed in production.
Mac survival guide for the Windows lifer
I recently started a shiny new job, and got a shiny new Macbook Pro to go with it. Having spent most of my personal and professional life on Windows, I knew that an adjustment period would have to follow. Below are my impressions, the good, bad, and the ugly side of adjusting to One Cupertino Way after a lifetime on Windows.
Getting with the times: migrating from WordPress to GitHub Pages with Hexo
I was finally able to migrate from WordPress to a gorgeous, static, and blazing fast blog, hosted on GitHub Pages for free. Here is a recap of what I did, starting with exporting all data from WordPress, and finishing with setting up an automatic publishing with AppVeyor!
Let’s begin!