Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   CD Forum Support (http://www.chiefdelphi.com/forums/forumdisplay.php?f=8)
-   -   Spotlights seem repetitive (http://www.chiefdelphi.com/forums/showthread.php?t=20522)

Jeff Waegelin 04-29-2003 05:10 PM

Spotlights seem repetitive
 
Has anyone else noticed how the same few spotlighted quotes keep showing up? I know a few (like Jack's 71 "walking bot" quote) tend to show up more than others. Is there any reason for this?

D.J. Fluck 04-29-2003 05:21 PM

Yeah, I noticed that also... http://www.chiefdelphi.com/forums/spotlightlist.php?s= shows that there are 6 pages of spotlights with 30ish on each page...

On that page are they ordered in any particular way or is it randomized?

(hey my spotlight came up when I was posting this :D)

Amanda Morrison 04-29-2003 05:33 PM

I don't at all mean to sound conceited when I say this, but I don't like seeing my own name all the time. Have people just stopped spotlighting others? It was a big rage at first when it came out.

Search those posts!

Brandon Martus 04-29-2003 09:39 PM

mysql's random function is horrible... so I use it to grab 5 'random' records, and then use phps random function to grab a random 1 from those 5. Maybe I'll redesign it, and put a counter in so they are showed evenly...

Joe Ross 04-29-2003 10:42 PM

It's definetly a lot better then when I complained about it last time.

One way that might be easier is to just verify that all 5 spotlights that mysql gives you are different. Since it seems that mysql likes to give the same answer very often, using php's random function to pick from 5 quotes, 3 of which are the same, isn't going to give very good results.

Jack 04-29-2003 11:06 PM

come on here brandon :)

ok.. don't really know the setup of the spotlight table.. but I'd guess there's some autoindex. (1-x)

So....

SELECT max(spotlight_id) FROM spotlight_list

vB query...

$pick_this_one = rand(0, $spotlight_id_max);

SELECT * FROM spotlight_list WHERE spotlight_id = $pick_this_one

Yup... there ya go. :)

or... I guess you could base it on session time or system time. (IE: total_spotlights % some_value)

yeah... i know... i needs 2 queries :(
OR... assumeing that vB has some "master config" table which takes all the fields/rows and dumps it into an array, you could have a config value max_spotlight. That's like 100 extra bytes and only requires to be run when a post is spotlighted.

Jack

PS: FYI to anyone.. Brandon really doesn't need the big roadmap i gave him :).. I just wanted to have some fun

edit: the perfict way to bring down cd. Add a field to the user table which is updated every page refresh to the next spotlight_id :) - Would never get repeates tho

Brandon Martus 05-28-2003 03:54 PM

I just approved about 20some new spotlights.
I got behind. Just wanted to let those who care know.

Also wondering if the randomization has been any better?

sanddrag 05-28-2003 06:13 PM

Quote:

Originally posted by Brandon Martus
Also wondering if the randomization has been any better?
Seems like it has been somewhat better.

Jack 05-28-2003 06:43 PM

hehe....

I should make a script that calls different pages and logs which spotlight it gets. If it calls a page every 15 seconds, that's four times a minute. If I run it all night long, (say 11:00pm-6:00am) that's 7 hours. 4*60*7 = 1680 spotlights. woo... that sure would tell you if it really is random :)

Meh.. mabey this weekend :p

evulish 05-28-2003 11:32 PM

Have it run twice a second...and run it on 20 different machines...each with a T3+. *evil grin*

Jack 05-29-2003 03:02 PM

Quote:

Originally posted by evulish
Have it run twice a second...and run it on 20 different machines...each with a T3+. *evil grin*
yeah.. I could run my script twice a second here without really any problems.. however...

The source of index.php on cd is 67kb. Therefore, saying that I just ran it every second for 7 hours that would be 1.6 gb of traffic. I don't think brandon would be too happy with me, not of course to mention the load that would be placed on the server :cool:

sanddrag 05-29-2003 06:10 PM

Quote:

Originally posted by Jack
The source of index.php on cd is 67kb. Therefore, saying that I just ran it every second for 7 hours that would be 1.6 gb of traffic.
I'm not sure how V-bulletin works but couldn't you call just the forum header and not the entire page?

Jack 06-01-2003 07:39 AM

1 Attachment(s)
Hey all...

Well you're most likely going to yell NERD really loud because of this one, but oh well :)

As promised, I created a script which called the first 6240 characters from http://www.chiefdelphi.com/forums/index.php evey 10 seconds. All of this data was logged into a database. In total, I have 1837 records. (That's right, I logged the spotlight 1837 times!!)

Now, what did I find?

Well.. I'm not really great at giving all this stat stuff.. but here what I can figure out :)

Well... I logged a total of 169 unique spotlight quotes. However, the spotlight list actually shows 171 spotlights. Hehe.. I found the first thing which causes quotes to be selected more often.

The most selected quote was:
Success is the indescribable feeling you get when you see something you worked so hard on in front of thousands of people. - SlamminSammy

Now, why did this quote come up a whopping 24 times?? Well look.. It has to duplicate entries. (Look on the first spotlight page) There is the first bug. I'm going to guess that another "top quote" also is double quoted. I couldn't find the second repeat quickly.. brandon can find it in a snap with a little query.

Well... some basic overall stats. The quote most called had 24 times. The least called quotes (with a 4-way tie) had 4.

The "avgerage" should have been 10.

Ok.. so I really don't know how to give stats for this stuff very well.. Could some little math genius make them? :)

The only other thing I will say is that, Jeff W (from his first post) said that my quote (Look at 71's 'walking'...) he thought came up more often than others. Well.. personally I don't think I see it too often. But.. Jeff might be right. In my "study" that quote came up 20 times. It was the third highest.

Ok... I've attached a zip file which contains two csv files. One is for the # of times the quote appeared and the quote. The other are the raw entries; Time and quote.

Thanks all,

Jack

Brandon Martus 06-01-2003 12:20 PM

Nerd.

Jack 06-01-2003 10:06 PM

1 Attachment(s)
ok.. so I did a little bad thing and didn't realise that the script didn't stop. So.. I've now been running my script once every .75 secs calling index.php

I now have a total of 15742 records...

btw: for what those numbers are, the mean is the avgerage number of times the spotlight appeared.. and so on.. therefore, the numbers are the number of times a spotlight appears.

here are some stats from them:
Code:

Mean        93.14792899
Standard Error        0.904056592
Median        94
Mode        97
Standard Deviation        11.75273569
Sample Variance        138.1267963
Kurtosis        12.75661616
Skewness        -2.032873122
Range        112
Minimum        12
Maximum        124
Sum        15742
Count        169


Also.. I attached the raw stats... (not the acutal logs)

Can some math nerd tell us what this means?

Jack


All times are GMT -5. The time now is 02:38 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi