Become a fan of Slashdot on Facebook


Forgot your password?
Polls on the front page of Slashdot? Is the world coming to an end?! Nope; read more about it. ×

Comment: Re:Answer (Score 5, Informative) 335

by rjh (#49785011) Attached to: How Much C++ Should You Know For an Entry-Level C++ Job?
unique_ptr<T> is normally preferred over shared_ptr<T> -- the former is zero-overhead compared to a pointer, while the latter has a reference count associated with it which has to be incremented and decremented. If you know two or more things will be using the pointer and you don't want to have to worry about ownership semantics, shared_ptr<T> makes a lot of sense. If you know only one will be using it, unique_ptr<T> makes more sense.

Comment: Re:not far enough. (Score -1) 201

by rjh (#49715127) Attached to: Baton Bob Receives $20,000 Settlement For Coerced Facebook Post

Please see my original post:

They're not going to work as cops ever again.

And they're not going to get hired as security guards in the U.S., either. Would you hire someone that you already knew, 100%, had violated someone's civil liberties so egregiously? Of course not: your shareholders would can you for hiring them. If you hire people you know are a discipline problem, you're just begging for a lawsuit when they fuck up again while working for you.

Comment: Re:Ten seconds? (Score 5, Informative) 591

You weren't breathing pure helium. You were breathing "balloon gas," which is a mixture of helium and normal, breathable room air. The oxygen in the mixture was keeping you conscious.

Helium is an expensive substance and you don't need pure helium in a balloon to give it lift. By cutting the helium with air, the balloon outfit is able to make their expensive resource last much longer.

Comment: Re:you can do osx and ios in c++ (Score 1) 407

by rjh (#49177343) Attached to: Ask Slashdot: Which Classic OOP Compiled Language: Objective-C Or C++?

Cfront worked by translating C++ into C, which was then run through a C compiler. As such, cfront had to be abandoned in the early 90s because there were certain syntactic structures that simply couldn't be expressed in a reasonable amount of C source code.

The original poster is (mostly) correct. Cfront was a compiler only in the sense that it did a transform of one language (C++) into another (C). It was not a compiler to any extent beyond that; compiling to native code was left up to the system C compiler.

Where the original poster is wrong is calling C++ a "preprocessor for C". That's a reasonably-correct way to describe one early implementation of a C++ compilation system, but it's not an accurate way to describe the language itself.

Comment: Parody is protected (Score 3, Informative) 255

by rjh (#49173757) Attached to: Gritty 'Power Rangers' Short Is Not Fair Use

Parody is protected; satire is not. Parody uses the objects of an artistic creation to criticize, lampoon, or make fun of the original creation. Satire uses the objects of one artistic creation to criticize, lampoon, or make fun of other creations. Using A to mock A is fair game in copyright law. Using A to mock B is seen as a violation of the copyright holder of A's rights.

As an example: Demolition Man used commercial jingles and Taco Bell to satirize modern American life and where it was headed, but they weren't really holding up the Oscar-Meyer Company or Taco Bell up for ridicule. The laughs were aimed elsewhere. As a result, they had to get permission from the Oscar-Meyer company to use the Oscar-Meyer wiener jingle, and permission from Taco Bell to use the Taco Bell logo. That's satire.

The Power Rangers fan film is pretty much straight-up parody. They're not scoring points about anything outside the Power Rangers franchise: they're just holding it up for brutal mocking. That's parody, and that means the people who made it were A-OK.

Comment: Re:Mostly right. (Score 1) 681

by rjh (#49130731) Attached to: Bill Nye Disses "Regular" Software Writers' Science Knowledge

I'm not rejecting Noether's theorem -- I'm rejecting temporal invariance. Spacetime is dynamical, therefore not invariant, etc., etc.

You can definitely torture the definitions of words until you reach a kind of invariance, but I feel this creates more problems than it solves. Better to just say, "conservation of energy only holds true for static backgrounds."

See Sean Carroll's "Energy Is Not Conserved" blogpost for a more detailed explanation. He convinced me to stop talking about the energy of the gravitational field as the escape hatch for conservation. :)

Comment: Your own humanity (Score 1) 698

by rjh (#49130349) Attached to: Ask Slashdot: Terminally Ill - What Wisdom Should I Pass On To My Geek Daughter?

It's commendable that you want to pass on wisdom. But I suspect your daughter isn't going to miss your wisdom anywhere near as much as she's going to miss you. What is it that makes you so uniquely you?

For example: I have some really strong memories associated with science fiction, particularly Poul Anderson's Tau Zero. So I might record myself reading Tau Zero, and whenever I reached a passage that really resonated with me I might go into a long digression about why it resonated with me, and things in my life and history that also strike that same thematic note. By the end of it, she would know not only that I loved Tau Zero, but she'd know a lot more about me and why I loved it and why it spoke to me and why, with only six good months left, I'd choose to spend six hours of it recording it for her.

Wisdom is overrated. It really, truly is. It's valuable but it's not the best thing out there. And I say that as the son of a father who has the keenest mind I've ever known, a guy who has enormous life experience and wisdom and has shared it with me freely throughout my life. If-and-when he goes, I'll miss his wisdom a lot. But I'll miss him more.

The most important gift you have to pass on to your daughter isn't your wisdom. It's you.

Comment: Re:Mostly right. (Score 1) 681

by rjh (#49114401) Attached to: Bill Nye Disses "Regular" Software Writers' Science Knowledge

So where are the perpetual motion machines?

This is a great question. Let me rephrase it: "How can we collect dark energy and convert it into something useful?"

Nobody knows. Nobody knows if it's possible, for that matter. But yes, energy is constantly being pumped into spacetime; that's what's causing the expansion of spacetime. The nature of that energy and its origin (is it produced ex nihilo? Is it leaking in from another universe?) are currently hotly debated within physics.

But again, it's a great question. I wish we had an answer for it! :)

Comment: Re:Mostly right. (Score 1) 681

by rjh (#49114341) Attached to: Bill Nye Disses "Regular" Software Writers' Science Knowledge

Try high-school level details. The basic principles of relativity ("no preferred reference frames; time and space are relative; the speed of light is constant") are taught in high school physics, as are such things as barycenters (although they usually call it the "center of gravity"). The bit about the Uncertainty Principle is college-level physics, but the rest is straight-up high school physics -- and not AP Physics, either.

And if you say the earth goes 'round the sun, you're every bit as wrong as if you say the sun goes 'round the earth. The reason why you're just as wrong is because you're making the same fundamental mistake: you're assuming the existence of a preferred reference frame.

So, in a sense, thanks for proving my points.

Comment: Re:Mostly right. (Score 1) 681

by rjh (#49112721) Attached to: Bill Nye Disses "Regular" Software Writers' Science Knowledge

I've never heard of this Goedel guy but he sounds like either a hippy or a troll or both.

Kurt Goedel is widely regarded as the finest logician since Aristotle. Guy was Einstein's best friend (Einstein said he worked at Princeton "solely for the privilege of walking Kurt Goedel home"), did foundational work in general relativity, developed the Goedel Metric for GR, tore mathematics down to its foundations so violently that Bertrand Russell was shaken, lay the foundation for modern computer science, and more.

Not knowing who Kurt Goedel is, is kind of like not knowing who Isaac Newton is. Seriously. The guy was a major player in mathematics and physics from the 20s up until the 1970s. And when people call him the greatest logician since Aristotle, they're not kidding.

Comment: Re:Mostly right. (Score 1) 681

by rjh (#49111555) Attached to: Bill Nye Disses "Regular" Software Writers' Science Knowledge

From any point of reference the sun is the centre of this solar system and everything in this system orbits the sun.

Not at all. Nothing orbits the sun. The planets and the sun all orbit the barycenter of Sol System, which happens to almost coincide with the center of the Sun. See, e.g.:

Anyway, the claim that "from any point of reference the sun is the centre of this solar system" is just wrong. Walk out your front door on a clear night and you can watch the planets and stars rotate around you. You're the center, from that particular frame of reference. Sure, to describe the motions of the planets accurately requires an absurdly complex set of epicycles, so complex that they cannot be evaluated without the use of computers... but you can do it: the math gives equivalent results. The math may be easier in one reference frame, but that doesn't make one reference frame more correct.

Here's another example: stand still and spin around really fast. Your arms will naturally lift and move outwards. In one frame of reference, you're spinning and centrifugal forces are lifting your arms up. In another frame of reference, you're standing still and the entire universe has started spinning around you, and the tidal forces generated by that much mass (at, admittedly, that great a distance) generate a pull on your arms that lift them up.

That may sound pretty out there, and it is -- it was one of the arguments Kurt Goedel used against relativity back in the early 20th century. ("That's all well and good, Einstein, but if there's no preferred reference frame then how do you account for this?") Then Goedel sat down with the math, crunched a ridiculous lot of numbers, and discovered that yes, General Relativity gave the exact same results as classical physics.

We may want to choose one reference frame or another to make the math easier -- but that doesn't make one reference frame more correct than another.

Comment: Mostly right. (Score 2, Interesting) 681

by rjh (#49108675) Attached to: Bill Nye Disses "Regular" Software Writers' Science Knowledge

Look at how many people think they're scientifically literate because they think --

  1. The Earth goes around the sun. It doesn't, and in fact, this is just as wrong as saying the sun goes round the Earth. Both positions implicitly advocate there's some privileged and special frame of reference in which to view the universe, and Einstein says there isn't one. It's sort of like people who say there's no such thing as centrifugal force: stand inside a rotating reference frame and derive Newton's Laws and yes, yes it exists, and yes, yes it's real. The mistake: "some reference frames are more true than others." The reality: "you pay your money and you take your frame of reference."
  2. Conservation of energy. Conservation of energy only happens in a static spacetime; astronomy says our spacetime is dynamical; energy is not conserved in our universe.
  3. E=mc**2. Only true for objects at rest, and pretty much nothing in the universe is at rest. The real equation is E**2=m**2c**4 + p**2c**2. This is why light can have energy without mass: a photon's energy is carried entirely in its momentum.
  4. If you measure a particle's position, you'll necessarily tweak its velocity. That's the Uncertainty Principle. No, that's the Observer Effect. The Uncertainty Principle isn't a statement about the fidelity of our measurement apparatus: it's a statement about the total information available, period. If you think the data actually exists but we just can't measure it, then you're subscribing to a Hidden Variables interpretation of quantum mechanics, and the Aspect experiments put a pretty comprehensive set of nails in that coffin.

... and that's just the tip of the iceberg. You don't have to talk to flat earthers and antivaxxers to see profound science illiteracy; usually, the people condemning the science illiteracy are just as wrong, but about different things.

In space, no one can hear you fart.