Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging reported questions #51

Open
andy5995 opened this issue Aug 25, 2016 · 3 comments
Open

logging reported questions #51

andy5995 opened this issue Aug 25, 2016 · 3 comments

Comments

@andy5995
Copy link
Contributor

With regard to #50, is it a feature you're interested in?

If so, I thought what would be more effective is a user being able to report the question number.

I could write a program in C that would write a string at the start of each line, numbering them, so each line would start with a string such as
Q [ 000001 ]
Q [ 005929 ]

Using a string of the same length, each line could be renumbered in the future.

What are your thoughts on this?

@rawsonj
Copy link
Owner

rawsonj commented Aug 26, 2016

I'm kinda laughing to myself, because I was going to say "historically for this bot..." and that's just silly.

This bot is something like 4 years old now or so.

Anyway, the reason why the questions are not tagged in any way is because they've been shuffled around and reorganized several times due to scripted cleaning efforts in the past.

Also, due to the way the bot randomizes it's question grabbing, it basically necessitates shuffling the questions around to re-balance them since over time people clean up the questions by removing duplicates and such, making the files unbalanced and hence the randomness can get unbalanced. (This reminds me, they are likely out of balance and should be massaged.)

Due to this, I was kinda thinking we could just sha the question and put it at the beginning of the line, like Q [ 452feb ] which would likely do what is desired, essentially tagging each question with a unique number so it can be identified later. This would make adding new questions easier, because you wouldn't have to care what file you were adding them to or anything.

Really though, we've never had a problem with people reporting a question as being buggy. Everyone has scrollback on IRC, and you can just grep for the question through the files and find it.

We usually have problems with people caring enough to go through the trouble of doing it in the first place.

I think your logging you added is good enough, frankly. It identifies file name and question, which is enough. I think people having a ?report command to make identification of bad questions easier is likely all that's needed, and tagging each question unnecessary.

Hm, although... I think ?report should actually remove the question from the file, and place it into the reporting log.

So as the game goes on, people ?report, the questions files shrink, reducing the pool of questions to the good ones.

Bad questions get piled up into the reporting log, so they can be reviewed all at once and either fixed or discarded by an admin. Once the reporting file has been gone through by the admin, the admin can move it back into the questions folder, essentially re-adding them to the running game.

?report could also take a users message and log it, basically as the reason why the question was marked "bad".

Invocation would look like ?report bad question, doesn't make any sense. or ?report This one is just offensive... and we could log those too.

What do you think?

@andy5995
Copy link
Contributor Author

Hm, although... I think ?report should actually remove the question from the file, and place it into the reporting log.

I thought about that, too, but not sure it should be automatic. Someone may misuse the report feature, and it's pretty uncertain how frequently the admins will be able to review the reported queue.

And right now, the code I added is a bit unpredictable and will have to be worked on more. Sometimes the wrong answer is reported. I don't know why yet.

That's one reason I thought about numbering the questions. Not so much for the ease of referencing them in a file, but so the player can specify the number of the question, allowing greater flexibility for reporting.

?report could also take a users message and log it, basically as the reason why the question was marked "bad".

I completely agree.

I think users will be more likely to use a ?report feature if they have some assurance that the errors will be fixed eventually. A ?stats or ?news option could be added, to show a brief ChangeLog, and statistics such as "Since the last release, 120 questions have been corrected, 43 removed, and 28 added." Along with version and date information, so they could see the bot is being worked on.

Anyway, the reason why the questions are not tagged in any way is because they've been shuffled around and reorganized several times due to scripted cleaning efforts in the past.

Hmmm... well, the numbering (or sha as you suggested) can be pretty arbitray. When I read your explanation, I understand that once they are numbered, it would be better not to re-number or re-tag them after they've been initially tagged.

One thing that may help is a method where admins can send copies of the logs to the main triviabot project. e.g. using pastebin and posting to an triviabot-dev channel on IRC, and/or attaching them to a ticket. Whichever methods are selected should be included in the docs.

But to conclude, regarding the numbering, if you decide not to go with that, I'll still be helping to fix and upgrade the new ?report feature.

On a related note, I added #53

@rawsonj
Copy link
Owner

rawsonj commented Jun 6, 2018

So I think a thing that could be worthwhile here is to concatenate the questions and gzip them, then just access the gzipped file and hold pointers to the lines in the file and edit as required.

I could actually see building a few commands into triviabot that would make this relatively easy to do.

Command list:

  • ?report (user command): Reports the last question asked as being buggy, puts it into a list of reported questions.
  • ?ls-rq (admin command): Lists the reported questions in a pm to the admin.
  • ?edit-rq ["question"] <"answer"> (admin command): In a pm, an admin could edit the question at a particular number by giving its list number as reported by ls-rq, an optional "question" rephrasing then the "answer" to change. Editing a question removes it from the reported list.
  • ?del-rq (admin command): Removes the question entirely from the game. You'll never see it again.
  • ?pop-rq (admin command): Removes the question from the reported question list, doing nothing else.

I suppose this doesn't require putting all of the questions in one file, there could just be a list of file descriptors open where the descriptor is pointing to the line in the file where the question was fetched from.

Someday, I may even get around to doing this. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants