rpearce / ramda.guide

Ramda Guide
https://ramda.guide
BSD 3-Clause "New" or "Revised" License
11 stars 0 forks source link

Introducing Ramda at work #14

Open twilson63 opened 3 years ago

twilson63 commented 3 years ago

I think it may be worth diving into why FP, and why Ramda with maybe some pros and cons

https://github.com/rpearce/ramda.guide/blob/main/src/book/introducing-fp-at-work.md

You may want to consider, an angle like Why FP for a dev team?

As humans we want to be able to do more with less in everything we do, so we design abstractions or black boxes that give us a simple application for complex technology. Then users can leverage the functionality that is complex without having to know how it was built or how it works. Think microwave, automobile, etc. With stratified design, we can accomplish the same thing with our code, using tools like Ramda enables us to write general code at a different layer or strata than using primitive language building blocks. And by using this layered approach, makes our higher functioning business logic less brittle over time. As language semantics change, our higher level code is more resilient and less complex, because the complexity is abstracted into small building block functions that are combined. This creates a very declarative style of coding with libraries like RamdaJS. The result is a more efficient approach to maintaining your products over time.

Others might argue this comes with a learning curve, and it is true, you do have to learn some new terminology which can be frustrating at first, but the effort starts to show in team productivity and efficiency, because you are communicating at a higher level. It is like moving from boiling water every time you want a cup of coffee to using a keurig, if you can save 15 minutes for every cup and have a fresh cup of coffee on demand the additional cost is worth the result. I think development teams should consider the additional cost to learning a tool like Ramda, versus the over all efficiency they create and enable by focusing more on the problems of the business.

Anyway, this may be too much to discuss in the guide and the audience may already understand the benefits, but I wanted to make the suggestion.

rpearce commented 3 years ago

I will ponder this fully in addition to the small, technical "how". This is great