Catch up on stories from the past week (and beyond) at the Slashdot story archive


Forgot your password?

Comment Re:How long will the company stay up? (Score 1) 494

Right, but VW might have miss-sold 11 million cars. It looks very much like they have no way to fix those cars in such a way that they meet the advertised specs. With that in mind, it's likely they'll have to offer to buy them all back, which is likely to amount to something in the region of $330bn, before even considering any fine.

Comment As always with C++, the truth is more nuanced (Score 4, Interesting) 262

For example, one of the guidelines here is to always prefer make_shared over std::shared_ptr(new ...). That's good advice for a couple of reasons
1) it allocates your memory for the shared_ptr control block and the object contiguously
2) it means you can't separate the allocation from the creation of the shared ptr and end up with an owner who's not looking at the shared ptr in-between.

However, it also means that if you have any weak_ptrs pointing at the end of that shared_ptr, the object itself won't go away until all the weak_ptrs do too (because the control structure won't go away until they do, and they're contiguously allocated).

Comment Re:It's the marketplace, stupid! (Score 4, Informative) 233

"solidarity" is just part of the game. What you "leftist bashing" types miss is that when you're playing a game you should use every advantage you have. Forming unions, and creating solidarity between a group of players increases bargaining power, and allows you to make sure that you get the outcome you desire from the market.

Comment Re:Its all in the taxes and incentives. (Score 3, Insightful) 211

Right, I mean, it's not like all these huge capitalist tech companies will adopt wind and solar until it's worth their while, and will please the share holders... Oh... wait, what's that? They all build giant solar farms next to their data centres because it's a hugely valuable investment?

Well, damn...

Comment Re:It's not just Chrome (Score 2) 205

There are testing techniques that don't require you to test every possible scenario, but, in lack a of simpler them, every independent code condition.

100% code coverage does not imply that you have 100% coverage of the possible outcomes, for example:

int dereference(int *x) {
        return *x;

void testDereference() {
        int x = 5;
        testFrameworkAssertTrue(dereference(x) == 5);

This test provides 100% code coverage, but the code will still have undefined behaviour in a whole lot of cases.

The number of people on the internet who think that testing is a substitute for proof and/or that it can magically eliminate all bugs is pretty terrifying.

If it's worth hacking on well, it's worth hacking on for money.