Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. ×

Comment Re: A new fad? (Score 1) 271

Sorta kinda. It's not just a fancy name, for one, but an entirely new way of defining types.

Interfaces in C++ are also far more limited than concepts. For one, interfaces only work on class types. Concepts work on both classes and built-in types (e.g. int, float, pointer types). To make use of interfaces, you must pass objects by pointer or reference, not by value. Classes used this way have to be virtual, which carries a performance cost. There's no clear way in C++ to state that an object adheres to both interface A and interface B: you'd have to create a third abstract interface class which inherits from A and B, and have your class inherit from this third class. Interfaces are also highly non-standardized, which would mean that in order for interfaces to replicate the functionality of concepts, library developers would need to come to an agreement on a common interface set and then completely refactor their class definitions to conform to that common interface set.

So yes, it is possible to refactor code to use interfaces and virtual classes everywhere to produce a similar design to the one offered by concepts, but it will require a lot of work, won't be terribly readable, and comes with a performance penalty.

Comment Re:Considering is different from doing something (Score 1) 218

The big evil from premature optimization comes from attempts to optimize the code that don't impact the computational complexity.

My usual path to writing non-trivial code is:

1. Find the lowest-complexity method of implementing the problem that is still readable.

2. Write the lowest-complexity method in the most readable way I can, even if it adds operations that may lower performance but don't increase the complexity (e.g. extra copies of variables, redoing simple computations).

3. Re-evaluate the above if performance proves to be an issue down the road.

Of course, sometimes the optimal method is far more complicated and less readable than the simpler method with higher complexity. In these cases I try to balance performance expectations with readability and code writing time in a reasonable way. But I've found that the majority of times I've had to go back and fix poor-performing code has been when I (or the original author) has slacked off on computational complexity, so I try to avoid making this shortcut whenever possible.

Comment Re:Scary **** (Score 2) 292

In the abstract, I think it could be done in a way that would be helpful but with minimal danger, but it wouldn't be easy.

The key would be to construct the system so that information coming from another vehicle is never trusted. The information might still be useful, but only in terms of refining estimates gathered from the car's own sensors.

Comment Re:Good for them! (Score 1) 858

I think this rosy view of corporate competence paints too pretty a picture. People very often do get to the top more based upon who they know and how many resources they have, rather than their accomplishments. Peoples' accomplishments in corporate environments matter to some extent, but usually don't result in any dramatic role changes.

The main check against incompetent people reaching upper-level jobs is that businesses that allow this to happen often don't last very long. Tellingly, Trump has had an impressive string of failures in his past, and his personal wealth has likely grown less than it would have if he'd just invested it in an index fund. This also demonstrates that when you have a lot of money it's very possible to get around any competency checks. Furthermore, if a company doesn't have much in the way of competition (which is increasingly the case for many US corporations), then it takes egregiously bad behavior to bring a company down, removing competence checks on upper management further.

That said, I think you're spot-on with regards to government. I'm sure it doesn't always work, and internal cultures of various agencies can sometimes have problems that persist unchecked. But I think that overall, these represent fairly modest inefficiencies in the system. If Trump destroys this system, it will cause lasting damage to the US government for decades to come. I'm sure Republicans are salivating at the thought.

Comment Re:Good for them! (Score 1) 858

There are some significant protections that prevent many of these people from getting fired at a whim. For now, at least. Trump would have to significantly change the rules by which these organizations act internally, and that would probably involve a significant number of lawsuits.

In the mean time, there's zero value in having people in the organization who are sympathetic but unwilling to act to counter Trump's policies. There is a word for such people: collaborators.

Comment Ridiculous (Score 1) 255

There's no way that Trump's policies will substantially increase inflation, for a number of reasons.

The biggest reason is that it's very easy for the Fed to reign in inflation by increasing interest rates, and by all accounts a Trump presidency is likely to try to push the Fed to be more aggressive about doing this than the current Federal Reserve Board.

The next biggest reason is that Trump won't really be doing much of anything to increase spending. Trump and the Republicans will very likely blow the federal deficit wide open, but this will primarily be through tax cuts to the rich, which have very little impact on inflation.

