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

 



Forgot your password?
typodupeerror
×

Comment Re:Movie? (Score 1) 41

Which is why you combine the chroma data from MVIC with the luminance data from LORRI. When you don't have both of the same image then you turn the chroma data into a sphere map and generate the appropriate chroma data to map over your luminance data.

Comment Re:Given how C++ is taught. (Score 4, Insightful) 345

"Smart pointers" are great -- if you don't care about performance (in which case, why are you not using Java?).

Since when does Java's performance even come close to C++'s in benchmarks? C++ performance is generally very close to that of C's, and in some cases exceeds it (example: qsort vs. std::sort - C++'s use of templating allows for inlining of the sort function code)

Smart pointers have very, very little overhead. The worst is std::shared_ptr, and it's still only adding a reference counter, and that's only used on pointer copy and deletion. And if you have a use case that requires std::shared pointer as your smart pointer of choice, then this is counting that you'd have to be doing anyway in some form or another.

  From the benchmarks I've seen, most people see about an additional 5%-ish overhead in debug mode with std::shared_ptr vs. raw pointers in pointer-heavy code. In a release build there's generally no measurable effect (the difference being, in debug mode it can't inline the dereferences).

Comment Re:Knowing when not to (Score 1) 345

Quite true, with a caveat. Each feature in every language provides a balance of power to the developer versus a learning curve and potential gotchas. Different programmers will have different balance of opinions on where each feature lies on this spectrum. Each must decide in each case, "is this worth it to me for any potential difficulties I may encounter, and what about any others who work on this in the future?" (each alternative option will also bear such decision-making). There is rarely a single hard, fast rule to determine "use this, don't use that". Consequently I personally recommend to each coder that as they learn of a new feature, they try it out (in a personal project or little task, not some big critical system) and see what role it has on the development process and the maintainability of the code. Some may be overwhelmingly positive. Others may turn out to be overwhelmingly negative. Only experience with the feature can help one determine that.

In my case, I've had good enough experiences with most C++ features that unless I know that a project is also going to be worked on by people who are C++-phobes, I find that they're well worth using. But even in my case I've come across features that I wouldn't even use in personal projects. For example, once several years back I tried out std::transform extensively in a hobby program I was writing - by the end I was convinced that, at least in the sort of use cases I was encountering, it only serves to complicate code, increase development time and decrease legibility. I went back in and modified all of the code to use "for (auto i : list)" loops, and contrarily was very pleased with the result - it led to something that even a C++ novice could understand while simultaneously reducing code size and improving code clarity. So guess which I avoid today and which I use extensively? ;)

But there are no hard, fast rules, and reasonable coders will of course differ.

Comment Re:This is great (Score 3, Interesting) 163

Of course it saves the rhinos. You put 100 times more fake stuff on the market and the price for rhino horn collapses, meaning people stop hunting them.

The brilliant part is that this makes use of something that's normally a bad thing - China's extensive peddling in fakes - to achieve a good result. I doubt it'll stop the really high end of the market, the sort of people who would instruct their buyer to send what they buy sent off to a lab (I don't think some rhino DNA alone would fool a lab, surely it looks different under microscopic examination), but for the rest of the market, it's a neat idea.

Comment Re: Nothing that money can't buy (Score 5, Informative) 65

Why do you think over a dozen observatories have been built there? Think it's cheap to sent giant pieces of delicate scientific equipment from the mainland? TFA doesn't even mention the actual reason why Mauna Kea is one of the best places on the planet for optical telescopes: seeing conditions (aka, how much celestial objects "twinkle" on average. Outside of deep Antarctica (Dome A, not far east of the South Pole), there's no other better known location on the planet (a couple are pretty close, like La Palma and La Silla, but none exceed it). Good seeing requires high altitude with the area around being as perfectly flat and uniform as possible for hundreds of kilometers.

For optical telescopes, seeing is the most critical factor for resolving fine details. And this telescope is all about resolving fine details. Adaptive optics help counter seeing problems, but the better your seeing baseline, the better the final result.

Comment Flows (Score 2) 45

They mentioned that the flow temperatures recorded in the hot pixels are colder than typical basaltic / rhyolitic flows and were speculating that they didn't catch freshly erupting material, but rather material that had a little time to cool. But I can't help but wonder.... does Venus have carbonatite flows? They're colder, and if there's anything Venus isn't short on, it's carbonic compounds...

(BTW, with those not familiar with carbonatite lava, its really weird stuff - incredibly fast-flowing and smooth (often less viscous than water), erupts looking black or dark gray like oil, doesn't (visibly) glow during the day (just a fast moving black substance), at night it has a weird maroon glow, and it oxidizes to bright white as it ages)

(Just one of many unusual types of volcano :) )

Comment Re:London's fantastic... (Score 1) 410

Ahh I think I see the problem, it was giving me the results for the city of Hyde near Manchester, not Hyde Park!

Okay, so according to the site, Dorking or Guildford to London is about an hour by rail during rush hour, 45 minutes during off-peak (15-20 quid each way); while according to Google Maps it's 1-2 hours during rush hour, 60-80 minutes during off-peak.

Slashdot Top Deals

Waste not, get your budget cut next year.

Working...