Forgot your password?

Comment: Re:memset() is bad? (Score 5, Informative) 171

by canajin56 (#46752295) Attached to: First Phase of TrueCrypt Audit Turns Up No Backdoors

As a special case, MSVC++ removes memset(array,value,sizeof(array)) if array isn't read again before the end of its scope.

For example

void Foo()
char password[MAX_PASSWORD_LEN];
memset(password, 0, sizeof(password));

The MS compiler will delete the memset. In Windows you should use RtlSecureZeroMemory to zero out memory you want to keep secure.

Comment: Re:isn't it possible to detect (Score 2, Interesting) 923

by canajin56 (#45611347) Attached to: Thieves Who Stole Cobalt-60 Will Soon Be Dead

Short answer: No. Long answer: What do you mean "big doses"? There are many sources of gamma rays in the atmosphere (when stuff like cosmic rays hit it, you get a nice shower of gamma rays and other neat thingies). Maybe if you have a gamma spectrograph you can filter out just the cobalt-60 gamma rays, assuming they're unique? In that case you just need to worry about the fact that the surface is huge and gamma detectors are non-directional. That means that to scan a point on the surface you need to point straight at it. Unless you have a massive constillation of sats that means each "square" you scan will need to have a pretty high CPM for there to be a statistically significant number of counts during the scan. Due to the inverse square law, your satellite in LEO will only see a few CPS if somebody within 1KM of the source is getting several MILLION CPM. That translates into radiation sickness within a few days. For being 1KM away. Don't even ask about being in the same room as it! And of course the area you're scanning in 1 second is pretty huge so this detector wouldn't be much help locating things. And that's assuming no background radiation on the same order (or higher) CPS.

This would change if you have a gamma ray vector spectrograph that lets you measure the exact frequency and vector of each gamma ray it detects. But right now I think the filters are pretty fuzzy AND the techniques used are all non-directional. Even assuming perfect filters and vector detectors, the counts have to be huge before they show up in space right when you're looking. And I think the assumption you even can filter so you won't see any background ticks is incorrect, but I have no idea what kind of spectral distribution the Earth's gamma background has.

The reason you can have satellites that detect and locate the gamma bursts of underground nuclear tests is because of the B word. If it's a burst then you can triangulate between satellites even though their detectors are scalar not vector. That's because the sudden uptick that each satellite sees is tied to the same physical event. If you're looking at decay emissions then the counts are not synchronized so you can't triangulate. Oh, and also the gamma ray burst from an explosion is pretty big compared to the decay from a few kg of cobalt-60.

Comment: Re:Long before the event horizon (Score 1) 263

by canajin56 (#45261123) Attached to: How an Astronaut Falling Into a Black Hole Would Die Part 2
That depends how high you go when you say "more massive". For example, the black hole at the center of our galaxy is 4 million solar masses, and ones thought to be as heavy as 1 billion solar masses have been spotted I believe. Lets do some basic maths of proportions. The Schwarzchild radius of a blackhole is proportional to its mass. Not the something-root of its mass, but to its actual mass. That's unexpected, and it's why the other guy was almost right (but not about micro black holes). Newtonian gravity is M G / r^2 (where G is the gravitational constant G = 6.67E-11 m^3/(kg s^2)). So it will vary with mass, and inversely with squared distance. Distance at the event horizon, we just established, will vary with mass. So force at the event horizon varies with the inverse of the mass. So a 1E6 solar mass black hole would have 1E-6 as much gravity at its event horizon. So instead of about about 1.5E13, it would be 1.5E7. That's still a lot of gravity! However, remember that we are also 1E6 times as far away. The difference that 1.5M makes is then 1E-6 as great. While you might initially expect this to be 1E-12 because of it being squared, you'd be wrong if you did so. You'll have r^2 - (r+1.5)^2 = r^2 - (r^2 + 3r + 1.5^2), or proportional to r, not to r^2. So all told, the tidal forces should vary inversely with the square of the mass of the black hole. Thus, I would expect the gradient to be 1E-12 as great, or basically 2 thousandths of a gravity over 1.5 meters. More than the tidal forces of standing on Earth, but not something that will shred you. The other considerations vis-a-vis dying in a horrifying (but thankfully brief) manner at that distance are another matter entirely. But as pointed out it's a pretty rough guess to be using Newtonian gravity while standing, as it were, directly on a singularity. And about that word: A black hole can have two different sorts of singularities. A singularity means a point at which an equation is undefined. (In the equation 1 / (1-X), X=1 is a singularity). The event horizon is a singularity in equations for relativity. At this point, length and time are 0, and mass is undefined. The second singularity is what everybody always thinks of. That is a point mass, or a point with 0 volume and finite mass. Density = mass/volume. Finite/0 is undefined, so a point mass is a singularity of a different sort. However, I should note that a point mass is only required for small black holes. As the radius varies with the mass, and the volume of a sphere varies with the cube of the radius, the density of a black hole is proportional to the inverse square of its mass. When you get to the millions or billions of solar mass black holes, the density is very low and no point mass is necessary.

Comment: Re:He didn't disclose what he wasn't asked (Score 1) 282

He answered yes by raising his hand. He then volunteered ONE example. He was not asked to disclose all cases. He did not misrepresent anything. He did not state he only had one lawsuit, or answer any questions as to how many lawsuits he had been involved in. That's not his fault for those questions not being asked.

What the judge said is "All right, let's go to Mr. Hogan". You are trying to say "Mr. Hogan didn't have to say anything because that's not a question, the judge just said 'let's go' and that means nothing!" However, standard voir dire instructions are that when you raise your hand and it is "your turn", you must explain your answer in "narrative form". So the reason he gave an example is not because he volunteered an example without prompting. It was because he was instructed that, when picked by the judge, he must elaborate on his yes/no answer. To repeat that, he was required to explain his answer. The judge did not vocalize that requirement at that time, because it was part of the previous instructions. That's why all of the people who raised their hand were not asked explicitly to elaborate, but they all did when he called their names. Since he was, in fact, instructed to explain, he was required to answer truthfully. Omissions are considered deceit as far as the court is concerned.

Comment: Re:Not sure if you can post anonymously early or n (Score 1) 405

by canajin56 (#41367431) Attached to: Are SSDs Finally Worth the Money?
It wasn't a question of "5 times as much an SSD" (and of course much more if the SSD is idle or off) it was a question of "too much power and heat to be used in a residential situation." It's foolish to have 1TB of ram in a desktop and then never be able to turn it off without losing everything, but not because the power consumption is so high that you couldn't use residential wiring ;)

Comment: Re:Aliens? (Score 1) 94

by canajin56 (#41366675) Attached to: Australian Study Backs Major Assumption of Cosmology

This doesn't change much. As mentioned, this is a pretty fundamental assumption. What this assumption gets you is that if you go big enough, all of the differences in mass distribution smooth out and everywhere is just like everywhere else. There will be a "typical" cluster of galaxies that "most" are "pretty close" to. And within such a typical cluster you can talk of a "typical" galaxy, and a "typical" star within that galaxy. But are we a typical planet in a typical solar system in a typical galaxy in a typical local cluster in a typical supercluster? Unknown ;)

What's more important is how common solar systems with terrestrial and gas giant planets are. If there are rocky planets, it's thought that more or less they will turn out the same at the same distance from the sun, (scaled by the sun's intensity of course), and depending on their mass for how well they can hold onto an atmosphere. (And of course that's wishy washy, it's argued whether or not Mars would be earth-like at our distance, if it would still have been too small to hold onto an atmosphere long-term, and if the a large moon is necessary to keep the magnetic field rolling). More or less the distance and primary's luminosity will determine atmospheric temperature, and that will determine the rate of out-gassing, and you'll get all kinds of feedback, and either end up with a Venus, Earth, or Mars depending on how the atmospheric pressure and temperature equilibriums end up balanced. There doesn't appear to be a HUGE amount of variance in elemental abundance between solar systems, except according to their age. (Even that is more of a quick rule of thumb than a hard curve). This of course isn't settled by any means. Then you have things that are less settled. How important is a moon to things? Some say our magnetic field would be gone by now without the tidal forces of the moon keeping the core etc. churning away. Others say that's silly, but it might be a bit weaker by now. Then you have to figure out how much water and such we got from bombardment by comets flung out of orbit by gas giants. How many and how large of gas giants do you need to typically get that effect? Is it even strictly necessary, or just handy? Would we have still ended up Earth-like (with much smaller oceans perhaps?) without Late Heavy Bombardment? Or would we have frozen solid without the greenhouse effect of all that water? Or did most of our water come from within anyway so at most we would just have slightly smaller oceans and slightly lower temperature? If gas giants are needed, we at least have spotted those all over the place. (In fact we've spotted them around stars we thought shouldn't have any!)

None of that is really helped or hindered by the homogeneity of the entire universe. If we can get the telescope resolution to make fair estimates on the likelihood of earth-like planets (for some definition of that term) throughout the Milky Way, then we can maybe look at nearby galaxies and guestimate how likely those stars are to be like our own stars...and from there if we can eventually look far enough we can say "OK well by homogeneity most galaxies are probably pretty close to this, so maybe earth-like planets are around about this common...ish".

Comment: Re:Comparison to HL2 port from Valve? (Score 5, Informative) 130

by canajin56 (#41337673) Attached to: <em>Black Mesa</em> Released
Half-Life: Source used all of the same models and maps, but added the physics engine for rag-doll effects, used shaders for improved water effects, had some limited dynamic lighting improvements (I think?), replaced the pre-rendered 16-bit skybox with dynamic effects, and cleaned up the specular/normal maps for better bump mapping and such. That is, it was a port to a new engine, with almost no changes to the content other than the cleaned-up normal maps and the quick switch-out of the skybox. Black Mesa is not a port, but a remake. They redid all of the maps and most of the models that weren't available already as part of HL2, so it takes full advantage of all the new shaders and lighting stuff, and has much higher resolution textures and models.

Comment: I hate Odds Ratios (Score 1) 114

by canajin56 (#41325239) Attached to: Scientists Themselves Play Large Role In Bad Reporting

One of the worst "bad abstract tricks" is putting your findings as Odds Ratios. What's an Odds Ratio? You probably know that the "probability" of an event is "Event over Total". The probability of rolling a 6 on a standard die is 1/6. The "odds" of an event is "Event to Not Event". The odds of rolling a 6 are not 1:6, they are 1:5 for (or more often said, 5:1 against). So then the odds ratio (OR) of two groups is the ratio of ratios, or the ratio of the odds for one event compared to the odds of another. So a big source of confusion is thinking the odds and probability are the same thing. Clearly they aren't. And clearly the closer they get to even odds, the bigger the difference. The odds of tossing a coin and getting heads are 1:1, but that's a 1:2 probability.

An example of the odds ratio in action: You ask 1000 men if they smoke, and you get 300 who say "yes" (made up statistics). That's odds of 300 to 700, or 3:7. You ask 1000 women if they smoke, and 250 say "yes". That's odds of 250:750, or 1:3. The odds ratio is then (3:7) : (1:3) or 9:7, or 1.2857...:1 So in the abstract you will see that this study has found that males have an OR of 1.29 when compared with women. And they'll just sit back and let the journalists call that "almost 30% more likely!" When it's not. That's how much higher the odds are, and odds are not probability! And of course you can't forget about confidence intervals. It's actually even worse than that. An increasing number of medical papers will take the OR of 20:1 and go straight to "20 fold more likely to blank!" when the probability ratio is 3.5:1 not 20:1.

Part of the problem is not enough statistics courses for scientists. I had to take 2 as part of my degree, and they never covered odds ratios, or odds at all actually. Only probabilities, which are more useful to reason about usually. This is further compounded by people using odds and probability interchangeably. I see on things like scratch and wins and store give aways "Odds of winning 1 in 3", which is a probability.

Comment: Re:I have some issues interpreting that statement (Score 3, Informative) 117

by canajin56 (#41315263) Attached to: Foxconn Says Vocational Students Aren't Being 'Forced' To Work
To add actual numbers: In the USA the suicide rate is 11.8 per 100,000 people per year, compared to China's overall 22.2. However, this is for all people. In Foxconn's worst year, they had 14 suicides, or 1.5 suicides per 100,000 employees. Making it extremely low compared to the national average for either China or the USA. Or about 2 per 100,000 if you restrict the death and employee counts to their worst (in terms of suicide) factory complex. As you said, this is about equal to the roughly 2 per 100,000 retail employees murdered per year for assorted reasons. At any rate, to get a fair comparison you would have to look at workplace suicide rates for factory employees in the USA, not just at the grand total. And as far as I know, there aren't really many such statistics available.

Comment: Re:Collection != leak (Score 1) 216

by canajin56 (#41237913) Attached to: FBI Denies It Held iPhone UDIDs Stolen By AntiSec
I'd imagine that some people have their home address in their phone for GPS purposes. Or, the trojan could have been monitoring movements via GPS, and whoever was running it could have been reversing that into probable addresses. Or it could be cross referenced. If they use their wifi at home, the trojan could get an IP address. Many online stores will connect your IP address to your zip code and/or your address, and sell that data point to geomapping services. Even stores that do not sell online, but have a "find a store near me" will sell the same data. It's not always very accurate as people tend to put fake zip codes in when it doesn't matter. But still. It's important to remember that many (or most?) of these rows do not have address or zipcode information. AntiSec redacted those columns before releasing it so we actually don't even know they were present at all, and if they were, what percentage of rows had these data.

Nothing is easier than to denounce the evildoer; nothing is more difficult than to understand him. - Fyodor Dostoevski