On 1/17/06, Steve O'Hara <[EMAIL PROTECTED]> wrote:
> Jay, If you're going to offer advice, at least do some basic research to
> make sure it's accurate.

Was it your intent to be insulting or are you just drunk?

>
> Firstly, having a column that has a random number in it and sorting by
> it produces the same output each time you query on it - obviously
> unsatisfactory and I would have thought, manor from heaven for card
> counters everywhere!!

If you don't reset the column to new random values on subsequent sorts
you're correct.
I thought that obvious enough it didn't need comment.
In any case, he didn't specify that he needed to do this repeatedly
for his application.
In an online exam I would doubt they present the questions twice.

>
> Secondly, the standard SQLite function random() is actually seeded by
> the current time and date every time you open a database.

Thanks for that useful bit of trivia. Automatically seeding the random function
is a bad idea and I'm surprised an otherwise well thought out package does it.
It makes regression testing of the engine and your programs very difficult.
Further, you assume that he's using the sqlite random function and not the
function from whatever language he's using.

My response was intended to explain the concept of the algorithm not
present a concrete solution. The algorithm was what he asked about.
If you had something positive to add perhaps you should have written
something positive to the original poster instead of insulting asides to
others.

Reply via email to