CS 257: Software Design
Final Project, Phase 2
You have your idea. Now it's time to make a plan.
Incremental Development Plan
A simple and tool for moderately complex projects is an incremental development plan.
If you plan your work as a sequence of small, testable steps, you get lots of benefits. Each task
can be completed fairly quickly, so you make steady progress. Each step is testable, so if you show
the discipline required to actually test each step, you catch most of your bugs very early. Because you're
taking baby steps and testing frequently, you're never very far from a running product (even though it
will be incomplete). And best of all, the process of writing the plan makes you think ahead about the
kinds of problems you're likely to encounter, so you can plan to address or avoid them.
When I make an incremental development plan, I typically use a text file and just type a bulleted list.
Sometimes I use list-making software or a piece of paper or a whiteboard, but the principle is the same.
Each bullet point includes two things: a brief description of the task for this step, and a brief description of
my testing plan for the step. (Since "make a unittest.TestCase subclass with the main test cases" or something
like that is often one of my early steps, my descriptions of tests often refer back to that test suite.)
Here are the first few steps of an example plan for writing the web crawler.
- Create an hg repository containing readme.txt and stub versions of
crawlertest.py (a unittest.TestCase subclass) and crawler.py.
Test: get a fresh clone of the repository to make sure all the files are there.
-
- Develop a small web site containing a collection of interlinked pages that
will demonstrate broken links, loops (e.g. A links to B links to C links to A),
external links (e.g. A links to imdb.com), etc. Add the files to the repository.
Test: open the pages in a browser and check all the links.
- Write a utility method Crawler.getPageFromURL that retrieves the specified page
and stores its content, its redirected URL if any, and its Content-type header
so I can ignore all pages that don't come back as text/html. Test: eyeball a
couple examples. I'll get a better test of this one on the next step.
- Write a utility method Crawler.getLinksFromPage that returns a list of
the all the href values for <a> tags in the page. Test: create test cases
in CrawlerTest corresponding to the pages in the small website from two steps ago.
Also, write a test case that corresponds to an out-in-the-world page that has
some links but doesn't change very often.
- Write a utility method Crawler.getCanonicalFormOfLink(self, pageURL, hrefText)
that will take the current page's URL and an href found on that page, and turn it
into an absolute URL. Test: more test cases based on the mini-website. Might
want to alter the mini-website to have a couple kinds of redirects and relative
paths.
- etc.
What to hand in for Phase 2
- Create your own bitbucket repository called cs257_final and share it with me
(bitbucket user name jeffondich).
- Include a text file called plan.txt containing your incremental development plan.
- Mockups (in jpg, png, or pdf form) showing the rough appearance of the user interface.
If you have multiple mockup files, put them in a folder called "mockups".
- UML diagrams of the main architecture of your code.