Skip to content

Latest commit

 

History

History
33 lines (19 loc) · 2.48 KB

program-design.md

File metadata and controls

33 lines (19 loc) · 2.48 KB

Program Design

Program is the output (artifact) of programming. Larry Wall, the creator of the popuplar Perl programming language, explains the concept in a 5-minute video Computer Programming in 5 minutes: it is like writing a receipt in its simple form and you can solve more complex problems when you see patterns and build abstractions.

Software Development Lifecycle

In a conceptual level, software development can be divided into five phases that are often interwined with each other.

  • Requirment Analysis
  • Design
  • Implementation: coding
  • Testing
  • Evolution

sdlc

A successful software project will go through many iterations of the five phases, especially when you use the Agile software development Process

Design is defined as the set of activities that you conduct to understand the problem, describe the problem and develop the solution. Design is followed by coding and testing. For any non-trivial problem, design is the most important part of the software development because it describes the problem solutions and testing criteria.

Algorithm and Pseudocode

For complex problems, you first determine the high-level steps that must be taken to perform the task, i.e., you break down the required task into a series of steps. If a step represents a big task, you repeat the process to break into small steps that is easy to be solved.

An algorithm is a set of well-defined logical steps that must be taken to perform a task. You use the above divide and conquer method to develop algorithms at different levels.

When you design an algorithm, it is better to use pseudocode. Pseudocode is fake code that has no syntax rule, not meant to be compiled or executed. It is an informal language that you can create your pesudocode. Its purpose is to help algorithm design. At design phase, there is no need to worry about syntax errors. You can focus on algorithm design to sovle the problem. Later, pseudocode can be translated directly into actual code in any programming language.

You can even use diagrams such as Flowchart to document your algorithm design. The following is an example from the wikipedia article.

flowchart

You can see that it is pretty straightforward to understand, even by business persons who don't know programming.