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

add support for error reporting and logging #50

Closed
wants to merge 7 commits into from
Closed

add support for error reporting and logging #50

wants to merge 7 commits into from

Conversation

andy5995
Copy link
Contributor

This code will need tweaking, but I think it's a good start. I'd be
happy to discuss it further before it's committed to the main fork. The
biggest thing this new routine needs is an error check so that the log
files won't exceed a pre-determined size.

andy5995 and others added 3 commits August 25, 2016 02:24
This code will need tweaking, but I think it's a good start. I'd be
happy to discuss it further before it's committed to the main fork. The
biggest thing this new routine needs is an error check so that the log
files won't exceed a pre-determined size.
Deleted duplicate Star Trek question - one that was better-phrased is in
q_39.
Reformatted answer with punctuation in q_07
andy5995 added 2 commits August 25, 2016 13:58
When this .c program is built, it will put a number at the beginning of
each line question file. The result? Each question has a unique number
and can be more easily referenced. If this program is used, PLEASE read
the comments before running it.
@@ -359,6 +365,13 @@ def _stop(self, *args):
self._save_game()
self.factory.running = False

def _write_log(self, logfile, f, q):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm really not a big fan of single letter variables.

I'm guessing 'f' is 'filename' and 'q' is question, but I abhor guessing what variables are supposed to mean and prefer more semantic names for things so there is no room for ambiguity.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@andy5995
Copy link
Contributor Author

I should be able to make those changes tomorrow.

Would you like me to wait though, @rawsonj ? Sounds like you may want to do some rewriting, or rethinking.

issue #27 - added show correct answer when someone wins
@rawsonj
Copy link
Owner

rawsonj commented Aug 27, 2016

Go ahead. I've been trying to find the time to do a rewrite of this bot for 3 years now.

@andy5995
Copy link
Contributor Author

Closing this pull request. I haven't figured out yet how to separate unrelated commits.

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

Successfully merging this pull request may close these issues.

2 participants