is the "Most Read Threads" page correct all the time?

Message Bookmarked
Bookmark Removed

Because right now the most popular thread is supposedly:

Thread Number of Reads

Oink Invites 295
Passive aggressive housemates.. 204
Ask Miss Lauren P Questions... 103
To Lurkdom or Bust: Alex in NYC says Kinda Bye for a Little While... 89

First one was locked in 2007 and the last one in the list was last updated on April 23rd, 2008.

I'm not saying it's impossible, but how can these threads be the most popular this last hour? ???

StanM, Saturday, 25 July 2009 18:45 (fifteen years ago)

Just refreshed. That Alex in NYC thread is gone and the first place, our of nowhere:

Thread Number of Reads
2008 Rolling Beauty/Fashion Thread 1051
Oink Invites 356
Come anticipate whatever the next Batman film after 'The Dark Knight' will be 80
Actually terrible album covers of 2009 63
DJs post your mixes for download 62

StanM, Saturday, 25 July 2009 18:47 (fifteen years ago)

It should be right, yes... Over half of ILX's hits come from Googlers, so I guess it reflects what's being Googled, for one reason or another.

Keith, Saturday, 25 July 2009 18:54 (fifteen years ago)

77 threads don't show up on the list, i thought the system sort of randomly subbed in threads from other boards in place of them

velko, Saturday, 25 July 2009 19:19 (fifteen years ago)

why in the world would you think that

Beanbag the Gardener (WmC), Saturday, 25 July 2009 19:30 (fifteen years ago)

is that the number of users that have read the thread in the past few days, or what?

SB Idiot (k3vin k.), Saturday, 25 July 2009 19:32 (fifteen years ago)

i remember when 77 started and was very active, the most read page would have the weirdest threads show up with huge numbers that could not have been google bait
xpost

velko, Saturday, 25 July 2009 19:41 (fifteen years ago)

this thread is now the second most read thread...huh?

SB Idiot (k3vin k.), Saturday, 25 July 2009 19:46 (fifteen years ago)

Makes a nice "thread connections" entry.

is the "Most Read Threads" page correct all the time? 229
Who gives a shit? 215

Beanbag the Gardener (WmC), Saturday, 25 July 2009 19:48 (fifteen years ago)

the 77 part was just speculation obv, but i do think there is some kind of glitch that sends random inactive threads way up the chart

i do think that the simpsons porn thread that shows up a lot on the most read page is google pervs tho

velko, Saturday, 25 July 2009 19:50 (fifteen years ago)

guess papers emporium

blobfish russian (harbl), Saturday, 25 July 2009 19:51 (fifteen years ago)

Well, whilst it's possible there is a bug, it really isn't doing anything tricky. Every time a given thread is read, an entry is recorded in a map and a counter gets incremented. Every hour, a job gets kicked off that sorts them into order of most read and picks up the top fifty and then clears it again, so it's not likely there's much wrong, but please let me know if you spot any bugs:


package com.conversationboard.cache.readcounter;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

import com.conversationboard.instrumentation.ObjectSize;

/**
* A cache to hold the number of times each thread has been read since server startup. It's used to feed a batch
* process that places threads in the cache if they're being read a lot but not written to. It's only of relevance
* when the caching mode is "Cache on write", since read threads will always be cached with a "Cache on read" policy.
*
* @author Keith
*
*/

public class ReadCounterCache {

private ConcurrentHashMap<String, ThreadCounter> readCounter = new ConcurrentHashMap<String, ThreadCounter>();
private static ReadCounterCache instance = null;

public static ReadCounterCache getInstance() {

if (instance == null) {
instance = new ReadCounterCache();
}

return instance;

}

public int getSizeInKilobytes() {
return ObjectSize.getSizeInKilobytes(readCounter);
}

public int size() {
return readCounter.size();
}

private String getKey(int boardId, int threadId) {
return boardId + "-" + threadId;
}

public void incrementThreadCounter(int boardId, int threadId) {

String key = getKey(boardId, threadId);

if (readCounter.containsKey(key)) {

ThreadCounter counter = readCounter.get(key);
counter.setCounter(counter.getCounter() + 1);

} else {
ThreadCounter counter = new ThreadCounter();
counter.setBoardId(boardId);
counter.setThreadId(threadId);
counter.setCounter(1l);

readCounter.put(key, counter);
}

}

public List<ThreadCounter> getMostPopularThreads() {

List<ThreadCounter> tempPopularThreads = new ArrayList<ThreadCounter>(readCounter.values());
Collections.sort(tempPopularThreads);

/* Now only take the top 50 */

List<ThreadCounter> mostPopularThreads = new ArrayList<ThreadCounter>(50);

int i = 0;

for (ThreadCounter counter : tempPopularThreads) {

mostPopularThreads.add(counter);
i++;

if (i >= 50) {
break;
}
}

return mostPopularThreads;
}

public void clear() {
readCounter.clear();
}

}

