News for hackers. Stuff that matters.

rlwolfcastle

I hope you have unsoldered your microphone also.
Strangely, the name of the submitters company is "Additive Analytics"
Ignoring that some of the variables don't match up properly (the arrays: card and Card), it seems like the explanation of the first flaw may also be flawed.

Flaw #1: An Off-by-One Error

The algorithm above tries to iterate over each card in the deck, swapping each card with another randomly chosen card in the deck. However—every programmer has made this mistake before—there's an off-by-one error. The function random(n) returns a number between 0 and (n-1), not between 1 and n as the programmer intends. As a result, the algorithm will never swap the 52nd card with itself; the 52nd card can never end up in the 52nd place. So that is the first reason the "random" card shuffling isn't really random.

The comment refers to the Pascal code:

  random_number := random(51)+1;
If the programmer really thought that random was between 1 and n then the random_number variable would be a number between 2 and 52 (1+1 to 51+1). It seems like, instead, a better explanation is that they may have thought random(n) produced a random number between 0 and n, hence the need to increment by one. Another explanation is they just messed up the slicing using 51 instead of 52.

The point being that in the writer's explanation of the flaw they actually make the same mistake.

Funnily enough googling "pascal random" points to a stackoverflow article where the best answer makes the same error.

https://stackoverflow.com/questions/4965863/how-to-get-a-ran...

With increasing population, it is incredibly simple.

Choose one:

  1. Live further away
  2. Increase number of people per living abode
  3. Increase number of living abodes per space
