Solving problems using PEDAC process: An introduction

Edgar Mkaka Joel
2 min readApr 26, 2018

--

In this blog post, I will provide a brief description about programming problem solving approach that I recently learned: Launch School’s PEDAC process.

This would be the first of a series of four blog posts. It would serve as an introduction to PEDAC, followed by three blog posts demonstrating using the process to solve example problems.

What is PEDAC?

PEDAC is an acronym that stands for:

Problem [understanding the]: Breaking down the problem in order to thoroughly understand all its requirements such as inputs, scope/constraints, expected outputs, wrong inputs handling and whatnot.

Examples: Example inputs and their expected output to be used to understand problems further & flesh out the details by going through steps to solve them manually, and validate one’s understanding of a problem.

Building examples to cover all of problems’ requirements, explicit and implicit, and use them as test cases also enables one to verify the code once it’s written.

Data structure: Based on requirements, apt data structures to use (such as arrays, JavaScript objects, Ruby hash, strings etc) to transform input into desired output.

Algorithm: Determining a set of steps that would convert input to desired output based on problem requirements/rules, and chosen data structure. Think only in higher level what steps need to be done; not how it needs to be done.

Code: Translating the algorithm from step four into a working code that would transform input to desired output.

For a detailed explanation of PEDAC, see Launch School’s post

In the following links, I will practice applying PEDAC method to solve three example problems:

  1. Part 2: Solving Sum of Multiples problem using PEDAC
  2. Part 3: Solving Word Count problem using PEDAC process
  3. Part 4: Solving Roman Numerals problem with PEDAC

--

--