Keith, Saturday, 25 July 2009 19:55 (fifteen years ago)

You'll notice the lack of:

if (borad == 77) etc.

Keith, Saturday, 25 July 2009 19:57 (fifteen years ago)

Missing a part of the picture here, though - whilst it clocks all threads, it only shows results on threads on public boards:


<c:forEach var="thread" items="${popularThreads}">
<c:if test="${thread.publicThread}">
<tr class="row">
<td class="cell"><a href="${contextPath}/ThreadSelectedControllerServlet?boardid=${thread.boardId}&threadid=${thread.threadId}">${thread.title}</a></td>
<td class="cell">${thread.counter}</td>
</tr>
</c:if>
</c:forEach>

Keith, Saturday, 25 July 2009 20:23 (fifteen years ago)

Is no-one impressed with me layin' down the science?

Keith, Saturday, 25 July 2009 20:30 (fifteen years ago)

it's v v pretty

blobfish russian (harbl), Saturday, 25 July 2009 20:40 (fifteen years ago)

That Simpson's Porn thread has been near the top of the threads-hit-by-Googlers since ever I started collecting stats.

stet, Saturday, 25 July 2009 20:42 (fifteen years ago)

it's v v pretty

I think so - I've often tried to make a pretty picture out of it, but failed.

Keith, Saturday, 25 July 2009 20:43 (fifteen years ago)

lol@people still googling for oink invites.

f1f0 (Pashmina), Saturday, 25 July 2009 20:49 (fifteen years ago)

so these are the most read threads of the past hour?

SB Idiot (k3vin k.), Saturday, 25 July 2009 20:53 (fifteen years ago)

Yes

Keith, Saturday, 25 July 2009 20:56 (fifteen years ago)

wau ilx is the first google result for "oink invites"!

SB Idiot (k3vin k.), Saturday, 25 July 2009 21:05 (fifteen years ago)

That Simpson's Porn thread has been near the top of the threads-hit-by-Googlers since ever I started collecting stats.

― stet, Saturday, July 25, 2009 3:42 PM (38 minutes ago) Bookmark

i noticed this a while ago and thought which ilxors are constantly looking at that thread??? then i realized googlers duh

Hillary had Everest in his veins (sunny successor), Saturday, 25 July 2009 21:23 (fifteen years ago)

i mean i noticed simpsons porn thread was always in most read threads

Hillary had Everest in his veins (sunny successor), Saturday, 25 July 2009 21:23 (fifteen years ago)

