The Completion of 30 Days of Functional Programming
Photo by Juan Davila
This past week I completed my challenge of spending 30 days diving into functional programming. It was a valuable experience filled to the brim with new or fledgling concepts. Apart from my experience with 100 Days of Code, this was one of my first forays into the increasingly popular concept of #LearnInPublic as well. In this post, I break down some of the structures that were beneficial or not to my learning process, as well as a 50,000 foot overview of the concepts learned along the way.
Approach as a medium of learning
The process of committing to spend 30 minutes a day for 30 days on one given topic was a beneficial learning tactic. It provided enough structure to catalyze and focus my learning efforts, without being overly prescriptive. Investigating functional programming had long been an item on the to learn list, but had not yet been prioritized. I definitely will be following this model for other focused learning ventures in the future.
The concept of learning in public was also beneficial to this experiment. Several tweets on the day's progress were short overview posts. However, there were also many tweets covering concepts in greater detail. Reducing a concept down to a tweet or two requires revisiting content and synthesizing lessons learned. This is a valuable part of the learning process. Additionally, I found the process of writing a blog post on roughly the lessons learned in a given week helpful for my understanding. In addition to revisiting concepts, the blog post format allowed integration of multiple concepts to achieve a wider vantage point. Seeing and writing about how it all came together reinforced the importance of earlier concepts.
Learning in Public also enables community collaboration. By completing this exercise in public, multiple people were able to step in and clarify concepts that I had difficulty with, challenge me to break down topics into a tweet, and overall push and support my learning. Overall, I found this part of the process to be highly rewarding.
There were a few things that could have gone better or are good to know for next time. First, there were several break days where I did not complete any meaningful learning time for this goal. This was caused by factors such as family outings, a mini vacation, and some times mental exhaustion. I think that this is normal, expected, and acceptable. The purpose of the experiment was focused mental learning which was achieved. In the future, I am wondering if it may be beneficial to provide built in rest days, or continue with a mindset of grace. The other item of future focus is identifying practical application ahead of time or in the process. While I completed a few code experiments and mini quizzes on what I had learned, there was less writing code than I expected. Maybe this expectation is off base given the time spent, and I expect to spend more time applying these concepts in the future.
During the past 30 days, I gained a working knowledge of the following concepts and more:
- An intro to Functional Programming -#30DaysofFP Week 1
- Functional Composition
- Pointfree programming
- A better grasp of currying and partial application
- What is a Side Effect Anyway? - #30DaysofFP Week 2
- Side effects and side causes
- Functional purity, including encapsulating side effects to the call site
- Functors and Monads - #30DaysofFP Week 3
- What comprises a functor or a monad
- Benefit of the
- Deferred application of promises using the
Now that the 30 day challenge is over, I'm focusing on what's next on the horizon. I plan to review some existing codebases for opportunities to apply functional programming principles. Notably, I have several areas in mind that seem perfect use for currying. I also want to examine which concepts are most transferrable in team environments. In talking with other developers I anticipate concepts such as
compose, functors, or monads may be a harder sell or provide less value in those contexts. However, I do want to continue to explore them further in personal projects.
I appreciated the 30 day challenge as a learning medium and anticipate doing something similar on a different topic in the future. Conversations with several developers as a which enhanced my learning experience. I fully support the Learning in Public process. More to come on that in the future.
An intro to Functional Programming - #30DaysofFP Week 1
1.5 weeks ago I set out to learn more about Functional Programming with a 30 day challenge. I started knowing little about functional programming, apart from the various array methods within… Read more
What is a Side Effect Anyway? - #30DaysofFP Week 2
Managing side effects is a core principle of functional programming. The existence of side effects can make a program more volatile, error prone, and harder to reason about. In this post, we'll dive… Read more
Functors and Monads - #30DaysofFP Week 3
Functors and monads may sound like some dark secret ingredient from the recesses of functional programming. For our purposes we will begin to approach them as data types that follow a base set of… Read more