Learning Python Week 13 — Beginning the functional programming journey
I spent a lot of time working on problems in CheckIO, than on reading. I enjoyed this process a lot. Also CheckIO kept prompting me to review others’ solution and give comments on the how their code can be improved. Reading others’ code is a different skill than writing my own code. I used to be amazed at how the Python pros have solved the problems that are showcased there as best solutions. But even new and inexperienced python programmers like me approach and solve the problem in a variety of ways. It takes a lot of effort to understand what the programmer is trying to do — as I have not seen anyone writing any comment to explain what they are trying to do. But finding ways to constructively criticize others’ code is a skill that takes not only patience and empathy but also quite a bit of critical thinking and problem-solving. Overall, I am blessed to be part of the CheckIO community.
CheckIO also inspired me to do something else — as I was reviewing some of the clever one-line solutions, I was beginning to see certain patterns that I could recognize as a functional approach to writing code, rather than the typical step-by-step imperative approach I was using as a default. Though reading a one-liner using functional approach took me a lot of time, once I see the beauty, it is so satisfying. I wanted to write code like this, which landed me on to this course — Introduction to Functional Programming by Barry Burd. I enjoyed this course so much that I am looking forward to reading up a few more books on functional programming.
Since I have already started on Pandas book, I wanted to finish it before I pick up something else. I loved the crisp writing style of Wes McKinney — somehow, he manages to cover things in such a fast-paced manner, but still very thorough. I decided to get an overview of the entire book first rather than working through each chapter slowly — hence, I am just reading rather than experiementing with what I am reading.
Here are the problems I have solved at CheckIO:
Sort Array by Element Frequency mission. python coding challenges - Py.CheckiO
Sort the given iterable so that its elements end up in the decreasing frequency order, that is, the number of times…
Flatten a List mission. python coding challenges - Py.CheckiO
Nicola likes to categorize all sorts of things. He categorized a series of numbers and as the result of his efforts, a…
Long Repeat mission. python coding challenges - Py.CheckiO
There are four substring missions that were born all in one day and you shouldn't need more than one day to solve them…
Sun Angle mission. python coding challenges - Py.CheckiO
Every true traveler must know how to do 3 things: fix the fire, find the water and extract useful information from the…