Please keep track of which comments are new. July 26, 2009 6:24 PM   Subscribe

Feature request: Keep track of which comments are new to a post since I last read it.

I just gave up trying to implement this myself with greasemonkey and local storage options present in some of the newer fangled browsers. Having failed utterly, I'd really like it if there was some little horizontal rule inserted after the previously newest comment or something letting me know at which point in the list of comments ones that are new since my last visit are. I waste a lot of time sort of scrolling down, reading parts of ones that look new, scrolling up, until I find one I recognize so I can start following down from that comment again. I often don't like to miss comments.

Does this seem feasible? Or is there some work around that can get me this? One idea I came up with that would not contribute to the comment quality at metafilter is to require myself that I leave some stupid comment every time I read and come back to a post, so that I can easily go through my activity and find where I was last.

I sincerely apologize if this has been brought up before or if there's a known easy way to do this. I searched hard, I think.
posted by floam to Feature Requests at 6:24 PM (37 comments total)

This post was deleted for the following reason: Poster's Request -- frimble



Plutor's Metafilter Scroll Tag (found here most recently).
posted by potch at 6:26 PM on July 26, 2009


You can also favorite a post and track it via Recent Activity>My Favorites. This isn't the specific feature you're looking for, but it beats a blank.

Recent Activity>My Comments does let you easily link back to your last comment in threads.
posted by Brandon Blatcher at 6:31 PM on July 26, 2009


floam - I assume the imperfectness of the "X new" link is due to caching of the current article list or somesuch.

providing a true and exact link to the first unseen comment in each thread would require a bunch more hot data storage and CPU cycles to implement - when displaying the front page the server can't just look up a cached list of articles and comment counts, but in addition would need to both look up the last viewed comment ID in each thread that's visible on the page and then query the *contents* of that post to see if there are any newer comments. it wouldn't surprise me if this imposed a non-trivial load on the database server. given the tradeoffs, a cached "X new" link per thread seems pretty reasonable to me.
posted by russm at 7:36 PM on July 26, 2009


Yes, this has been brought up before, but I think this is the most petulant version of it.
posted by smackfu at 7:56 PM on July 26, 2009 [2 favorites]


The powers of computer science should provide some way to provide this trivially.

pb is pretty good with the computer-science-y stuff, but we have limited resources and only so much time and this is not high on the list of priorities, basically. The existing (x new) functionality is useful in some contexts but admittedly far from ideal; the greasemonkey solution by all reports delivers the requested functionality with aplomb.
posted by cortex (staff) at 8:13 PM on July 26, 2009


floam - unfortunately, saying "the computers should be able to do it some easy way" doesn't make it so. for example, if you want client-side javascript to do it, then the client needs to go and poll all the posts to see how many new posts have been made since the timestamp or comment number that's stored on the client, providing accurate links at the expense of page load times and server load.

if the answer is it doesn't work and MeFi is better off without the feature then so be it, all I'm saying is that just because a feature looks trivial at first glance doesn't mean that it's even vaguely simple to implement in a way that'll scale to a heavily trafficed system.

/me shrugs, wanders off...
posted by russm at 8:28 PM on July 26, 2009


The short answer is that we haven't found a way to do this efficiently. We know that the current x new counts are an approximate guess at best, and we have a constantly running background process of considering ways to improve it. Every month or so we have a conversation that starts, "what if we tracked read-comments this way..." and it almost always ends with "that would cripple the server" or something similar.

Using cookies for storage is problematic because many people read the site on multiple machines. If you read several threads at work and want to catch up with the rest at home, that's too bad. So we want to do it right, store everything on the server side, and that requirement usually stumps us. So our current less-than-ideal solution stays in place. Yes, it's a guess based on fuzzy times, but it works across machines and at least gives some indication of new activity.
posted by pb (staff) at 9:11 PM on July 26, 2009


it's useless.

It's not. It works quite effectively for a very common scenario: you load the front page, read a few things, then go off and do other things for a few hours. Then you come back, reload the front page, and the "X new" links point to the last comment you read before you left off.

The key part of the above is "a few hours". It only resets after not visiting the site for something like 60 minutes. If there's no such gap in activity, it will never reset.
posted by Rhomboid at 9:20 PM on July 26, 2009


