Duncan Malashock explains the use of mutually recursive types. In a nutshell, mutually recursive types are the ones that define each other forming a recursion, e.g.
type Person = Person Team type Team = Team Person
As with any pattern, there are specific use-cases to when one is applicable. Duncan goes on to describe a filtering system where you can search for people and teams, and you can ask questions like how many team members are there in this person's team. So you have a type
person which has a subtype
team, which has a subtype
person, and so on. The trick with this type recursion is to have a base case that can end the sequence.
While completely unrelated, reading on this topic lead me to a project called Agda, which is dependently typed functional programming language. Project's wiki has a good explanation of what it is and which purpose it servers. I am unable to understand this topic, but I am fascinated for the applications and problems that computer science is able to address.
Recently while browsing public repositories of Esri, the mapping software behemoth, and found a small webapp for uploading ArcGIS Solutions. Not only it is cool that such a large company is using Elm, but also the way the app is structured:
krisajenkins/remotedata to handle every case of fetching data via API.
In the past few weeks I've learned more on how to start using Elm in your projects without migrating the whole of the application code to Elm. I have recently read "Elm in Production: Developer Reflections After 34K Lines of Code" by Peter Chronz where he mentions how he also started with just small bits of existing projects that he could rewrite/implement in Elm. I also liked Peter's chart on learning progression which very closely resembles mine (I'm still stuck somewhere between the initial learning and productive use):
Michael Jones has shared a video where he explains how to create a simple Hangman-style game. Very beginner-friendly.
It's not often there's someone looking for Elm developers, but here's Fission is looking for a junior dev to help them update their home page. It's a contract job which and there's also an option for remote candidates.
Quote of the week
Few days ago I was going through the Hubble photos choosing one to frame and put on the wall. This lead me to spend the evening exploring the fascinating topic of cosmos, and find this quote from John MacDonald:
I think there is some kind of divine order in the universe. Every leaf on every tree in the world is unique. As far as we can see, there are other galaxies, all slowly spinning, numerous as the leaves in the forest. In an infinite number of planets, there has to be an infinite number with life forms on them. Maybe this planet is one of the discarded mistakes. Maybe it's one of the victories. We'll never know.