Live data from Hacker News

PG: What's your current take on reddit's comment system?

reddit.com

21–30 of 67 posts

Re: PG: What's your current take on reddit's comment system?

#21
post #19

Earlier quoted context omitted.

The approach I took on Diffle ( http://www.diffle.com/ - unfortunately it hasn't been exercised as we haven't really got traction yet) was to store the comment ID as a varbinary(255). A child comment takes the ID of the parent and then appends a 2-byte sequential number. So, the first comment is 0x0001, the second is 0x0002, a reply to the second is 0x00020001, a second reply is 0x00020002, the third is 0x0003, a rep…

Why not just store the parentid (can be another comment or the news topic), username (instead of userid so you don't have to access the users table), and votecount for each comment? Also, each comment should have a newsid field that points to the original newstopic. The left-most posts would have the parentid and newsid that were the same (or parentid can be zero, depending on how you do it). But any replies would ha…

How do you get the full thread for a given parent? Selecting based on the parentid alone gives you only immediate descendants. Recursive queries are generally a no-no, as they drag your performance down fairly quickly. Selecting based on the newsid gives you every single comment on the item, and then you'll have to do a lot of work (basically building up the full tree structure in memory) to find out which are children. For a site with traffic like news.yc, it's probably acceptable, but it's still more complicated to code than a simple select.

Re: PG: What's your current take on reddit's comment system?

#22
I would like if there is a function to hide and expand the comments. For example one click on a comment will hide itself and all its sub-comments. It is a good way to organize the discussions, and I always believe a website is at its best when scrolling is minimized.

Re: PG: What's your current take on reddit's comment system?

#23
post #19

Earlier quoted context omitted.

Why not just store the parentid (can be another comment or the news topic), username (instead of userid so you don't have to access the users table), and votecount for each comment? Also, each comment should have a newsid field that points to the original newstopic. The left-most posts would have the parentid and newsid that were the same (or parentid can be zero, depending on how you do it). But any replies would ha…

How do you get the full thread for a given parent? Selecting based on the parentid alone gives you only immediate descendants. Recursive queries are generally a no-no, as they drag your performance down fairly quickly. Selecting based on the newsid gives you every single comment on the item, and then you'll have to do a lot of work (basically building up the full tree structure in memory) to find out which are childr…

You would find the full thread by searching for comments with the appropriate newsid.

To simplify the recursive function (using data in memory, not in the database), you could also have another field, called indent, that stores the level in the comments.

You could find all the comments with one SQL statement (where newsid = news.id), then go through each level of each comment, and sort it that way.

You could even make the parentid field a double, so you would store 123.4 where 123 would be the parent and 4 would be the indentation level.

I guess the difference is, do you want to store everything in one field or have different fields for everything?

I think this gives the original poster many options to think about. To me, a recursive function would be easier to write than coming up with ways to combine multiple fields into one using MySQL.

I think the order of optimization is: 1) Optimize so you can use a cached result if it exists 2) If the cache is out of the date, try to make just one SQL call 3) don't use table joins 4) reorder the data as needed in memory, then save it to a cache

As far as the single SQL call goes, I don't think it matters whether you have 5 fields or 30 in the actual table as long as you only request the fields you need, but I could be wrong.

By the way, do you have any other interesting examples?

Re: PG: What's your current take on reddit's comment system?

#24
post #23

Earlier quoted context omitted.

How do you get the full thread for a given parent? Selecting based on the parentid alone gives you only immediate descendants. Recursive queries are generally a no-no, as they drag your performance down fairly quickly. Selecting based on the newsid gives you every single comment on the item, and then you'll have to do a lot of work (basically building up the full tree structure in memory) to find out which are childr…

You would find the full thread by searching for comments with the appropriate newsid. To simplify the recursive function (using data in memory, not in the database), you could also have another field, called indent, that stores the level in the comments. You could find all the comments with one SQL statement (where newsid = news.id), then go through each level of each comment, and sort it that way. You could even mak…

[deleted]

Re: PG: What's your current take on reddit's comment system?