I'm pretty sure that we can expect low inflation and decent economic growth over the next couple of years. But Trump, by removing financial regulation, will make another crash like the 2008 crash much more likely. When that next crash happens, then Bitcoin and gold will very likely spike in price (it'll be impossible to predict precisely when: sooner with Trump than it would have been with Clinton, but it could still be 5-10 years away).

Comment Too small a study (Score 4, Interesting) 385

This study is just way, way too small to have the conclusion it claims to have.

Whether left-leaning or right-leaning results turn up depends upon a wide variety of factors, not least of which is wording (left-leaning sites and right-leaning sites often use slightly different wording for the same issue). I don't see how it is even remotely possible for a group of four people to review enough searches to make up a representative sample, and four people is too small a number to provide a solid opinion.

Also, there's a distinct possibility that for some issues, left-leaning sites have talked about those issues far more frequently and in far more depth, while right-leaning sites will have discussed other, different issues.

Finally, I see no reason why Google should be held to any sort of standard of false balance: there are many issues for which the facts very solidly support the left, and it makes sense for Google's search results to reflect that bias. One of the clearest examples here would be global warming, but there are many others.

Comment Re:Best unintentionally funny headline I've ever r (Score 1) 470

That may have been a reason that some put forward, but it doesn't have much to do with the arguments among politicians that were happening at the time. See here for a more in-depth analysis. Without slavery, I sincerely doubt the electoral college would have won out over a simple direct election.

Comment Re:Hurts them more than us [Re:Consumer prices] (Score 1) 742

Yes, it does hurt China more than it hurts us. But it still hurts us. There will be precious few winners if Trump engages in this trade war as promised.

My own hope, perversely, is that corporations in the US have a lot of influence in politics, most especially within the Republican party. I have a hard time thinking that he wouldn't get huge pushback from a number of large corporations if he actually tried to implement the trade war he says he wants.

Note to those who think that Trump is an outsider who isn't beholden to those same political forces: his transition team is entirely composed of Republican establishment politicians and corporate leaders.

Comment Re:Backlash or Bias? (Score 1) 470

Except that Clinton has been cleared of all wrongdoing, and none of her scandals have been shown to be anything more substantive than innuendo.

By contrast, Trump has multiple legal cases that seem to be quite substantive, such as regarding his Trump University, and his mismanagement of funds from the Trump Foundation.

The news media spent huge amounts of time discussing the innuendo around Clinton, but barely any talking about Trump's much more substantive legal problems. No, these two candidates are not and never were in the same realm of bad behavior. But the media has pretended that they are, even sometimes to the point of indicating that Clinton had much worse issues of corruption (which is patently absurd to anybody that has actually paid attention to the evidence).

Comment Re:Best unintentionally funny headline I've ever r (Score 1) 470

Vindication? Clinton has a pretty significant popular vote lead, likely ending up at more than 2 million. In pretty much any other electoral system in the world, that would have been sufficient to grant the win to Hilary.

But no, we have the electoral college. And the reason it exists is explicitly because of slavery: the southern slave-owners wanted to ensure that their disallowing their slaves to vote wouldn't prevent them from winning the presidency. This was the foundation of the 3/5ths compromise, and the electoral college was the mechanism that was created so that the 3/5ths compromise could operate for both presidential elections as well as House elections.

Donald Trump is a flagrantly racist candidate who won because of racist institutions set up by racists in our distant past.

Comment Re:Hold down power button and ... (Score 1) 432

Ummm, I hope you learn at least a little bit about child psychology before having any children. Children very, very quickly learn to show empathy and concern for others' needs, if they are given the right environment to do so.

Children (usually) only show sociopathic tendencies if their parents treat them like that's the only option. Sadly, this kind of mistreatment of children is absurdly common in the US, particularly as many parents don't even realize that they could be have far less frustration and a far more enjoyable time as parents if they just learned to stop setting up power struggles with their children.

Of course, sometimes there's brain chemistry that gets in the way here, but most children, even toddlers, can learn to notice and respond to the needs of others in positive ways, albeit clumsily.

Slashdot Top Deals

I put up my thumb... and it blotted out the planet Earth. -- Neil Armstrong

Working...