Do a bit of internet research and write a paragraph on each of the following:
Your write-ups should be on paper suitable for hand-in at the start of class.
Do some Internet research to find a description of the practices that make up a specific agile development process (choose either XP or SCRUM). Then outline/list the basic practices that form the core of the method. In other words explain (briefly) the things that developers using this technique do to produce working systems.
Once you have briefly described the practices, explain where each of the tasks described in the waterfall model fit into your agile process. For example, how and when are requirements analyzed, and how are they recorded?
The generatePrimes code that you started working on in class 9/5 is due at the beginning of class. Please have your code in "final form" that you think is professional quality.
Study the Python style guide, PEP 8. Be prepared to discuss this in class to formulate our style guide for the semester.
A "clean" version of the PrimeGenerator class we have been developing in class. You may use any of the versions posted to our Socrates discussion page as a starting point. Use the list of Booleans data structure discussed in class to make your algorithm efficient, and make your code as simple, sparse, clean and readable as you can.
Make sure that your prererred development machine has the following tools that you can make use of:
You should also be comfortable creating and activating/deactivating a Python virtual environment (for Python 3).
I have posted a zip file in handouts/paystation that contains the Python code for the 1st iteration of our in-class TDD exercise. You should try to get the project up-to-date on your own computer. This will be a good chance to see that your development tools are working.
Briefly define/explain each of the following principles of TDD.
Imagine you are a newly minted software developer and have just been hired into a development group. Your manager says she's been hearing a lot about Test-Driven Development and she is wondering whether your team should adopt this technique. Write a couple of paragraphs that provide a thoughtful overview of what you think are the strengths and weaknesses of the TDD approach to developing software. You may do some Internet research to help you form and support your comments.
Using TDD, finish out our initial paystation functionality (finishing up tests for clear_after_buy and cancel. Then use TDD to evolve a new design where cancel returns a dictionary inidcating what coins need to be returned. for example, if the user puts in a nickel and two dimes and then hits cancel, the cancel operation should return a dictionary: {5:1, 10:2}. The keys are coin amounts and the values are counts for that coin.
Use TDD and git in developing the "business logic" of a breakthrough game. I have provided a specification for the public interface of this class in an initial porject repository, which you should clone:
git clone git+ssh://<user>@danio.wartburg.edu/labhome/PUBLIC/CS270/breakthrough.git
You should develop in TDD fashion and perform a commit after each new test is passing and after any refactoring step. At the end you will zip up the entire folder (including the git repository) for handin. Perusing the git logs will let me see how your development unfolded. You should work in a team of 2 or 3 on this project.
As discussed in class today, we need to develop the paystation software to accommodate the needs of a new town, Betatown. They want a system just like Alphatown, except that they want a rate of $2.00 an hour rather than the rate of $1.50 an hour that Alphatown charges. Maintaining two separate codebases (copy and paste) is not a reasonable approach to this new design challenge.
Your homework is to brainstorm and evaluate alternative possible approaches to the problem of maintaining multiple variants of our system having different rate structures. Write up what you think the best approach would be and bring it to class. You should not actually write any code, just describe your proposal at a high-level, but in enough detail that it can guide a TDD approach to implementation.
We discussed to possible designs for building a series of paystations with varying rate structures (linear, progressige, other). Option 1 (subclass polymorphism) involved encapsulating the rate scheme in a single method of the PayStation class and then overriding this method with subclasses. Option 2 (compositional polymorphism) involved encapsulating the rate calculation function in a separate class and then passing an instance of this class into a PayStation when it is created.
Your assignment is to consider the advantages and disadvantages of these two approachs and to select what you think is the best design for us going forward.
Do a bit of Internet research and explain the "strategy" design pattern in your own words. How is it structured, and what does it accomplish?
Develop the ProgressiveRateStrategy class in TDD fashion. Be sure to start from the code in our Paystation git repository (already refactored to use a rate strategy). You should create a new TestCase class to unit test the ProgressiveRateStrategy. Your tests will not need to create any Paystation object at all. Just start with tests that call calculate_time on an instance of ProgressiveRateStrategy.
Fill in the three scantron-style forms that I handed out with "random" answers for a 20 question quiz. Try to make sure you have some "interesting" cases and make sure the information is consistent across your three forms. Put your real name on each form, but use a fake ID (not your Wartburg ID).
Install kivy and opencv for Python 3 on your development machine. Update 10/21: Don't worry about installing Kivy. We are going another direction. My apologies, if you've already invested some effort in it.
Come up with a set of user stories for the smallest/simplest set of feaures that you can imagine that would make our system useful for an instructor who has a PDF file containing a set of scanned exams. As much as possible, try to make each story encapsulate one atomic (independently implementable) feature of the program.
It might be helpful to actually role play exactly what the user might do as a set of steps when sitting down to use the program. For example:
Winner gets a treat!
Consult the list Dotbot User Stories and estimate the time required for each in units of programmer-school-days (PSD). A PSD is the amount of effort a single group member can invest in CS 270 per day during a regular term (including weekend days). For example, "I think I could reasonably implement this story in about 3 days while keeping up wth the rest of my classes." You should have your personal estimates ready at the start of class.
In class Monday, you will have time to consult with your group to come up with a group consensus on these estimates, and we will use those group estimates to plan our project. This activity will be a waste of time if you have not taken the time to review the stories and form your own opinions before coming to class. Please be prepared!
You will post the git respository of your project. Here's how:
FYI, you can find out more about git tags here.
Do a bit of Internet research in the Observer object-oriented design pattern and write up an description of this pattern. Make sure to include some sort of class diagram showing the methods and interactions in volved in this pattern. This is a homework assignment to be done individually, or in pairs. This is not a team project.
Write a short reflection on your first project iteration answering the following questions:
Do a bit of Internet research on the Model-View-Controller pattern and write up a short description. A diagram would again be helpful. Also, try to related this pattern to the observer pattern. What are the subjects and observers in this model.
Just a reminder that the breakthrough code was posted on Socrates under assignments. You should be familiarizing yourself with the production code. We will walk through how it was developed in class on (11/14). You will have a modification due 11/16.
Your assignment is to add the "New Game" functionality to the Breakthrough code. You should try to do this in a Test-Driven, Presenter-First manner. That is, first add a new presenter test in which you specify the "protocol" for the implementation of this behavior. Then implement the presenter code that passes the test. Finally, add a new test to the model tests that drives putting the necessary new code into the model. When the model unit test passes, try running the application to see that the new behavior works.
zip up the files that you changed and turn in the zip archive on Socrates.
You will turn in both your code and your design sketches. Take digital pictures of your sketches to include in an electronic document, and turn the design in as a PDF on Socrates along with your code.
This is an individual assignment, but it will be counted toward your project score for the class.
For hand-in, you can add me as a user to your bitbucket repo. I'm user John_Zelle. You can add me as a "read" user, and I should be able to browse your code and also download from there. Your final project grade will be based 50% on functionality and 50% on code style and design. Clean code should allow me to easily read, understand, and build on what you have accomplished.
Write a 1 to two page reflection on your second project iteration that thoughtfuly answers the following questions: