Earlier quoted context omitted.
Have you ever wondered why it became partisan to begin with? Lots of other issues are not partisan like "smoking causes cancer", everyone generally agrees that it does, even many years ago before the "science proved it". There is some science that is so obviously manipulated by power and money everyone knows something is wrong, but can't do anything about it.
Yes, the perverse incentive of the oil lobby is transparently staggering. Even if one is charitable, that the lobbyists believe their own talking points, "it is difficult to get a man to understand something, when his salary depends upon his not understanding it". That said, it didn't help the politicization of the climate for Al Gore to have become its face, thus associating its brand with Democrats, for all his ple…
Ask HN: Do you write tests before the implementation?
321–329 of 329 posts
Re: Ask HN: Do you write tests before the implementation?
#322Earlier quoted context omitted.
I suspect that's a product of anything that becomes political: whether it's climate change or border security, the incentives are more towards theater than results, creating an attack surface for economic exploitation. At this point, I think the most efficient (and least corruptible) solution is a carbon tax + dividend [0], AKA a Pigovian tax [1]. It's not as though markets don't work; the problem is that externaliti…
Do you think corrupt governments, that also happen to be the largest polluters in the world will participate with a carbon tax honestly and in good faith?
Re: Ask HN: Do you write tests before the implementation?
#323Earlier quoted context omitted.
Do you think corrupt governments, that also happen to be the largest polluters in the world will participate with a carbon tax honestly and in good faith?
Yes, I suppose that is a risk; as with our (allegedly) progressive-taxation system, a carbon tax could invite loopholes and creative accounting, both in public and private sectors. It would take a significant groundswell of grassroots political will to apply a carbon tax fairly and universally; perhaps the dividend would make it a little more salient and less abstract, making it easier to calculate that company/depar…
This is where carbon tax falls apart. There is ZERO insentive for poor people in high polluting countries to make their lives worse for the benefit of the world. None.
Therefore, carbon tax will only ever be paid by the "rich", but then we /know/ the rich dodge taxes. So the carbon tax falls on the middle class in the rich countries.
Now the politics are more clear. Is it any surprise that the middle class don't want carbon taxes? Only the middle wealthy (doesn't affect their life much), the poor (they don't pay any taxes) and the rich (actors, politicians, etc...).
This is why Trump is popular, a whole class of people is being dumped on, it's not a conspiracy from the oil companies, it's ideology based on fantasies that dump all the costs on one group of people.
A new plan is needed, carbon tax will _never_ work.
Re: Ask HN: Do you write tests before the implementation?
#324Earlier quoted context omitted.
Yeah, as soon as code has more than two "real" branches, I don't trust myself to manually test them all. One of them will be broken quickly if I keep hacking in a particular branch. (This is, secretly, also an argument for writing code in sufficient generality to avoid this phenomenon in the first place.) I also never trust a test that passes the first time I run it. I am both terrible at writing correct code, and co…
I believe he's using the term branch different than you : 'alternate code path'
Re: Ask HN: Do you write tests before the implementation?
#325Earlier quoted context omitted.
Yes, I suppose that is a risk; as with our (allegedly) progressive-taxation system, a carbon tax could invite loopholes and creative accounting, both in public and private sectors. It would take a significant groundswell of grassroots political will to apply a carbon tax fairly and universally; perhaps the dividend would make it a little more salient and less abstract, making it easier to calculate that company/depar…
> It would take a significant groundswell of grassroots political will to apply a carbon tax fairly and universally; This is where carbon tax falls apart. There is ZERO insentive for poor people in high polluting countries to make their lives worse for the benefit of the world. None. Therefore, carbon tax will only ever be paid by the "rich", but then we /know/ the rich dodge taxes. So the carbon tax falls on the mid…
I would consider the world-wide implications to be a bigger concern: if the tax is too high, some producers might feel incentivized to move operations to a country without a carbon tax. Though I generally think tariffs are a bad idea, a carbon tariff that essentially covers the difference (and goes to the same dividend pool) might not be the worst idea.
Re: Ask HN: Do you write tests before the implementation?
#326Earlier quoted context omitted.
Not sure I'd call it a 'bad bad practice' for a user to do it voluntarily, but it's unnecessary. I think the above commenter is thinking about the requirement a user to change a password on a timed basis. There's been a good bit of research done in this area, and the consensus is that it just causes most people to stick a number at the end of their password anyway, making the policy completely worthless at best, but…
Do you have a link to the research you're speaking about ? My company is really about this kind of things and i'm not convinced it's really usefull
https://www.nist.gov/itl/tig/projects/special-publication-80...
Re: Ask HN: Do you write tests before the implementation?
#327Never done this, and don't consider it practical. Code and interfaces (even internal ones) change rapidly for me when I'm starting a new project or adding new major functionality to the point that the tests I'd write at the beginning would become useless pretty quickly. I also believe that 100% test coverage (or numbers close to that) just isn't a useful goal, and is counterproductive from a maintenance perspective:…
That is how I used to work; then I got into finance and there are two things different with the work I did before that (web/desktop/app (or too long ago; there was no 'testing' in the 80s) the software I write now has to be certified/audited to some extent and I cannot change/repair production software on the fly. That could costs a lot of money for certain bugs. So now I tend to write tests for everything and that h…
Re: Ask HN: Do you write tests before the implementation?
#328Never done this, and don't consider it practical. Code and interfaces (even internal ones) change rapidly for me when I'm starting a new project or adding new major functionality to the point that the tests I'd write at the beginning would become useless pretty quickly. I also believe that 100% test coverage (or numbers close to that) just isn't a useful goal, and is counterproductive from a maintenance perspective:…
What "other kinds of testing" do you do instead then? How do you make sure the code is testable by those other tests? Often people fall back on manual testing, which is often slow, unreliable and incomplete. And certain things might not even be testable if the system hasn't been designed to allow it.
I guess I'm assuming we're talking about unit testing specifically here, so I'm considering functional and integration testing as separate items.
Manual testing is terrible. I'll occasionally engage in that, but only as an extremely-short-term measure when I'm (again) not convinced my interfaces are stable enough yet to write unit tests.
Re: Ask HN: Do you write tests before the implementation?
#329Never done this, and don't consider it practical. Code and interfaces (even internal ones) change rapidly for me when I'm starting a new project or adding new major functionality to the point that the tests I'd write at the beginning would become useless pretty quickly. I also believe that 100% test coverage (or numbers close to that) just isn't a useful goal, and is counterproductive from a maintenance perspective:…
I've been asked to literally test that values are incremented. Like, does ++ add 1 to the value in C, just to be safe, for the sake of 100% coverage.