How many people know who Justin Kan is or what Justin.tv was about? Weirdly I do remember the moment it launched. It was a service where initially Justin, and later anyone could stream their lives 24/7. That sounded really weird and strange, but at the same time it was something completely new and intriguing. As the service evolved, it spun off TwitchTV which many people know already - a game streaming service. Much later I met Justin Kan on one of the Hacker News events in London by which time he was already a serial entrepreneur and a parter at Y Combinator.
Until just few weeks ago I thought of Twitch as purely a service where people watch and stream games all day long. And to my surprise, it is a bit more than that. You can watch travel & outdoors streams (including how someone is waiting for their PS5 to arrive), pretty awesome makers & crafters streams. And of course technology where, among others, you can watch people do live coding. D'oh, one might say (which is my reaction for most of those videos too), but actually some of those are really interesting.
I found this video by wondible where he tries to understand how
Json.Decode works by re-implementing it himself. Now the way I would do it is learn about parsing, have a look at the current implementation, and write my own. No idea if that flow would yield any meaningful results though. What's cool about other developers streaming their work is that you can follow their line of thought, how they research information, make mistakes, try different solutions, and iterate. While the video is pretty long and for an older version of Elm, it's value in the way its author thinks, at least imho. For other streams have a look at his YouTube and Twitch accounts.
This newsletter wasn't meant to be an ode to Twitch though, but I did find something really useful there. On the topic of sharing your thoughts and experience, Jezen Thomas writes how he builds Elm apps using an example of a multi-step form. If you're learning Elm, you've definitely thought about the size of your file, about the huge types consisting on many messages. Have a read (or for a longer version watch Evan's The life of a file presentation).
As I was getting myself familiar with Elm and functional programming, I got really puzzled by the way you generate random numbers or get local time. Why does this need to be so complicated? Why can't you just
let randomInt = Random.generate in... and move on? Turned out there's a concept of pure functions. And Tyrone has written a very nice and beginner-friendly post about using tasks and generators in Elm to mimick a thinking opponent in a game. If you read the post until the very end, you'll see that he also offers pair-programming sessions to anyone willing to improve their Elm skills and contribute to an open-source project. How awesome is that!
Having a newborn (or a dog) means you have long daily walks. And this is the time I listen to different podcasts. Today I listened to an episode discussion game theory, and how it was pioneered by John Von Neumann and Oskar Morgenstern. So I wanted to finish this week with a quote from John about pseudo-random numbers:
The sciences do not try to explain, they hardly even try to interpret, they mainly make models. By a model is meant a mathematical construct which, with the addition of certain verbal interpretations, describes observed phenomena. The justification of such a mathematical construct is solely and precisely that it is expected to work.
Have a greate week!