Approaching the Problem in Procedural Programming

1.) If necessary, describe the problem in your own words.

2.) What is the input?

2.) What does the output need to be?

3.) What are the rules your program must follow?

4.) Define/clarify implicit knowledge.

5.) Outline a sequence for a happy path to the solution in pseudo-code (include where you plan to test and refactor). If necessary, build a flow chart.

6.) Build examples:

a.) Edge Cases

  • uppercase/lowercase?
  • boundary conditions?
  • emptiness?
  • repetition?
  • data type?

b.) Failure

  • raise exceptions?
  • report error?
  • return special value?

7.) Clarify and ask questions (i.e. Do I need to validate numbers?)

8.) Choose data structures for the input and any applicable rules. These should make you job of writing an algorithm easier.

9.) Write your algorithm using specific language. Verify it works with test cases. Use abstraction to break the problem down in to smaller parts.

Show your support

Clapping shows how much you appreciated Jocie Moore’s story.