Skip to content

Instantly share code, notes, and snippets.

@neenjaw
Created October 6, 2020 00:44
Show Gist options
  • Save neenjaw/cf0725b949a5470234e5ba52d259d7b9 to your computer and use it in GitHub Desktop.
Save neenjaw/cf0725b949a5470234e5ba52d259d7b9 to your computer and use it in GitHub Desktop.
How to design programs

How to design your first programs

Design step 1) Define your goal

  • state this in a sentence or two
  • state this as a user-facing outcome

Design step 2) Define requirements

  • constraints solution needs to abide by (budget, timelinem, space, memory, etc)
  • capabilities of the program to meet need
  • define that WHAT not the HOW

Design step 3) Define the tools, targets, and backup plan

  • defining what the target architecture is
  • determine the set of tools
  • determining whether you wil write alone or part of a team
  • defining testing/feedback/release strategy
  • defining how to backup code

Design step 4) Bread hard problems down to easy problems

  • top-down method: break the task into multiple subtasks, each of which is individually easier to solve
    • if still too difficult, further broken down
  • bottom-up, look for ways to group items with similarities.
  • Creates a task hierarchy
    • top-level becomes main()
      • subitems become functions

Design step 5) Figure out the sequence of events

  • Figure out what needs to be done first

Implementation Step 1) Outlining main function

  • comments or pseudo code

Implementation Step 2) Implement each function

Implementation Step 3) Implement testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment