-
Notifications
You must be signed in to change notification settings - Fork 33
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
Geico Command #54
Geico Command #54
Conversation
different golf clubs save you different amounts
I apologize for that pull request, please ignore it. That was not the version I intended to use. |
Now the file is correct, i apologize again, i am very new to Github |
Welcome, rytonbay, and thank you for your effort. It is fine to be a beginner, we all were once. Also, this project explicitly welcomes beginners and the practice of "fooling around". There are bugs in your program. For example on line 17: it tests whether I'll add comments to your last commit to point out the problems. Please take your time to address them and feel free to ask for help whenever you need it. You can ask your questions here, on IRC (#redspider at foonetic.net) or in the forum thread. We also have a wiki which may answer some of your questions and is worth having a look at anyway. Please post here again when you think all bugs are solved. :) |
@@ -0,0 +1,44 @@ | |||
#! /usr/bin/env python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python
may mean "Python 2" on some systems and "Python 3" on others. Your program seems to assume Python 2 so you may have to change this to python2
. Alternatively, you can add the following line after line 7:
from __future__ import print_function
and then use print
as a function everywhere, i.e. wrap what is printed in parentheses. That would make your program compatible with both Python 2 and Python 3.
Note that setup.py won't install this, because it's not in it's list of programs to install. |
All true, but let's not pile up all remaining tasks at once. |
i still have work to do on other files but the command should be looking better
i also added Geico.py to the setup and made a few changes to Geico.py
@@ -0,0 +1 @@ | |||
Geico Help:Prompt 1: How much does your insurance currently cost?: reply with an integer, do not use a $ sign or a decimal value.Prompt 2: Which golf club would you like to use to threaten your agent?: reply with "Putter", "5iron", "7iron", "Wood" or "Driver"Prompt 3: How intimidating can you look with a [your club choice]? (1-10): reply with an integer (it can bee less than 1 or greater than ten as long as it is an integer, this can be used to save LOTS of money)how does it work?: total cost = insurancecost * (1 - (insurance saving percent based on club choice + (strength/100))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your program is fairly straightforward to use, so it's not really necessary to explain its usage so meticulously.
It would be nice if you could explain something about the idea behind your program. For example, you could write something humorous about why people need your program. It would also be interesting to know why the program is called "Geico".
Lastly, it would be good to remove the ".py" from the filename.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all of the help, I am having trouble testing it for many reasons but Wesley and I are making progress towards a solution. Also, I agree with your opinions on the help file (which I named incorrectly anyway), that was just a first draft which I will continue editing.
--Bryton
Sent from your iPhone
On Oct 24, 2013, at 11:10 AM, Julian Gonggrijp [email protected] wrote:
In doc/Geico.py.txt:
@@ -0,0 +1 @@
+Geico Help:Prompt 1: How much does your insurance currently cost?: reply with an integer, do not use a $ sign or a decimal value.
Prompt 2: Which golf club would you like to use to threaten your agent?: reply with "Putter", "5iron", "7iron", "Wood" or "Driver"
Prompt 3: How intimidating can you look with a [your club choice]? (1-10): reply with an integer (it can bee less than 1 or greater than ten as long as it is an integer, this can be used to save LOTS of money)
how does it work?:
total cost = insurancecost * (1 - (insurance saving percent based on club choice + (strength/100)))
Your program is fairly straightforward to use, so it's not really necessary to explain its usage so meticulously.It would be nice if you could explain something about the idea behind your program. For example, you could write something humorous about why people need your program. It would also be interesting to know why the program is called "Geico".
By the way, things would be more readable with a few newlines.
—
Reply to this email directly or view it on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to hear that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So two quick things:
A. When replying to github issues via email, don't include the original
email in the reply.
B. The ?: morestuff
thing in the prompts look a little funny. Maybe move
the :
to the end of the extended prompt?
@rytonbay It seems you have solved most issues, well done... But... Do you test your code before you push it? There are still some problems in Geico and I presume you would have found them if you had tested the program (but if I'm wrong please say so). I think there are a few things in particular that you should pay attention to:
If this is just hocus pocus to you, let me know and I'll add some more inline comments to the diff. |
The new help text is much better! I would still change a few things:
How's it going with the program? Do you just need more time or should I help out? |
I will make those changes to the help text. I figured out how to test my program so it is now fully functional, i think. The directions on GitHub for using the Red Spider Project don't work for me so i will post an issue at some point. I am using the latest OSX, i have made some progress towards a solution. |
Generally code gets hardwrapped at 80 characters |
@firerogue: true, but my comment on wrapping to (for example) 70 characters was about the help text. @rytonbay: you believe your program is now fully functional, but it seems you haven't pushed any new changes in the past two days. Do I understand correctly that you still need to publish the fixes for your program? I'll look out for your other issue. |
I think that the program is fully functional, I thought I pushed changes but I must have forgotten. My help text is not finished. Sent from your iPhone
|
Testing(For the other platforms.)
|
I tested it on Windows 7 and it all worked fine. |
I'm able to input nonsensical numbers.
I would think that insurance cost should be a positive, non-zero number. Also, the "intimidation" number doesn't check that the supplied input is between the bounds it suggests (1 - 10). |
Also, the formatting is inconsistent for money values. In the golf club prompts, the amounts are formatted as |
When I am at the first prompt ("How much does your insurance currently cost?"), I can't exit the program with |
For completeness' sake, mrhmouse tested Geico on Linux, so the program has now been tested on all platforms. @mrhmouse: good idea to test whether @rytonbay, I suggest you deal with these test results as follows:
After you've fixed the latter two points and the fixes to the doc are ready, I think we can merge your program. :) |
if you user inputs a negetive # for insurence cost or intimidation than the computer treats it as positive
I fixed the things you suggested except the 1-10 range checking issue. I want to keep that in there for people who are extra intimidating. [hahaha] |
Looking good. Now it's just a matter of those last few changes to the help file and we're set. |
wrapped text and rearranged
With two additional commits affecting the formatting of doc/Geico.txt. Conflicts: setup.py
Great! It's merged. Congratulations with your first completed contribution! The text wrapping doesn't seem to have come through, so I re-wrapped the doc. While I was at it I also made a small tweak to the line "how it works". I hope you don't mind. I recommend that you now do If you want to continue working on Geico, please do Please do anything else you start working on on a separate branch as well, and name the branch after the business you're working on. Base new branches always on the latest versions of master (as always there are exceptions to this rule of thumb but don't worry about that yet). So:
|
I have created a Geico command that involves golf clubs. I am sorry for any mistakes. Im still getting used to Github.