Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

350 is not very many questions.

Why don't you just shuffleshuffle the list when the user starts the game and avoid duplicates altogether?

This takes very little processing power (even a crappy mobile phone can do the operation in milliseconds) and minimal memory (store pointers or indexes to questions and not the question itself....the order can be stored in memory client side if you want to avoid the incremental server side storage).

If you are picking questions sequentially at random, there is a VERY high probability that the user will see a question she has answered recently.

  • Over the course of a 350 card game, there is >99% chance that the user will have seen a duplicate question within the last 5 questions and a >63% chance of the same question appearing immediately after it was just asked.

Shuffling is a conventional approach to this pattern. It's used by music players to randomize play lists while avoiding duplicates.

350 is not very many questions.

Why don't you just shuffle the list when the user starts the game and avoid duplicates altogether?

This takes very little processing power (even a crappy mobile phone can do the operation in milliseconds) and minimal memory (store pointers or indexes to questions and not the question itself....the order can be stored in memory client side if you want to avoid the incremental server side storage).

If you are picking questions sequentially at random, there is a VERY high probability that the user will see a question she has answered recently.

  • Over the course of a 350 card game, there is >99% chance that the user will have seen a duplicate question within the last 5 questions and a >63% chance of the same question appearing immediately after it was just asked.

Shuffling is a conventional approach to this pattern. It's used by music players to randomize play lists while avoiding duplicates.

350 is not very many questions.

Why don't you just shuffle the list when the user starts the game and avoid duplicates altogether?

This takes very little processing power (even a crappy mobile phone can do the operation in milliseconds) and minimal memory (store pointers or indexes to questions and not the question itself....the order can be stored in memory client side if you want to avoid the incremental server side storage).

If you are picking questions sequentially at random, there is a VERY high probability that the user will see a question she has answered recently.

  • Over the course of a 350 card game, there is >99% chance that the user will have seen a duplicate question within the last 5 questions and a >63% chance of the same question appearing immediately after it was just asked.

Shuffling is a conventional approach to this pattern. It's used by music players to randomize play lists while avoiding duplicates.

added 197 characters in body; added 89 characters in body
Source Link
tohster
  • 41.3k
  • 14
  • 108
  • 140

350 is not very many questions.

Why don't you just shuffle the list when the user starts the game and avoid duplicates altogether?

This takes very little processing power (even a crappy mobile phone can do the operation very quicklyin milliseconds) and minimal memory (store pointers or indexes to questions and not the question itself....the order can be stored in memory client side if you want to avoid the incremental server side storage).

If you are picking questions sequentially at random, there is a VERY high probability that the user will see a question she has answered recently.

  • Over the course of a 350 card game, there is >99% chance that the user will have seen a duplicate question within the last 5 questions and a >63% chance of the same question appearing immediately after it was just asked.

Shuffling is a conventional approach to this pattern. It's used by music players to randomize play lists while avoiding duplicates.

350 is not very many questions.

Why don't you just shuffle the list when the user starts the game and avoid duplicates altogether?

This takes very little processing power (even a crappy mobile phone can do the operation very quickly) and minimal memory (store pointers or indexes to questions and not the question itself....the order can be stored in memory client side).

If you are picking questions sequentially at random, there is a VERY high probability that the user will see a question she has answered recently.

Shuffling is a conventional approach to this pattern. It's used by music players to randomize play lists while avoiding duplicates.

350 is not very many questions.

Why don't you just shuffle the list when the user starts the game and avoid duplicates altogether?

This takes very little processing power (even a crappy mobile phone can do the operation in milliseconds) and minimal memory (store pointers or indexes to questions and not the question itself....the order can be stored in memory client side if you want to avoid the incremental server side storage).

If you are picking questions sequentially at random, there is a VERY high probability that the user will see a question she has answered recently.

  • Over the course of a 350 card game, there is >99% chance that the user will have seen a duplicate question within the last 5 questions and a >63% chance of the same question appearing immediately after it was just asked.

Shuffling is a conventional approach to this pattern. It's used by music players to randomize play lists while avoiding duplicates.

Source Link
tohster
  • 41.3k
  • 14
  • 108
  • 140

350 is not very many questions.

Why don't you just shuffle the list when the user starts the game and avoid duplicates altogether?

This takes very little processing power (even a crappy mobile phone can do the operation very quickly) and minimal memory (store pointers or indexes to questions and not the question itself....the order can be stored in memory client side).

If you are picking questions sequentially at random, there is a VERY high probability that the user will see a question she has answered recently.

Shuffling is a conventional approach to this pattern. It's used by music players to randomize play lists while avoiding duplicates.