neagle / gokibitz

Move-by-move comments on go games.
http://gokibitz.com
MIT License
109 stars 20 forks source link

Pre-fetch comments for next / previous moves #28

Open neagle opened 9 years ago

neagle commented 9 years ago

It's probably worth figuring out a smart way to fetch comments for nearby moves in advance. It's a pleasant experience when comments are just immediately in place, and on speedy connections that's usually pretty much what happens, but if you're in a coffee shop (as I am now), with a bit more latency, it can take almost a second.

Supplemental: It'd be nice to have some sort of loading indicator. I don't want it to make movement feel sluggish, but it's weird to have comments suddenly show up after a second. "Oh, I thought there weren't any comments on this move!"

sphaso commented 9 years ago

One thing I wondered when I first noticed the comment fetching strategy: is it really that costly to fetch all the comments as you load the game? Maybe trimming down the response (e.g. is the "userInfo" obj really useful? the kifu id?)?

neagle commented 9 years ago

Good question. The very first kernel of GoKibitz's existence was as a newly born Express app that provided a rest API for creating and retrieving comments for a given kifu id and a specific move. Each move was its own world with its own comment thread, so it made sense to me to be able to retrieve it individually.

Much later, it finally occurred to me to revisit this idea and I wondered the same thing: whether it was really worth dealing with asynchronous loading for each move, and the answer is that I don't know. I still like the idea of being able to make a comparatively light call, because users jump into games all over the place, and I like the idea at least, of not loading all 100 comments on a popular game when someone jumps in to a specific point.

In terms of real user experience, though, I haven't tested exactly what the difference would be and whether it's worth the added complexity. I still like the way this makes games light-weight no matter how many comments are on them (there is at least some theoretical scale where loading all the comments becomes cumbersome), but there's no question that this makes things more complicated than they otherwise could be.

sphaso commented 9 years ago

Ah I see. It is true that people hop on games all over the place, but a game of go starts on an empty board :) so someone (I imagine) would skim through the first 20 moves, and that's 20 calls. At the same time, the new "?path=xx" feature would make it more likely to link to positions instead of whole games. In the latter case, fetching comments for one move at the time would make more sense. I'm guessing this is a case of "in medio stat virtus" as you mentioned in your first post :) either fetch nearby comments or adding a loading icon sound like a great improvement to me.

CmdrDats commented 8 years ago

+1 for this - I find gokibitz kinda unusable for this reason, because I go through the game looking for the comments - easy to miss if it doesn't load up.

A useful stopgap might be to load up whether a node has comments or not along with the move - that way at least you can say 'hey! this move has comments, wait up for them'

neagle commented 8 years ago

I appreciate knowing this is an issue, @CmdrDats. Are you on a particularly slow connection, out of curiosity?

The stopgap you suggest is actually a pretty good idea. I'll see if I can look into that sometime soon.

CmdrDats commented 8 years ago

Not crazy slow (10mb line) - It's probably more because there's a half a second of lag before comment shows, so as I'm skimming through the game I don't see the existence of a comment on a node. That said - perhaps I shouldn't be skimming so much xD

CmdrDats commented 8 years ago

PS. I'm in South Africa, so perhaps that is a contributing factor xD

cannanieltf commented 8 years ago

That's the reason I initially wanted the skip to comment button. That way I can browse to all of them without missing any.

neagle commented 8 years ago

Skimming is totally valid, even if for didactic purposes it might be a good idea to go slowly at times. :) But, yeah, this is definitely a usability issue that I need to address.