Numbers one and two are personal choice, number three is political.
Re:New era of fast genetic engineering on Tuesday January 28, 2014 @11:10PM (#7141809)
The debugger hasn't been born yet.
Re:Kids, this is story of How I Met... my VPS hacked on Tuesday January 21, 2014 @04:49AM (#7094305)
The port change is a cosmetic difference that does not alter the security of your box one iota. All it currently does is reduce the number of unauthorized attempted logins.

If your box is more vulnerable on port 22 than port 22221 then your problems run orders of magnitude deeper than which port your ssh server runs on.

Re:Telegram secret chat geolocation leak on Wednesday December 25, 2013 @12:08PM (#6963415)
What they need is military grade math Ph.Ds
Re:Soylent Micronutrient Breakdown on Friday December 13, 2013 @01:37AM (#6899389)
There is also no evidence that the quantities and ratios of nutrients in the formula are anywhere near complete or optimal.

The easiest way to illustrate how this can be a problem is to compare the difference between growing cells in minimal media versus complex media, where they grow much faster.

Soylent is basically a crude minimal media for humans. The proper comparison for soylent will be against someone who is eating a complete diet, not someone who is skipping meals or eating poorly.

Re:Soylent Micronutrient Breakdown on Friday December 13, 2013 @01:26AM (#6899359)
Why are you assuming that humans have a craving for the "innate satisfaction of eating?"

If you remove that artificial restriction then something like soylent makes a lot more sense.

Re:Soylent Micronutrient Breakdown on Friday December 13, 2013 @01:16AM (#6899334)
Personally, I think soylent, as a daily meal replacement, is a horrible idea but, like a lot of things, it will find it's place.

I'm not sure I understand what point you are trying to make above. The argument (as I read it) is that we studied nutrition 70 years ago, Rob isn't a nutritionist, and there is something else you prefer to soylent so it's irrational and no one should use it? That may be an esoteric argument against soylent and Rob but not the idea of soylent.

If you could theoretically develop a solution that you only needed to drink once a day to get all of the nutrients your body needs and feel satiated, why wouldn't you drink that? You could then spend your time doing other things that are more important to you. While for some people they may prefer preparing and cooking food, which is fine, it's not a substantive argument against soylent for those who view eating differently.

The value people get from eating seems a lot fuzzier and humanistic than soylent, which, to me, seems incredibly robotic and rational.

Re:Soylent Micronutrient Breakdown on Thursday December 12, 2013 @11:20PM (#6899059)
You should remind him that biology is not computing.
Re:Soylent Micronutrient Breakdown on Thursday December 12, 2013 @11:15PM (#6899039)
Defined Human Minimal Media.

It's an interesting question, just what nutrients does the human body need in order to sustain itself? We have a good definition of what individual cells need but not a lot of data for how the body copes long term with just those nutrients. My guess is that will power will lose out in the end.

Re:Soylent Micronutrient Breakdown on Thursday December 12, 2013 @11:02PM (#6899003)
Is that 100 mg total or 100 mg per serve?
Re:Bitcoin and Gold on Tuesday November 26, 2013 @08:30AM (#6801020)
There is one difference between gold and bitcoin. When you break the encryption on gold, it is still gold.
Bodek ... is famous among traders for having broken the Street's omertà and complained to the Securities Exchange Commission in 2011 -- after his own HFT firm, Trading Machines, crashed and burned

More disgruntled trader than whistleblower?

Re:Empty-Stomach Intelligence on Monday November 11, 2013 @12:37AM (#6710152)
The stimulation of hunger, the researchers announced in the March issue of Nature Neuroscience, causes mice to take in information more quickly, and to retain it better — basically, it makes them smarter. And that’s very likely to be true for humans as well.

I am a little sceptical of the claim in the last sentence.

Re:Lowering the cost of basic biological research on Monday September 30, 2013 @10:01PM (#6473592)
Reproducibility seems like it could be a problem.
Re:Don’t Slurp: How to Read Files in Python on Friday September 27, 2013 @11:15PM (#6460745)
1. Get it to work

2. Test that it works

3. Optimize (if needed)

If your file is small enough and is a trivial percentage of the overall run time, who cares how it is read?

Re:Rat Park Experiment: A New Theory of Addiction on Monday September 16, 2013 @05:22AM (#6392335)
There have been criticisms of the study’s design and the few attempts that have been made to replicate the results have been mixed.

It's tempting to read too much into these types of results when they are not reproducible.

Re:Google encrypts data amid backlash against NSA spying on Saturday September 07, 2013 @03:36AM (#6344252)
So I guess, maybe, Eric doesn't have a high enough security clearance to know what is really being done then?
Re:Australian Coalition retracts Internet filters policy on Thursday September 05, 2013 @09:55AM (#6334167)
Instead, they will just classify your server as being an unapproved device that circumvents the filter.
Re:Australian Coalition retracts Internet filters policy on Thursday September 05, 2013 @09:52AM (#6334150)
It was poorly worded because it was too obvious what the LNPs future plans are.
Re:Showing stored passwords – Tim Berners-Lee on Saturday August 24, 2013 @07:47PM (#6270269)
Your comment is all over the shop.

I don't understand the big deal here. You shouldn't be storing your passwords at all in a browser.

http://raidersec.blogspot.com.au/2013/06/how-browsers-store-...

Re:Tools used by influential developers and designers on Saturday August 17, 2013 @08:14AM (#6228887)
It's like the worst of both worlds.
Re:Tools used by influential developers and designers on Saturday August 17, 2013 @08:10AM (#6228872)
The data just represents the population it was taken from. The problem is the inference the author tries to imply.
Or are they just waiting for everything in it to become classified?
Re:Meet the Dread Pirate Roberts, the man behind Silk Road on Thursday August 15, 2013 @02:00AM (#6216380)
I wouldn't believe any of what DPR said is actually true.
People were getting ahead of themselves in this story.

It never made any sense that if this was occurring one hundred times a day that it would not have been mentioned somewhere else before now given the current focus on privacy and the NSA.

Re:How We Increased Our Conversion Rate By 311% on Monday July 29, 2013 @03:24AM (#6119764)
But what do I do if I want to increase my conversion rate by 312 %?
Re:Thanks For The Identity Theft, Yahoo on Saturday July 20, 2013 @08:52AM (#6075056)
Sure, a few people will lose their identity, but millions will get good email addresses!

Older »