XClose

Culture Online

Home
Menu

Why is the preparation of algorithms and flowcharts important before developing the code of problem?

The importance of flowcharts in developing a code is that a flowchart provides a breakdown of the essential logical steps of the process the code is aiming to implement.

Two people writing on a whiteboard

17 January 2023

Once a flowchart is in place, it can help find less obvious features of the process that can then be refined to improve its efficiency, i.e. bottlenecks, flaws, unnecessary steps. It should be seen as an evolving diagram. 


Often programmers work according to a specification provided by a client. The flowchart then becomes their common language and is used to clarify, even to the client, what the process is trying to achieve.
Each step of a flowchart is independent of implementation as the flowchart only describes what should happen at that step, what input is needed and what the output of the step is, but it says nothing about how to implement the step. And there may be different algorithms to implement the same task.
Say you want to sort a list of names in alphabetical order. Wikipedia alone lists over 30 popular sorting algorithms.
https://en.wikipedia.org/wiki/Sorting_algorithm

When choosing an algorithm, you should consider their computational complexity, stability, memory usage, among other features.