#25
I have the same problem with reddit and digg: I like to read exceptionally downmodded comments. When comments get modded down so much that they are not displayed, and also they generate a lot of responses, it's the kind of thing I can help but look at. Like a train wreck I suppose.

It actually sucks me into the troll MORE when they get such special highlighting. I should say I do like how top level troll posts get put at the bottom for reddit.

Re: PG: What's your current take on reddit's comment system?

#27
post #5
post #2

While reddit's comment system is obviously an improvement over Slashdot's, I'm increasingly convinced that community makeup is far more important than the tool it uses.

I agree, basically. Except I think customs are as important as or more important than makeup. That's why I try to discourage ad hominems. To be fair to the reddits, it wasn't their fault that the discussion on reddit sank down toward that of digg and slashdot. They have really strong beliefs against censorship. They were never going to jump into a discussion and tell people to stop being jerks. But empirically it loo…

Lowtax (he runs somethingawful.com) gave a talk about web communities at UIUC a few years ago and he basically said without good moderation large sites will just degenerate into crap. The talk(http://www.acm.uiuc.edu/conference/2005/video/UIUC-ACM-RP05-...) takes 15 minutes or so to get into anything serious, but I think there are some good lessons in there.

Re: PG: What's your current take on reddit's comment system?

#28

On the topic of community makeup, here are some interesting findings that come from Yahoo's social scientists (using Yahoo lists as the dataset): 1) Small groups have higher numbers of core users 2) Private and semi-public groups have higher numbers of core users than public groups 3) People in private groups remain in the core for longer 4) A user who is in the core of one group is more likely to become a member of…

Alex, this is very interesting. Do you think there might be a way to get one's hands on the original? If there is a person/persons at Yahoo to contact I would do it, as this is something I have thought about quite a bit and would love to see more about the definitions of core, light, new, long-time, large and small.

You can email me if you like.

Re: PG: What's your current take on reddit's comment system?

#29
post #7

Earlier quoted context omitted.

If you're trying to mimic this forum with a database solution, it's going to be a pain. PG's keeping this stuff in memory, almost certainly as the tree that it is. edit on the edit: scratch that.

I mentioned a possible solution here: http://news.ycombinator.com/item?id=33902 , but I'm really commenting because there's a really cool connection between PG's approach of storing it as an in-memory tree and my approach of a 2048-bit index: Y'know how in a typical CS datastructures course you'll have to build a heap, and then reimplement with an array? A heap is conceptually a balanced binary tree where every leaf…

Just thinking off the cuff here, but couldn't one store a lisp-style list as a string in a relational database. If I was using Ruby on Rails, I could simply build a simple lisp interpreter in Ruby to parse the string, then capture it as an in-memory tree. This way I would only have active items in memory and could use some of the advantages of the standard web development platforms for whatever else I was doing.

Edit: See Ruby/Lisp for one such already built interpreter.

Re: PG: What's your current take on reddit's comment system?

#30
post #28

On the topic of community makeup, here are some interesting findings that come from Yahoo's social scientists (using Yahoo lists as the dataset): 1) Small groups have higher numbers of core users 2) Private and semi-public groups have higher numbers of core users than public groups 3) People in private groups remain in the core for longer 4) A user who is in the core of one group is more likely to become a member of…

Alex, this is very interesting. Do you think there might be a way to get one's hands on the original? If there is a person/persons at Yahoo to contact I would do it, as this is something I have thought about quite a bit and would love to see more about the definitions of core, light, new, long-time, large and small. You can email me if you like.

So I heard this talk at the Cornell Microsoft International Symposium on Self-Organizing Online Communities. The presentation was called "Implications for Future Research; Theory and Methods in Large Scale Analysis of Online Communities." And the three Yahoo presenters were Ravi Kumar, Andrew Tomkins, and Cameron Marlow. Not sure which one those three specifically, but I'm sure you could ask any of them.

I've developed this hobby of sneaking into academic conferences. It works best if when everyone else is wearing a suit and tie, you show up in shorts and a t-shirt. That way everyone just assumes that you're friends with one of the speakers, or else that you're Sergei Brin. :-)

Post reply on HN