How would you migration from one frontend tech to Elm? Either you do a full re-write which might take a lot of effort and cause lots of problems down the road. Or given you can write small components in Elm and embed them in your current app, you change your app bit by bit until it eventually becomes an Elm app. Riccardo Odone describes just that: selecting a single component to rewrite in Elm inside the Angular app, then one more, and one more, until you have too many independent Elm apps inside Angular. Then merge these apps into one to eventually have an Elm app with some Angular code sprinkled here and there.
More blog posts are coming out after the Elm Game Jam. Here Wiktor Toporek is sharing his journey and explanations how he created "Is it my cow". You are shown a cow with specific pattern of black spots, and then are presented with multiple different cows among which you have to spot the one you were shown initially. Wiktor iterates through the various approaches he took for random pattern generation:
1. Use random points inside a constrained region and connect them together. That works but the result doesn't resemble the pattern cows normally have
2. Go clockwise and generate points with random distance from the circle center. It works, but creates limited patterns constrained to a circle.
3. Come up with something else...
Wiktor also explains how one would use the sharp angles and smooth them to get a more realistic-looking cowhide: Centripetal Catmull–Rom spline.
Eliza Mitchell has shared a very detailed journey on how she first started with Elm, she built Pokédex - a database for searching Pokemons.
Overall, when working with Elm, apart from the new architecture, you will find that you don’t always need to know bucketloads about functional programming. In a lot of ways this is great! You can just get up and running with it. Occasionally, though, there are inklings that leak through … like random numbers or HTTP requests, which are two examples you’ll see in my demo app.
this is very similar to my experience. Most of my experience is with Python and React, and some C and Java before that. I am glad that my first foray into functional programming was with Elm and resources like Elm Programming which make the introduction to both such a joy.
Ryan has released version 5.0.2 of elm-spa which is a framework to build single-page apps in Elm. If you're just getting started and want to build a simple page in Elm, in my opinion this is a go to tool to do it. There is no changelog to see what has been changed between the releases, but looking at the code it looks like most of the changes are structural. I might state the obvious here, but the reason why I love open-source software is that you can always take a look inside and see how things works. There is so much to learn from the code of elm-spa.
Quote of the week
I am currently reading "Genome: the Autobiography of a Species in 23 Chapters" by Matt Ridley. While the book is 21 years old, it still has a lot of foundational knowledge. Here's a short quote from it:
I think knowledge is a blessing, not a curse. This is especially true in the case of genetic knowledge. To understand the molecular nature of cancer for the first time, to diagnose and prevent Alzheimer’s disease, to discover the secrets of human history, to reconstruct the organisms that populated the pre-Cambrian seas – these seem to me to be immense blessings.