Due: Tue, 17 Jun 2014, 10pm
70 pts, 7% of total grade.
Write a program, individually, to solve The 3n+1 Problem in Python with some form of cache:
- 4073 (PYTH 3.2.3): The 3n plus 1 problem [pdf]
- 4765 (PYTH 2.7): The 3n plus 1 problem V2 [pdf] (5 bonus pts)
These are additional descriptions of the underlying math:
- Estimate time to completion.
- Get an educational account with 5 private repos at GitHub.
- Create a private Git repository at GitHub, named cs373-collatz.
- Add these requirements to the issue tracker at GitHub, at least 10 issues.
Add at least 10 more issues, one for each bug or feature, both open and closed with a good description and a label.
- Invite the grader to your private code repo.
- Confirm that the grader has invited you back to the public test repo.
- Clone your private code repo onto your local directory.
- Make at least 5 commits, one for each bug or feature.
If you cannot describe your changes in a sentence, you are not committing often enough.
Make meaningful commit messages identifying the corresponding issue in the issue tracker (see here).
- Clone the public class repo onto your local directory.
It is critical that you clone the public class repo into a different directory than the one you're using for your private code repo.
- Copy the code files from the clone of the public class repo to the clone of the private code repo.
- Run RunCollatz.py and TestCollatz.py, confirm the expected failures, and add, commit, and push to the private code repo.
- Write more unit tests in TestCollatz.py that test corner cases and failure cases until you have an average of 3 tests for each function, confirm the expected failures, and add, commit, and push to the private code repo.
- Implement and debug the simplest possible solution in collatz_eval() in Collatz.py with assertions that check pre-conditions, post-conditions, argument validity, and return-value validity, until all tests pass, and add, commit, and push to the private code repo.
- Combine Collatz.py and RunCollatz.py into SphereCollatz.py (don't forget to remove import).
- Create an account on Sphere.
- Submit SphereCollatz.py to Sphere and confirm the likely result of time exceeded or wrong answer.
- Debug the code until it's accepted by Sphere, and add, commit, and push to the private code repo.
- Create 1000 lines of acceptance tests in RunCollatz.in and RunCollatz.out that test corner cases and failure cases, and add, commit, and push to the private code repo.
- Clone the public test repo onto your local directory.
It is critical that you clone the public test repo into a different directory than the one you're using for your private code repo.
- Copy your unit tests and your acceptance tests to your clone of the public test repo, rename the files, do a git pull to synchronize your clone, and then add, commit and push to the public test repo.
The files MUST be named <cs-username>-RunCollatz.in, <cs-username>-RunCollatz.out, <cs-username>-TestCollatz.py, and <cs-username>-TestCollatz.out in the public test repo.
- Implement and debug the simplest possible cache until all tests pass, and add, commit, and push to the private code repo.
- Submit and debug until accepted by Sphere and add, commit, and push to the private code repo.
- Run pydoc on Collatz.py, which will create Collatz.html, that then documents the interfaces to your functions.
Create inline comments if you need to explain the why of a particular implementation.
Use a consistent coding convention with good variable names, good indentation, blank lines, and blank spaces.
- Create a log of your commits in Collatz.log.
- Obtain the git SHA with
git rev-parse HEAD
- Fill in the Google Form.
- It is your responsibility to protect your code from the rest of the students in the class. If your code gets out, you are as guilty as the recipient of academic dishonesty.
Requirements for getting a non-zero grade.
- [ 5 pts] GitHub private repo with grader invited as collaborator and a log of the commits.
- [ 5 pts] GitHub issue tracker with issues from requirements and more.
- [15 pts] Standard-compliant Python 3.2.3 accepted solution to Sphere 4073 (PYTH 3.2.3) with some form of cache.
- [15 pts] Average of 3 unit tests per function with good coverage in the public test repo with the precise naming of the files.
- [15 pts] 1000 lines of acceptance tests in the public test repo with the precise naming of the files.
- [10 pts] Pydoc documentation.
- [ 5 pts] Google Form with time estimate.
- You can earn 5 bonus pts, if Sphere accepts your solution to 4765 (PYTH 2.7).
Bonus pts will not increase the total score beyond the max score.
- Git Cheat Sheet
- Git Generating SSH Keys
- Git Guide
- Git Guides
- Git Immersion
- Git Reference
- Google Python Style Guide
- Try GitHub
|Name||GitHub ID||GitHub Test Repository||Google Form|
|Raul Cardenas||rulises||collatz-tests||Google Form|