Hacker News new | past | comments | ask | show | jobs | submit | cowardlydragon's comments login

mocking / interaction / expect breaks encapsulation to perform "testing".

Thus it is often a test of the implementation's assumptions when first written, and even worse, when the code is maintained/edited, the test is merely changed to get it to pass, because unit tests with mocks are usually:

1) fragile to implementation 2) opaque as to intent

Whereas input/output integration points are more reliable, transparent, and less fragile to implementation changes if the interface is maintained.

However, if you must do mock-level interaction testing, Spock has made it almost palatable in Javaland.

This is one area where functional fans get to make the imperative folks eat their lunch.


Exactly. I've seen tests where some code calls:

  printf("hello world");
And the test is:

  mock_printf(string) {
    if string != "hello world" then fail;
  }
Which is basically just duplicating your code as tests.


Also: the fundamental undecidability of the Halting Problem


... is really not relevant to software testing.


If you actually know what the halting problem is, you know that if your code triggers that, it is pretty much broken. If you're not writing a programming language.


I'd guess the complexity is dependent on the decision graph complexity: cyclic vs acyclic, entrance/exit points...

If it gets to conditional / puzzle evaluation that starts to get Turing Complete, then it will hit the halting problem, which I believe is thought to be noncomputable for nontrivial graphs / code.

https://en.wikipedia.org/wiki/Halting_problem


Sigh. Windows 8 was the opportunity. That massive incompetent stinkbomb, while simultaneously OSX was being ignored.

Google could have finished off Microsoft with a death knell investment of a relative pittance:

- get LibreOffice to 100% parity and compatibility with office

- pick and polish a desktop environment to a perfect OSX, Windows-7, and Ubuntu interface

- get CrossOffice/WINE to near-100% compatibility

- near-perfect android app use.

Instead... ChromeOS?

Google could have added a multibillion dollar industry for the investment of $100 mil.


Maybe they didn't want to be RedHat? As in, all those projects are open-source and if Google invested in them, they'd be investing in something they can't fully control. Google's goal is to make money, not fight for user freedom, after all.


> - get LibreOffice to 100% parity and compatibility with office

> - get CrossOffice/WINE to near-100% compatibility

> - near-perfect android app use.

> relative pittance:

> investment of $100 mil.

Wait, what?


Yes, custom ASIC is useful. Also see: Bitcoin Miners.


scuttlebutt has sneakernet options it appears. Email is just another transport mechanism.

So your approach should work in theory within the described framework.


Oh, I'm sorry, is the poor burden of publishing the laws of a government too hard for the big bad government to possibly do or fund?

Of course the solution is to make it copyrighted / restricted / owned by a third party corporation.

What? Simplify laws or properly fund the ancillary tasks entailed in changing laws? Blasphemy.

This is corruption, nothing else.


I thought I read somewhere that the fastest networking technology actually gets close to a couple hundred instructions window of processing.

http://netoptimizer.blogspot.com/2014/05/the-calculations-10...

Hm, 67 ns per packet.

So even this local storage would be the drag in many scenarios...


"PERIOD."

This is almost always the harbinger of lies, deception, propaganda, or lack of nuance.


I have no industry wide view, but...

All existing nuclear powerplants are shitty Fukushima-style pressurized light water reactors in the US, are they not?

I'd have to think this company is an incumbent blocking entry of modern designs. Is this really a bad thing?


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

Search: