Coroutines make our asynchronous code look sequential. Coroutines help us escape the callback hell. Coroutines save us from the complex reactive chains.
All good, but have you ever wondered what sort of sorcery happens behind the scenes? How a particular piece of code can actually perform operations asynchronously under the hood and yet give us a feel as if everything is happening sequentially? Is it magic? (Of course, it is, but in some other parallel universe) For us muggles, it all revolves around state machines, suspension points, and continuation passing.
If it is the first time you are hearing all these terms, then do not worry, this article will help you understand them. We will talk about suspension points, CPS (Continuation Passing Style), and state machines. If you are already aware of these terms, then I hope you still enjoy going through the code example and various concepts mentioned in this article. …
Firstly, I would like all of us to be thankful at this time of global crisis that we are able to continue our daily job from the comfort and security of our homes. I am thankful to my employer for this. 🙏
Utmost respect to the brave souls at the frontline and to their families. You all are awesome! 💛
This article is for my friends, trying fully remote for the first time or thinking of taking a remote job. In the current time of global crisis, I am sure it might not seem like a perfect setup without the right tools and culture. I used to work from an office with occasional remote days for 5 years before I took up this fully remote job at Over. …
At Over, we faced an issue wherein the app was running
OutOfMemory when trying to export a project with high-resolution images. This made us think of various approaches for retrying our export mechanism.
Whenever we think of retrying, there are quite a few options available to us. Create a custom solution with recursion perhaps or maybe an iterative approach. One could also come up with a solution with co-routines. It all depends upon the implementation of the crash-site. In our case,
exportAt(scale) is the crash-site.
Fortunately (or unfortunately — whichever way you look at it 😜) our
exportAt(scale) function is reactive. Even with Rx, for retrying we have multiple options to choose from depending upon the problem statement. …