Program Design

Summary: Some tips for creating a complete, coherent, logical project notebook.


Collaboration

Students working on a project are encouraged to get together and talk about how they can collaborate and support each other. Groups are free to discuss strategies and general approaches but the rules for academic honesty as written in the syllabus dictate that each person must write their own code and documentation. No sharing of files is allowed. If a particular function or class is coded together as a pair programming exercise, this needs to be indicated in writing in the project notebook and cleared with the instructor.

Design tips

Program Design strategies and general advice:

  • Design - Identify the problem that you need to solve and/or questions that you need to answer, then create a list of steps for how to get to the solution/answer.
  • Modularization - Break a complex problem into easy-to-implement building blocks that can be independently tested.
  • Scaffolding - Create an outline of the software program in which skeletons of the main functions are developed that take in the necessary inputs and pass default outputs back until you are ready to implement the "guts"
  • Documentation - Comment your code as you go, include docstrings in all functions
  • Testing - Include a section with test cases for each function that demonstrate they work as expected.
  • Debugging - You'll spend most of your time doing this. Logical bugs are the hardest to find, which is why testing is critical. If you are having trouble spotting an error, you can have a collaborator look at the code and make suggestions, but don't pass files back and forth.

All content is under a modified MIT License, and can be freely used and adapted. See the full license text here.