Seems like it would be trivial to store the highest comment ID on the page in document.cookie and restore the position on subsequent page loads using document.location.href (or throw a button up top "jump to last read" if that's too annoying). That'd offload any performance impact to the client entirely. Yeah it wouldn't work across different machines, but it's better than nothing IMO. The GreaseMonkey script is cool, but I switched to webkit-based browser a while ago.

I've never gotten the front page new comments link to work, I assume because I get to the threads via RSS initially instead of the front page.

I wonder if I could hack this together with a bookmarklet, now that I think about it..
posted by cj_ at 9:33 PM on July 26, 2009


cj_, yes you need to visit the front page, or one of the front page tabs to set a Last Visit time. So if you only enter the site via threads, the new comment counts won't work for you. But if you never visit the front page, you shouldn't need the new comment counts.
posted by pb (staff) at 9:38 PM on July 26, 2009


floam: Else they should just rip out the new count, it's useless.

This is a classic example of coder brainrot: the phenomenon which occurs when programmers (or even users) get so caught up in the mathematics of a problem that they start to focus exclusively on absolute precision and forget that the point is practical utility.

In other words, I have a hard time thinking of a case in which it will be essentially important to know that there are eleven new comments rather than twelve or ten. If there are 47 new comments, I really don't care if it says there are 50 or 45, since I know anyway that there are a bunch; and if it says 5, well, I know there are a few, and that's all that really matters.

I mean, is somebody really gonna click through based on the fact that the count says “32 new” and be disappointed when there are actually 31?
posted by koeselitz at 9:40 PM on July 26, 2009


And if you're one of us that is obsessed with knowing when even one new comment has occurred, you're probably loading the pages in tabs and hitting CTRL-TAB, F5, CTRL-TAB, F5 obsessively andway.
posted by koeselitz at 9:42 PM on July 26, 2009


floam: As it is now, but in happy-floam-land you'd also have something marking your position in the thread itself (or some "jump to" link, as mentioned by cj_).

Well, potch mentioned the easy solution which does precisely this in the first comment in this thread, for what it's worth: Plutor's Metafilter Scroll Tag Greasemonkey script marks threads for you with a bar, making it easy to return to unread comments. So: quit trying to do it yourself in Greasemonkey and let Plutor do it for you.
posted by koeselitz at 9:49 PM on July 26, 2009


It kinda ‘fixes’ the ‘X new’ link so that it does what you want it to. Very cool.
posted by koeselitz at 9:51 PM on July 26, 2009


p.s.: This:

koeselitz: So: quit trying to do it yourself in Greasemonkey and let Plutor do it for you.

came out sounding a hell of a lot snottier than I meant it to. Sorry if it was grating.

To be honest, I'm spectacularly craptastic at Greasemonkey scripts myself.
posted by koeselitz at 9:56 PM on July 26, 2009


It's not. It works quite effectively for a very common scenario: you load the front page, read a few things, then go off and do other things for a few hours.

...AND you have the default text size set on your browser.

We who squint gave up on it years ago - though I think it's likely beyond the powers of even pb to fix this.
posted by pompomtom at 10:11 PM on July 26, 2009


What hack do you use to run GreaseMonkey on Safari 4? I'm not terribly familiar with GM scripting but I assume it's just javascript, I might be able to debug this one.

> But if you never visit the front page, you shouldn't need the new comment counts.

I should clarify, I don't care what the counts are, just being able to revisit threads and easily find where I left off. I noticed the (n new) link sets an anchor point, but it's not useful if your initial entry point is RSS, sadly.
posted by cj_ at 10:16 PM on July 26, 2009


I don't really know if it's Scroll Tag or Mefi Navigator, but those scripts are fucking brilliant and make tracking my place in threads a breeze.

(Except sometimes when I close my browser, then it seems to reset.)
posted by graventy at 10:17 PM on July 26, 2009


Yeah SIMBL is pretty awful, but I couldn't use Safari without glims, adblock and keywurl. I wish they'd get their act together and provide a real public API for plugins.

I'll see if I can whip the GM script into shape to work with GreaseKit, I miss this functionality a lot since switching browsers.
posted by cj_ at 10:40 PM on July 26, 2009


OK, I fixed it and put up a GreaseKit compatible version here.

If you're curious, GK removed a function for security reasons, which you can read about here. The thread shows a work-around for implementing GM_getValue() as a cookie, which I pasted into the script.

Working fine for me now.
posted by cj_ at 11:03 PM on July 26, 2009


On preview: I'm not sure about your other scripts that stopped working, but it could be the same issue. The way to debug this is to enable the Developer menu in Safari's Settings -> Advanced and then in the Develop menu select "Show Error Console". Then hit the page your script is meant to be called on and if the console complains about an undefined reference to "GM_getValue", you need to edit the script and add a workaround function to the javascript file. Look in Library/Application Support/SIMBL/Plugins, edit the javascript, and paste in the Cookie code (you can find it in the thread I linked above). I recommend putting it near the top of the file after the comment/metadata.

I'm using whatever the latest GreaseKit is from http://8-p.info/greasekit/ and whatever SIMBL shipped with Glims.
posted by cj_ at 11:13 PM on July 26, 2009


petulant? what?
posted by theora55 at 4:58 AM on July 27, 2009


cj_: "OK, I fixed it and put up a GreaseKit compatible version here. If you're curious, GK removed a function for security reasons, which you can read about here."

That's handy, I'll add a link to that version on the userscripts page. But dear god that's a terrible fix. Couldn't they have just implemented GM_setValue as cookie-creation?

(Aside: I really, really hope that they're working on making the GreaseKit security better. Greasemonkey went through a "oh god, everything is exposed everywhere" cycle a while back, but it got straightened out with much help from some smart MoFo folks. I hope the Webkit/Safari folks can be as accommodating.)
posted by Plutor at 5:11 AM on July 27, 2009


Why don't you just click the "recent activity" link to see new posts since your last?

Also, on my side, if I click the "x new" link, it takes me to the first post since my last visit, regardless of how many there actually were.
posted by TomMelee at 5:59 AM on July 27, 2009


CREATE TABLE LastSeen
(
UserId int NOT NULL,
ThreadId int NOT NULL,
ViewDateTime DATETIME
)

SELECT Count(*) 
         FROM Comments JOIN LastSeen ON Comments.ThreadId = LastSeen.ThreadId AND Comments.PostDate > LastSeen.ViewDateTime
         WHERE LastSeen.UserId=@UserId

posted by blue_beetle at 8:00 AM on July 27, 2009


We've been over this more than once before. Something like ten thousand active users. Something like ten thousand open threads. Easily hundreds of thousands of comments in those threads. The work to optimize that query is not worth the couple of dozen users who aren't served by the current algorithm.
posted by Plutor at 8:29 AM on July 27, 2009


Using cookies for storage is problematic because many people read the site on multiple machines.

Incidentally, even GMail's notifier doesn't get this right. It will tell you all the new messages since you last used that computer, even if you've been notified about them on another one.
posted by smackfu at 8:49 AM on July 27, 2009


"but we have limited resources and only so much time and this is not high on the list of priorities" - Cortex


Soooo ...what is high on the list of priorities? Aside from moderation and maintenance, what Next Bestest Thing are you guys working on?
posted by The Whelk at 10:26 AM on July 27, 2009


Well, they just improved the duplicate checker on the new post page. And I think there was some talk about rolling the 10th anniversary features back into normal meetup functionality.
posted by smackfu at 12:39 PM on July 27, 2009


The Whelk-
I posted a secret pony on the secret pony request forum that pb create a wicked database and some fuzzy logic to scan every post for redundancy, snark, whining, -ism, and ist-ness, while simultaneously mirroring all post data live on a series of .xml files that users could use to write their own wicked scripts and toys.

Those of us on the secret pony secret forum are already delta-testing his work. Lemme tell you-he's amazing.

If I were you, I'd post a pony request that upon reaching X number of useful posts you automagically get an invite to the secret pony secret request forum.

It's uberleet.
posted by TomMelee at 1:06 PM on July 27, 2009


Holy crap I just got an automated email kicking me off the secret pony secret request forum for admitting that it exists.

There is no cabal!
posted by TomMelee at 1:07 PM on July 27, 2009


> That's handy, I'll add a link to that version on the userscripts page. But dear god that's a terrible fix. Couldn't they have just implemented GM_setValue as cookie-creation?

Yeah, I'm not sure what's going on over there, I only found out the project existed from this thread. There might be a cleaner workaround but I didn't want to spend too much time on it so just copy-pasted. I assume they'll add GM_get/setValue when they get their act together. Seems pretty crippled without it.

Incidentally, if you use my version, don't nuke your cookies or you'll lose your spot since it's using that for the persistent storage.
posted by cj_ at 2:41 PM on July 27, 2009


blue_beetle: "CREATE TABLE LastSeen"

If you honestly thing new feature = "I can write a SQL statement", you are either being willfully obtuse or, well, that's the only explanation I can come up with.
posted by potch at 3:54 PM on July 27, 2009


Pony Request: a profile page feature that constantly updates and displays the exact hexcode color of my penetratingly blue eyes are at any given moment. It is not opt-outable.
posted by The Whelk at 5:58 PM on July 27, 2009


I wish we could all choose the color of our profile pages, like Pink Superhero. If you hang out on the green all day, why have a blue profile page? Specifying 6 hex digits can't be a security risk...
posted by smackfu at 6:05 PM on July 27, 2009


Metafilter penetrated me with her #006699 eyes.
posted by Rhomboid at 6:19 PM on July 27, 2009


Hey floam, I just noticed that the GreaseKit hack was setting the cookie to session expiry, which means it loses your place when you restart Safari. I made it one year instead. You can download it from the same place.

(Also cleaned up the atrocious code, since my name is attached to this thing. :P)
posted by cj_ at 7:15 PM on July 27, 2009


« Older Meetup at Philly Folk Fest?   |   Good day at Black Rock Newer »

This thread has been archived and is closed to new comments