Issue #31

When React hooks came out, it coincided with me starting to work on shipit with a friend. Instead of using Redux and some other big libraries, I opted for hooks and context API to build a subset of that functionality that would be sufficient for us. I went through the Redux documentation to learn about its internals and this is when I found it mention Elm, right there with bold letters in the prior art section. It sparked my interest into the language and resulted in learning more about functional programming, experimenting with Elm, building few small personal projects, and ultimately 31 (including this one) issues of Elm Bits.

Ossi Hanhinen has written, what reads like an ode, an introduction (or maybe a comparison, or even both) to Elm for people familiar with React, Redux, and TypeScript. Having read that blog post I think this would have made a similar effect on me as the Redux documentation I mentioned above.

Following that great intro from Ossi, there's a discussion of pros and cons of the language, the ecosystem, tools, and governances of Elm on Reddit. While it is somewhat biased since the majority of people in /r/elm are people who like the language and use it, the amount of comments and stories is large enough to get a good understanding of what to expect if you were to use Elm at work.

With a little "clickbaity" title "From Angular v1 to Elm in 4 Days" from Riccardo Odone, he continues a six-part series on migrating their Angular app to Elm. The whole series details what it's like to move from one tech to another, and unsurprisingly Elm makes this easy. Re-write one component or page in Elm, then another, and little by little you've moved everything to it.

I had a bit of a hard time with Maybe initially. Took me a while to figure out how to write code that should have a single if without the corresponding else. The moment you understand the concept, Maybe becomes the new Goto until you learn new tricks of the language. When designing a loading screen you might be inclined to use Maybe to indicate whether your data has been fetched or is still in the process. This is simple enough with just one or two resources, but the more you need to load, the bigger the number of states you have. Seiya Izumi has built elm-multi-waitable to solve just that. Take a look at the article where he describes what exact problem it solves, and how he came to it.

Jeroen Engels and Dillon Kearns have released another episode of Elm Radio Podcast. In this one they talk about testing, test-driven development, fuzz testing, tools, and resources to help you with that. A while ago I did a special issue all about testing that might need a re-visit to keep it up to date.

Ty Tracey did an interview with Richard Feldman where they talked about Elm. They covered a range of topics. Easy to listen on the road.

To finish off this week, here's a great quote from Isaac Asimov about learning:

When people grow wise in one direction, they are sure to make it easier  for themselves to grow wise in other directions as well. On the other hand, when they split up knowledge, concentrate on their own field, and  scorn and ignore other fields, they grow less wise — even in their own  field.

Just like learning new spoken language has made me appreciate other cultures more, has also helped me speak better in my own native language. Reading diverse literature from authors all around the world, not just the famous European or US ones, but also books from Latin America, Africa, and parts of Asia, opened my eyes on the problems and life in distant parts of the worlds, similar to what travelling does. Learning functional programming likewise makes me a better engineer by introducing new concepts that I can use in other areas of my job.

Have a great week!

Show Comments