CS204 Wednesday, 27 April 2012 FIRST HALF RECAP 1. Audience: care about the people using your software -- Use cases / user stories -- Convenient and conventional command-line interfaces that make smart use of stdin and stdout 2. Audience: care about the people maintaining your software -- Modularity -- Good names -- Good/appropriate comments * Clarify confusing stuff * Citations of complex algorithms, papers, etc. * Overviews: top of the file: author/copyright, brief description, each function/method/class: parameters, return value * HEY LOOK HERE! (pointers to you or other developers) * Can act as status messages... -- Good use of documentation tools (pydoc, javadoc, doxygen) -- Debugging help: assertions, "debugPrint", thoughtful error messages and exception use _debug = True def debugPrint(s): if _debug: print >>sys.stderr, s 3. Interfaces between software modules -- Function signatures def getCampaignContributionsForPerson(personID): ''' Returns a list of (date, dollar-amount) pairs.... ''' -- URL format & expected return data for client/server interactions cs-research1.mathcs.carleton.edu/cs204/you/webapp/?something=5&... REST: a better way of writing URL interfaces -- Documentation of signatures/formats/protocols -- "Separation of concerns": e.g. DataSource -- Splitting development responsibility -- Changing/extending implementations later -- Getting the interfaces right makes everything work better (or work at all) WHAT'S NEXT? 0. A chance to revise one program from the first 6-7 weeks 1. Design patterns ("Design Patterns" by the Gang of Four, Gamma, Helm, Johnson, Vlissides) -- What are they, and why do we care? -- Specific patterns: observer, singleton, factories of various sorts, model-view-controller (MVC) and its friends -- Java subclasses vs. interfaces 2. Java GUI APIs 3. User interface design principles 4. Multi-threaded programs 5. Some miscellaneous tools/ideas -- Automation and make -- IDEs and debuggers -- Profilers -- Unit test frameworks and TDD -- Version control systems