Hacker Newsnew | past | comments | ask | show | jobs | submit | mangodrunk's commentslogin

Your grievance is that we won’t have good cover to pursue our interests when they conflict with the sovereignty and security of others? You think it was good to lie and say that we’re the good guys while we inflict harm on others?

Looking like you are trying to pursue the general interest is how we all get things like international tribunals, supranational organizations where conflicts are discussed and sometimes resolved, coordination to raise health standards and address natural disasters, etc etc. If the price to pay for those activities is sneaking in the occasional spy, or being a bit overzealous when defending certain business interests, I think it's worth paying, yes.

That order was not perfect, but the alternative is going back to the naked power struggles of the XIX century, which ended in global carneficine - and the next time it will be so much worse.


Thanks for clarifying your position. I do see that model as only temporarily possible but eventually reality catches up with the propaganda, the Iraq war being a somewhat recent example. Also, as a citizen the previous model is also essentially requiring the government to lie to us, so I don’t think that as good either, because who will be benefiting from these “good guy” adventures?

> eventually reality catches up with the propaganda

Actually, I don't think that's necessarily the case. Look at the Chagos deal: that's the new reality created by international organizations catching up with the naked power of the original occupation, and pushing it into a corner. Again, far from perfect outcome (why Mauritius, etc etc), but quite a step forward from brutal colonialism. Humanity wins some and loses some, but at least we're still in the game. If we just give up and accept that might makes right, we slide backwards into the jungle.


You’re replying to someone who is suggesting that the CIA can manipulate the facts and fabricating reality.

>It’s easy to see why a liberal democracy supposed to defend liberty across the globe would be interested in making facts accessible.

Who is supposed to defend liberty across the globe? Do you think the US has been doing that and should be doing that?

The point of OP was that the facts from the CIA can’t be trusted. That they can lie about the facts.


Maybe your understanding of things is wrong? Maybe the information you are getting on the situation is misleading?

I am a democrat who does support ICE. If there are any issues, as there are given the numbers, they should be investigated. There have been many instances where an “execution” is claimed but they, the agents, were reasonable to assume imminent harm and self defense.


There are many anti ICE activists that are organized. ACLU and Indivisible are two such groups. There are many instances of people obstructing federal agents by anti ICE activists and protesters.

You claimed organized crimes; not simply organized resistance. What crimes are they organizing?

Resistance itself is not criminal, especially when many of the actions they are resisting are themselves illegal. In fact, it is our civic duty to resist illegal or immoral actions by the government.


Obstructing a federal agent and resisting arrest are crimes.

It becomes organized crime if they got paid for their actions.

Nice non-sequitur. I asked what crime they allegedly committed, not whether it was organized.

Surely organizing and paying people to do things by itself is not a crime.


Can you share some examples in gaps of staples?


In my experience, it's less gaps and more lack of mainstream brands. The example that comes to mind is ketchup. At Whole Foods I can get generic store brand ketchup or a variety of fancy ketchups that cost 3-10x as much, but they don't have any variety of basic Heinz on the shelf. This "mid-market" gap is common for virtually every product category.


That’s true, but intentional because of the focus on organic and avoiding certain ingredients. That is one of the reasons why Whole Foods is better.


I think I remember reading somewhere that 75% of the groceries at Walmart don’t qualify to be sold at Whole Foods. I thought Amazon was going to step back on this though.

I'm not OP, but don't go to WF looking for stuff like ibuprophen or sudafed.


True. That would be nice if they had more typical pharmacy items.


Wegmans is good, but I find Whole Foods to have much better quality of products. Whole Foods used to be even better, we will see how Amazon manages it.


Your comments are the only level headed ones remaining since so many comments have been flagged and removed. These knee jerk reactions are not helpful and tend to be wrong.


I agree. Tests relying on mocks rarely uncover or prevent issues. They also typically make it harder to make changes. Very bad idea that should have been left behind years ago.


Why substitute dependencies? Is the isolation worth it?


For the same reason you isolate variables in a scientific experiment; to ensure you're controlling the test that you're running, and not accidentally testing something else.

To easily simulate failure cases, a range of possible inputs, bad data etc.

To make the testing process faster when you have hundreds or thousands of tests, running on multiple builds simultaneously across an organisation.

Off the top of my head :-)


I don’t think it’s worth doing that, and comparing it to scientific experiments doesn’t really apply.

You can do all that without mocks as well.

Making the tests run faster at the expense of better tests seems counterproductive.

Now you should think of reasons why you should not isolate.


> I don’t think it’s worth doing that

OK; it's your choice to do what you think is right.

> and comparing it to scientific experiments doesn’t really apply.

Why not? I think it's a fairly apt comparison; you have a theory ("this piece of code does the following things"), and write tests to prove it.

> You can do all that without mocks as well.

OK, but mocks make it easier and cleaner - so why wouldn't I do that?

> Making the tests run faster at the expense of better tests seems counterproductive.

Smaller, more focused, cleaner tests are better in my opinion; speed is a beneficial side effect.

> Now you should think of reasons why you should not isolate.

Why? That's your argument - it's not on me to prove it for you. If you can give me some good reason why mocking out the interfaces you are not testing is a bad idea, and some better alternative, then we can have a discussion about it.


I don’t want to take too much of a tangent, but in scientific studies, you are trying to understand some phenomena, and isolating variables can help with very complex things. A test is typically not that complex. Another example is the use of animals in testing medicine, it can help but it obviously would be much better to test directly on humans but we don’t for good reason.

Your position is reasonable and I do think isolation can be beneficial, but I still wouldn’t use mocking to do it.

>Smaller, more focused, cleaner tests are better in my opinion.

Cleaner is subjective. I can write “small” and “focused” functional tests that are also quick to run.

I am of the opinion that functional tests provide more value. They are testing more of the actual code than an approximation, which in turn gives a better indicator that it works. Functional tests are less likely to change unless the input/output changes.

Now let’s say you mock something in your function. Let’s say you make a change to that but the input and output are the exact same. Now you have to update your test.


> in scientific studies, you are trying to understand some phenomena, and isolating variables can help with very complex things.

Not to labour the point here, but no, the primary reason you isolate variables in a scientific experiment is that you want to ensure you're only testing the thing you intend to test. A medical study is a good example - you want to be sure that the effect you observed was due to the drug you're testing, and not some unrelated lifestyle factor.

Thanks for sharing your views on the rest; there was just one thing I wanted to expand on:

> Now let’s say you mock something in your function. Let’s say you make a change to that but the input and output are the exact same. Now you have to update your test.

I think the scenario you're describing here is: a function's dependencies have changed, but the inputs and outputs of that function have not; therefore even though the behaviour is the same, the tests still need to be updated. Is that right? In which case I would say: of course you need to update the tests - the dependencies have changed and therefore the behaviour of the function depends on different things and you need to model the behaviour of those new things in order to properly test the original function. To me this objection only holds if you are mainly focussed on code coverage; however, to me, good testing exercises the same code paths in multiple different ways to stress the code and ensure that the results are correct given all possible inputs. The dependencies of a function are also inputs of a kind.


I appreciate your thoughtful comments but we do disagree.

>Is that right? In which case I would say: of course you need to update the tests.

That is right. I think it is bad for you to need to update a test where the input and output are the same. Your mock is there for you to essentially ignore, but now you need to update the test. You now do not know if you introduced a bug.

You are losing out on encapsulation, the test should not know about the internals, generally speaking.

>The dependencies of a function are also inputs of a kind.

Typically that should not be a concern to the caller of the function.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: