Lorne: Snakes? Uh-huh. And they came out of your what? Okay. Okay, well, did they get up there themselves or is this part of a, you know, a thing? No, I'm not judging...Do we fight snakes? Angel: Only if they're giant. Or demons. Or giant demons. Are they giant demon snakes? Lorne: Well, unless this guy's 30 feet tall, I'm thinking they're of the garden variety.

'Lineage'


Buffistas Building a Better Board  

Do you have problems, concerns or recommendations about the technical side of the Phoenix? Air them here. Compliments also welcome.

To-do list


bon bon - Jan 01, 2003 7:58:23 pm PST #2511 of 10000
It's five thousand for kissing, ten thousand for snuggling... End of list.

The who with the what now?

Whoops, I meant the full strap on request.

No, wait, that wasn't here.

(Someone asked her to add a period to the quote.)


John H - Jan 01, 2003 9:00:57 pm PST #2512 of 10000

It's the randomising that's broken.

ita, you can always do a more brute-force randomisation, like the ones that people used before mySQL introduced "order by random" with version 2.3 or whatever.

The recipe I'm using, on a 2.2 system, is:

srand((double) microtime() * 1000000);
$randomnumber = rand(1,$number_of_quotes);
$Query = "SELECT Charactername, Dialogue from Quotations where id=$randomnumber";

Where $number_of_quotes is a count of all the quotes.

Or you could just hard-code the number as the quotes DB doesn't change very often, and never without you knowing it.


Jon B. - Jan 01, 2003 9:03:58 pm PST #2513 of 10000
A turkey in every toilet -- only in America!

Or you could just hard-code the number as the quotes DB doesn't change very often, and never without you knowing it.

Weren't their plans to create a UI to add and correct quotes?


§ ita § - Jan 01, 2003 9:06:17 pm PST #2514 of 10000
Well not canonically, no, but this is transformative fiction.

Weren't their plans to create a UI to add and correct quotes?

It's on the list. I liked the current system because it only returns one row, and is neat and precise that way, and doesn't require much knowledge of the details of the quotes in the DB.

I don't want to return a recordset and run through it to a random point -- not every page.


John H - Jan 01, 2003 9:15:37 pm PST #2515 of 10000

plans to create a UI to add and correct quotes?

I volunteered. Mea culpa. I'll do it right now today if you let me do it non-object oriented! I just have a thing about OO. It's on my list of new year's resolutions along with Vietnamese.

I don't want to return a recordset and run through it to a random point -- not every page.

That's not what that code does though.

It picks a random number between one and the id of the last quote, then gets that quote.

Did the randomisation problem begin when you normalised the data, ita? Like now you're selecting the quote from one table and the ep title from another, right?


§ ita § - Jan 01, 2003 9:22:54 pm PST #2516 of 10000
Well not canonically, no, but this is transformative fiction.

The IDs don't have to be contiguous, John -- there's no quote ID 1, for instance. That's why I want the selection to be more tied to the DB.

And I think we have to keep the Phoenix code consistent -- as OO as we can make it.

The data's been normalised since the get go. The problem began about three weeks ago, IIRC. There had been no changes to data, table structure, or code at that time. I didn't fix the quote until afterwards.


Jon B. - Jan 01, 2003 9:24:15 pm PST #2517 of 10000
A turkey in every toilet -- only in America!

The problem began about three weeks ago, IIRC.

I think that's when somebody said something about it. I'd noticed it earlier but... uhhhh... forgot to say anything.


§ ita § - Jan 01, 2003 9:26:50 pm PST #2518 of 10000
Well not canonically, no, but this is transformative fiction.

Actually, when it was mentionedby Shawn, someone else said it had been going on for two weeks beforehand. No one else countered her estimation. That's all I have to go by, but it's certainly before the editing and after the normalisation, since it's been normalised since episode numbers were displayed.


John H - Jan 01, 2003 9:27:43 pm PST #2519 of 10000

The IDs don't have to be contiguous, John -- there's no quote ID 1, for instance.

OK, didn't know that.

we have to keep the Phoenix code consistent -- as OO as we can make it

Fair enough. I think I should read a good book about Object-Oriented PHP, or Object-oriented anything, really, try to get my head around it.

The problem began about three weeks ago, IIRC. There had been no changes to data, table structure, or code at that time. I didn't fix the quote until afterwards.

How weird.

The thing that strikes me is that it's the shortest of all possible quotes, isn't it? I wonder if that has anything to do with it? Short quote, short charactername, short title.

Or, another idea, maybe the server has some kind of caching thing going on where the same request gets cached, and, despite the fact it has "random" in it, it is in some sense the same request for a quote every time?

Yet another thought -- why don't we delete that quote from the DB and see what happens?


§ ita § - Jan 01, 2003 9:29:36 pm PST #2520 of 10000
Well not canonically, no, but this is transformative fiction.

How often are people getting it? I'm about one in ten ... which doesn't lend itself to the caching explanation.

I can certainly delete it.