I hereby claim:
- I am gerard-morera on github.
- I am gerardmorera (https://keybase.io/gerardmorera) on keybase.
- I have a public key ASCtMV88o9k4ZoMFduGjt7TOL9B1KJjc0nEl5WffGKNCFQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#The aim of this ticket is to handle Pachinko responses. I will show you three different solutions my code has been | |
#through and will give the reasons about its evolution. | |
#we are facing 4 different ways to handle responses | |
# - When is 200 return pending | |
# - When pachinko returns 500...599 retry the call if allowed or log and fails | |
# - When the client returns an exception retry the call if allowed or log and fails | |
# - When is 400...499 log and fails | |
#Total retries can sum until 3 |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
“Here is a simplified implementation, though there are plenty of more robust versions available. | |
var memoize = function(f) { | |
var cache = {}; | |
return function() { | |
var arg_str = JSON.stringify(arguments); | |
cache[arg_str] = cache[arg_str] || f.apply(f, arguments); | |
return cache[arg_str]; | |
}; |
--------------Scope---------------- | |
---localScope--- | |
A local scope refers to any scope defined past the global scope. | |
If I define a function and create variables inside it, those | |
variables becomes locally scoped. | |
// Scope A: Global scope out here |