867 karma · joined November 7, 2018
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?
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!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.In any case, any sort of price control is bad for the consumer, so I'm opposed to the idea on principle.
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.
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.
That's why it's not a good idea to interview at a place when you're unprepared. Not only are you wasting both your and the company's time, but you're also hurting your chances of getting an interview call from them in the future.
I have seen a lot of people I know make this mistake -- not preparing enough for a interview, failing badly, and then applying to the same company 6/12/24 months later, and not even getting another interview. Very frustrating.