Show HN: Using flamegraphs to read big HN threads
trungdq88.github.io
trungdq88.github.io
So here is my attempt to solve it with flamegraph. What do you think?
You can load another thread by appending #thread_id to the end. For example, here is the graph for this very thread:
https://trungdq88.github.io/hn-big-threads/index.html#257138...
I'm not sure why GitHub doesn't load the page when the "index.html" part is missing, but I have to go now so I don't have time to check it, maybe later.
I also enjoy the double entendre of “flame graph” here for the flame war that you chose :).
It’s not clear to me that I’d label the “functions” with the username. I’m not sure what other very short summary you might use, but I’d prefer something content related rather than poster.
I choose to use the username because in big threads, most of the bars are very thin. There isn't much room to show anything anyway...
But I think if you just made it so that hover loaded the complete comment either as a popup or actually down below, and click zoomed the context, this would be perfect, and by far my favorite way to browse large comment threads (on any website).
- The bars are now ordered correctly based on votes
- Tooltip now shows comment.substring(0, 100)
- Show direct childs of the selected comment
- Added paddings and some small info notations
- New cached data for the default link (> 3500 comments now, it would take a good 15 mins if loaded manually from your browser)
It is still a crappy code, and there are many improvements can be made. Most importantly a proper navigation behavior with back button. I'll get back to this if I have more time!
The code is on my GitHub [1], feel free to send PR or just create your own page.
The old page is still available in [2] just in case someone don't want/agree with my improvements :)
[1] https://github.com/trungdq88/hn-big-threads
[2] https://trungdq88.github.io/hn-big-threads/old.html
Thanks!
I would use this every day as a browser extension for HN/reddit. the vertical minimap would probably be the ideal implementation.
Fly-to navigation for narrowing scope makes sense. IMO, a complete feature-set would still include something like ctrl-scroll for vertical expand and shift-scroll for horizontal expand.
Realistically, maybe, for minimap-on-focus: "a"+"scroll": zoom "s"+"scroll": expand-vertical "d"+"scroll": expand-horizontal
javascript:location.href="https://trungdq88.github.io/hn-big-threads/#" + location.href.split('item?id=')[1]
And the problem of big flame-tongues is more of a HN/reddit reply format, i.e. I don't know if it can be solved by another UI. People using the default UI in such threads reply only to the first comment, because it's the only way to be seen. Nobody reads past few first top-comments.
I guess it's very much opinionated, because people first time on 4chan tend to get lost, but I've long came to conclusion that the imageboard reply format is the best there can be, especially with some simple UI tweaks. You can follow threads easily, you can reply to any number of comments, you can link several discussions into one. It's easy to spot a post with lots of replies. It's easy to scroll, unlike HN comments. The downside is that 3000-comment thread would terribly slow down your browser, about the 1000 is the upper-limit I guess, and usually threads are just split into series of multiple threads on the 500-post mark. But that obviously wouldn't work anyway if the main feature is to order posts based on the number of votes. So, alternative UI like that for HN wouldn't help very much either.
What would really help on HN is the ability to collapse all of the children w/o collapsing the parent-post itself, and showing multiple top-level posts on a single page when children are collapsed. This way you could browse for the discussions you are interested in and expand them further.
But anyways, I like your point about the usability of the imageboard format. I really don't like the Reddit/HN style
Is dang reading this thread?
Very much agree, for big threads here and on reddit I manually do this a lot without even thinking. It would be trivial as an extension or user script in hindsight.
There's a lot of excellent content buried which is quite frustrating. Top level comments tend to add far more of interest than the typical to and fro that goes on inside the replies.
If I'm not interested in a comment, then I'm not interested in its replies either. I've never understood why comments are treated differently from posts in this regard. The front page isn't presented with all comments expanded.
Even as an exaggeration, this is probably untrue ?
Agree, the new version of the page addresses this by listing the direct replies of a selected comment. But yeah, this prototype would need a lot more works on it to become useful.
Anyway, thanks for sharing!
It makes sense now that I figured it out (the bottom n rows keep expanding to be the full width, meaning you can always breadcrumb back) but that wasn't immediately obvious to me.
This is a cool idea though and definitely allows me to see the 'controversial' threads because they're usually the biggest flames :)
Does this order left-to-right based on the upvotes that HN itself uses for ordering?
If there is enough interest, I'll consider putting some more time and make it actually usable :)
Oh, and I'm not sure about the left-to-right order really. Maybe it's ordered as what HN API return (I did it in a hurry so didn't check)
I’m trying to think of how you can convert some ancillary information with color (with accessible fallbacks of course). Maybe color coded users? So you could see the same colors gravitating around threads.
I’m not sure how many unique users comment on an average thread though and how useful that would be. Maybe only showing unique colors for users with more than 2 posts in a thread?
I love it though. Great job
I'm interested to learn more on the tech stack behind this project.
the data comes from the firebase API: https://github.com/trungdq88/hn-big-threads/blob/master/code...
the dataviz: https://github.com/trungdq88/hn-big-threads/blob/master/inde...
is using the d3.js plugin "flamegraph": https://github.com/spiermar/d3-flame-graph
https://chrome.google.com/webstore/detail/hacker-news-enhanc...
All the features still work, but I really want to turn of some (like the new style).
In Usenet flamewars were more personal and ended up in death threats often. Actual deaths occurred too, I remember one mass murder resulted from discussion in misc.invest. In Helsinki a women got facial lacerations from puukko-knife after a flamewar in Sfnet.