867 karma · joined Nov 7, 2018 (8y ago) · 83 submissions
comment 1y ago · link · parent
comment 1y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
My only question is why it took so long for someone to implement it? And where are the equivalent libraries for Go, Rust and Java?
comment 3y ago · link · parent
class ExampleKeyValueStore {
ExampleKeyValueStore(KeyValueStore wrapped);
int hit_count();
};
That means I can use the real KeyValueStore as a dependency while still testing the caching behavior. Cool!comment 3y ago · link · parent
I still have questions about a few scenarios though. Let's say, I have two classes like this:
class KeyValueStore {
int64 Get(Key key);
};
class CachingKeyValueStore {
CachingKeyValueStore(const KeyValueStore& wrapped);
int64 Get(Key key);
}
Here, the `CachingKeyValueStore` class is a wrapper around the `KeyValueStore` class, and its purpose is to simply maintain an in-memory cache (instead of RPC calls or Database calls). How would you unit test the `CachingKeyValueStore` class? So far, using Mocks have been my only strategy, because behavior-wise, both classes have the exact same outputs for the same inputs.comment 4y ago · link · parent
comment 4y ago · link · parent
comment 4y ago · link · parent
As for your suggestion to "talk to your government", yeah I'm sure that will go down well with the Iranian regime trying to crack down on anti-hijab protestors.
comment 4y ago · link · parent
Not necessarily. For example, PayPal has recently introduced "acceptable use policy" where they can freeze your account without you violating the law. Banks also have done the same for being "racist", "sexist", "anti-vaxx" etc. All of those things are perfectly legal in the US. So your assertion that only illegal activities require use of crypto is false.
And that's before we get to the fact that just because something is "illegal" doesn't mean it's good to have this banned. Pretty sure the ongoing Iranian protests are illegal.
comment 4y ago · link · parent
27.
Amazon Pip Horror Story(linkedin.com ↗)
902 points · by vikinghckr · 4y ago · 737 comments
comment 4y ago · link · parent