This article targets an audience that’s graduating from functional libraries like
ramda to using Algebraic Data Types. We’re using the excellent
crocks library for our ADTs and helpers, although these concepts may apply to other ones as well. We’ll be focusing on demonstrating practical applications and patterns without delving into a lot of theory.
Let’s say we have a situation where we want to use a function called
darken from a third-party library.
darken takes a multiplier, a color and returns a darker shade of that color.
Pretty handy for our CSS needs. But it turns out that the function is not as innocent as it seems.
darken throws errors when it receives unexpected arguments! …
I love async-await and I cannot lie. Unfortunately, I don’t have the concentration chops to trace callback chains. And I’ve also had the nuances of exception handling in promises lead me to pain and ruin. Async/Await has been there for a while, and it’s becoming harder to find reasons to not use it. This article focuses on a few things I struggled to understand when I started using it
Think of an async function as a promise generator. Any value returned by an async function gets wrapped in a Promise.resolve() — unless it’s already a promise of course. …
Recently, I’ve been working with a team that has been facing a lot of quality issues. Our product has many critical workflows and regressions due to misconfigurations are frequent. We have a team of testers who depend on manual testing for the most part. It has been very challenging for them to provide thorough, app-wide regression testing. This only got harder late into the project, with the workload increasing exponentially with every new feature. Our testers had elementary experience in writing Java Selenium tests. We wanted to leverage this and provide them a seamless path to writing automated tests. …