At monday the author attended a process related session about Kanban and that’s the reason tuesday should be about my other passion: programming. Within our company we already have focus on functional programming languages and with our knowledge events I learned a lot. However, I never made time to do some actual functional programming myself. Besides, I love the principles of reactive programming and also believe that it’s already applicable and will be applied more in the near future. Those are the reason’s I chose “Functional Programming in JS with focus on Reactive Programming (Rx in JS)” hosted by Jafar Husain from Netflix.
Well to summarize: I wanted to go handson and that’s exactly what I got! The session started with: Go to http://jhusain.github.io/learnrx/ and let me know if you have any questions…. And I had some…
The first couple of exercises are about applying and learning the basic concepts of functional programming with map, filter and mergeAll. When every attendee finished excercise 12, Jafar clarified what we learned so far with a couple of key points:
- – “The future of computing is describing WHAT we want to do, not HOW” referring to the difference between writing down code to loop over a collection versus only describing what we want from the collection.
- “With functional programming you write code, you come back two years later and it will run faster” making a key point to the fact of parallel and concurrent programming and that the computer itself wil best know in which runtime conditions it’s in.
- There is no need for a gargage collection; this is garbage collection on steroids meaning that someone or something else manages the state and you don’t need to be bothered with it and only think about what you want.
During the first 12 exercises I got the concepts but also experienced how frustrating it can be if you don’t know a language good enough to write down the concepts your thinking about because you’re wondering where to put the semicolon. Besides, at first I found it challenging to deal with these kind of deep collections and keeping up how far in a collection I am. Something Jafar as well referred to as one of the issues people face when starting functional programming.
In the afternoon Jafar started with a presentation about how the core concepts we learned this morning (about functional programming and collections) aren’t any different then asynchronous event handling. Bottomline is that events are actually an unlimited collection source over time. This was introduced very well by explaining design patterns such as the well known Observable pattern.