cs373-collatz's People
cs373-collatz's Issues
Acceptance Tests
The grader's GitHub account will have a public Git repository for unit tests and acceptance tests.
Write acceptance tests before your write the code. When you encounter a bug, write an acceptance test that fails, fix the bug, and confirm that the acceptance test passes. Write an auxiliary program to randomly generate acceptance tests. Create at least 1000 acceptance tests. Tests corner cases and failure cases. Push and pull the acceptance tests to and from the grader's repository. Prepend - to the file names at GitHub (i.e. foo-RunCollatz.in and foo-RunCollatz.out). Reach consensus on the acceptance tests.
Use a cache to make the code faster
Use a eager cache
Documentation
Use pydoc to document the interfaces.
The above documentation only needs to be generated for Collatz.py. Comment each function meaningfully. Use comments only if you need to explain the why of a particular implementation. Choose a coding convention and be consistent. Use good variable names. Write readable code with good indentation, blank lines, and blank spaces.
Issue Tracker
The GitHub repository comes with an issue tracker.
Create an issue for each of the requirements in this table. Create an issue for each bug or feature, both open and closed. Categorize, prioritize, and describe each issue adequately. Create at least 10 more issues in addition to the requirements in this table.
Add assertions
Add assertions in the new helper
Allow pairs to work both ways
range can work with i, j and j, i
Implementation
Use assert to check pre-conditions, post-conditions, argument validity, return-value validity, and invariants. Worry about this last, but your program should run as fast as possible and use as little memory as possible.
Submission
Perform the submission below.
Sphere is not accepting
It says it times out
Find the perfect cache size
Index out of bounds
There's an index out of bounds when cache is under 1000000
Unit Tests
The grader's GitHub account will have a public Git repository for unit tests and acceptance tests.
Write unit tests before you write the code. When you encounter a bug, write a unit test that fails, fix the bug, and confirm that the unit test passes. Write at least 3 unit tests for each function. Tests corner cases and failure cases. Name tests logically. Push and pull the unit tests to and from the grader's repository. Prepend - to the file names at GitHub (i.e. foo-TestCollatz.py and foo-TestCollatz.py.out). Reach consensus on the unit tests.
Recursion for collatz
Try using recursion
Make size of cache a variable
This makes the changing of the cache easier
GitHub
Create a student GitHub account.
Sphere
Create a Sphere account.
Write collatz helper
The helper should make things look nicer
Write a better helper for the cycles
Writing a helper method makes the program run faster.
Sphere
Sphere requires a single file to be submitted.
Combine Collatz.py and RunCollatz.py.
This is the file that the grader will submit to Sphere to determine a zero vs. non-zero grade.
Git Repository
Set up a private Git repository at GitHub, named cs373-collatz.
Invite the grader to your repository. Commit at least 5 times. Commit once for each bug or feature. If you cannot describe your changes in a sentence, you are not committing often enough. Write meaningful commit messages and identify the corresponding issue in the issue tracker (below). Create a log of the commits. Push frequently. 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.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.