The Problem Solving Process for Programming
Define
- Read the instructions carefully to ensure you understand the goals
-
Rephrase the problem in your own words
-
Identify any new skills you are being asked to apply
-
Look for other problems you've solved that are similar to this one
-
If there is starter code, read it to understand what it does
Prepare
- Write out an idea in plain English or pseudocode
Sketch out your idea on paper
-
List what you already know how to do and what you don't yet
-
Describe your idea to a classmate
-
Review similar programs that you've written in the past
Try
- Write one small piece at a time
-
Test your program often
-
Use comments to document what your code does
Apply appropriate debugging strategies
-
Go back to previous steps if you get stuck or don't know whether you've solved the problem
Reflect
- Compare your finished program to the defined problem to make sure you've solved all aspects of the problem
-
Ask a classmate to try your program and note places where they struggle or exhibit confusion
-
Ask a classmate to read your code to make sure that your documentation is clear and accurate
-
Try to "break" your program to find types of interactions or input that you could handle better
-
Identify a few incremental changes that you could make in the next iteration