I'm very impressed that you included smileys in the source code, Keith. Well done.

	private String getKey(int boardId, int threadId) {
return boardId + "-" + threadId;

What's this "_" ? Long eyelashes?

StanM, Saturday, 25 July 2009 21:25 (fifteen years ago)

It's peppered with smileys, yes. Most of it says borad instead of board too.

Keith, Saturday, 25 July 2009 22:55 (fifteen years ago)

OK, so I changed this, to record whether threads were read by people coming direct from ILX, or linked to from somewhere else (e.g. Google), so this should shed some light on the mystery that is who reads ILX threads.

Only been running for two minutes and will be more interesting at busy times, but you can look now: Most Read Threads

Keith, Sunday, 26 July 2009 15:03 (fifteen years ago)

neat!

biter and groan vivant (k3vin k.), Sunday, 26 July 2009 15:06 (fifteen years ago)

Bear in mind that if the more paranoid among you are using something to suppress your "Referer" header in the browser, then your use will be clocked as a search engine hit. Not that anyone on ILX is paranoid.

Keith, Sunday, 26 July 2009 15:06 (fifteen years ago)

mom placation was ironing by which mens perrypops in a womansuit is the new child mystericating teats that can taint baconated digestive broads plastercasting gnostically from the great gospel wwjh

0 ilxor reads
14 referrer reads

!!

Hillary had Everest in his veins (sunny successor), Sunday, 26 July 2009 16:12 (fifteen years ago)

gotta be the teats

Beanbag the Gardener (WmC), Sunday, 26 July 2009 16:17 (fifteen years ago)

a+ keith, very cool

max, Sunday, 26 July 2009 16:23 (fifteen years ago)

ha, 37 googlers must be getting confused hitting my "going to lock it" super-Brit comic sans thread.

stet, Sunday, 26 July 2009 16:24 (fifteen years ago)

haha this is great

blobfish russian (harbl), Sunday, 26 July 2009 16:44 (fifteen years ago)

Dave Matthews Band : Name Your Reasons Why They Are So Bad & Hated. 49 0 49

blobfish russian (harbl), Sunday, 26 July 2009 16:44 (fifteen years ago)

googlers searching for sarahel???

velko, Sunday, 26 July 2009 16:59 (fifteen years ago)

could be the more paranoid among us using something to repress their referrer header

blobfish russian (harbl), Sunday, 26 July 2009 17:01 (fifteen years ago)

suppress

blobfish russian (harbl), Sunday, 26 July 2009 17:02 (fifteen years ago)

sorry i am repressed

blobfish russian (harbl), Sunday, 26 July 2009 17:02 (fifteen years ago)

no wonder youve been moving all those masturbation threads to iltmi

max, Sunday, 26 July 2009 17:04 (fifteen years ago)

harbl is a tehresa sockpuppet?

velko, Sunday, 26 July 2009 17:10 (fifteen years ago)

Maybe this needs some tweaking. I'd be surprised if suddenly Googlers and ILXors alike starting looking for Physical Graffiti. Surprisingly, perhaps ILXors are paranoid! I'll change no referrer to just mean ILXors, because it's probably more likely that Googlers.

Keith, Sunday, 26 July 2009 18:13 (fifteen years ago)

Is "Most Read Threads" the only ILX stats page? What happened to the top posters of all time/month, that was interesting to have too...

master of karate and friendship for everyone (musically), Sunday, 26 July 2009 18:23 (fifteen years ago)

Yeah, I took that out some time ago. There were a variety of reasons, one technical, in that I changed the database the thing ran on, so it would've needed some level of tuning, but also because of something Tom Ewing wrote got me thinking about how people who posted a lot sort of got automatic status, which is kind of right, and I wasn't sure that was how things should be. Maybe some time I'll stick at least some of it back in, or perhaps a month-by-month thing, which wouldn't have that effect.

Keith, Sunday, 26 July 2009 18:27 (fifteen years ago)

i think if there is still a glitch it has something to do with bookmarks. i noticed it on the sandbox, one thread getting read twice every hour, over and over

PASS WORD THE GAME SHOW (avuenjo), Sunday, 26 July 2009 18:34 (fifteen years ago)

y'all should put google ads on those those popular googler pages. then buy beers. it's revenue-neutral.

Kerm, Sunday, 26 July 2009 18:38 (fifteen years ago)

i think if there is still a glitch it has something to do with bookmarks. i noticed it on the sandbox, one thread getting read twice every hour, over and over

Not sure why you think there's an issue with bookmarks...You can see the code up thread (appreciate that it might not mean much to you, if you're not a programmer); but there's nothing to do with bookmarks. There is only one call in the whole codebase to the incrementThreadCounter method is when you look at a thread, and at that point, it doesn't have any idea as to whether that's because you arrived because of a bookmark or not.

Keith, Sunday, 26 July 2009 18:49 (fifteen years ago)

Ooh! This is very cool. Thank you!
I only started this thread because some of the numbers just seemed a bit unlikely, and this still doesn't explain that, but it certainly helps. (like why threads that have been locked for years suddenly become the most read on ILX, only to disappear off that page and be replaced by another one with thousands of reads as soon as I hit refresh)

StanM, Sunday, 26 July 2009 22:11 (fifteen years ago)

Well, in looking at it since, there has been weird behaviour - I mean, why would like 75 Googlers all look at a single thread at once? I suppose maybe it's some other site somewhere linking to it, maybe. Though now there seem to be no Googlers... I don't quite get it.

Keith, Sunday, 26 July 2009 22:14 (fifteen years ago)

I apologize for asking yet another (after the previous "When does today start?") innocent and unimportant question that turns into a several day-long brainbreaking code-rewrite requiring quest for you :-(

StanM, Sunday, 26 July 2009 22:24 (fifteen years ago)

Oh hey don't worry about that, I wouldn't have done it, if I wasn't interested in doing it...

Keith, Sunday, 26 July 2009 22:24 (fifteen years ago)

And that's why you rule. Thank you!

StanM, Sunday, 26 July 2009 22:31 (fifteen years ago)


You must be logged in to post. Please either login here, or if you are not registered, you may register here.