Do statements like "A monad is just a monoid in the category of endofunctors" intimidate or confuse you? Then you are not alone. Fortunately, you don't need to understand what an endofunctor is to utilize the powerful concepts behind functional programming.
Functional programming (often abbreviated FP) is a programming paradigm. It advocates for the use of building software by composing pure functions to avoid shared states, mutable data, and side-effects. This is different from object-oriented programming, in which data is contained in objects and colocated with methods that act on it.
After a deep dive into the world of FP, the workshop turned its focus to async operations. Aysnc is short for "asynchronous", a term used to describe how data flows through a computer program. In synchronous programs, you wait for something to finish before moving on to another task, which could cause an entire application to freeze while waiting for an operation to complete. However, when you execute something asynchronously, you can move on to another task before it finishes.
Those who are familiar with async will also probably be familiar with another term: callback hell. If a program needs the result from a method to continue its operations (a dependency), the conventional way to "freeze" the computation and have the "rest of it" execute later (asynchronously) is to put "the rest of it" inside a callback. However, with multiple dependencies that can often end up looking like this:
Code like the above example is intuitively difficult to read, even for experienced programmers. This makes it harder to follow, harder to refactor, and harder to test. It’s ultimately costlier to maintain and more likely to have bugs.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form