Flowcharts are a visual representation of a sequence. Getting the flowchart complete helps to clarify the sequence in a program before beginning to implement it with code. Pseudocode is essentially the flowchart without the boxes and arrows, formatted to resemble code (indentation, terms).
Algorithm: In mathematics and computer science, an algorithm is a finite sequence of well-defined instructions, typically used to solve a class of specific problems or to perform a computation. Algorithms are used as specifications for performing calculations, data processing, automated reasoning, automated decision-making and other tasks. Many algorithms even outside the fields of maths and computer science can be visualised/documented using a flowchart.
The essence of planning a program is to get the structure/sequence clear first. Once you have this clear, you translate each part into appropriate code. A flowchart does NOT take account of having to convert data types (see the Variables section for more on this) and does NOT take account of spacing, pretty printing, indentation or any of that.
You may create a draft on paper for any flowchart, but to have it correctly formatted for a report, we will use draw.io which is also available as an app from the app store. To make creating new flowcharts easier, we can label and store the main shapes while logged into our draw.io account:
Follow the steps as shown in the steps here.
When the shapes are in the drawing area (step 1) resize to a usable size (to standardise the size), then add a color and optionally some text before dragging to the Scratchpad area.
In the Scratchpad area, you can click the Edit pencil and give each part it's own label.
When you have a complete chart done that you want to share:
Select all
Select File -> Export As -> png
Select Export
Save the image OR open in a new tab where you can copy the image
A flowchart may become large, or you may wish to modularize it- this makes it easier to design, modify and read.
In this case, the flowchart uses on off-page connector to continue the flowchart on another page (or tab in draw.io).
We can use it in a similar way is we want to link to another module or process.
There is also another connector called on-page connector- this is simply a circle connector.
A flowchart is one (of many) ways to document an algorithm. An algorithm is a specific procedure for solving a well-defined computational problem. There are more definitions in the Maths Notebook, but if you want to document a sequence of steps to carry out in order to solve a problem which is well defined, a flowchart is a very visual way to do it.
Flowcharts communicate some of the ideas by using a shape, removing the need for specifying some of the details and allowing a short description to be enough.
Sample implementation of the pseudocode (on the right) as a flowchart
implementation of flowchart in blockly, with the generated python code on the right
As you can see here, almost any sequence can be modelled with a flowchart. Some say it is key to learning to program, since it structures your thoughts into a logical progression, forcing you you think through options and possibilities.
"you’ll teach algorithms, you’ll teach foundations for an easier and more efficient coding. It allows you to clarify your goal and objective before actually laying down the code. It can help teach logic."
Here we have a large program made up of several modules- there is a main.py which displays a menu of options. In this case, there are four modules, namely login.py, caesar.py, vigenere.py. morse.py and the main module which is really only a menu, main.py. This was part of a group project. Each team member developed and tested one module each.
Each of the modules were imported into the main.py module when they were completed. They were able to do this from the same location on repl, and they had to work together to provide a consistent interface for the user.
"Programming (and the learning thereof) involves much more than learning a programming language. In fact, the most important parts of learning to program are understanding how to identify a problem, determine a solution, and break that solution down into parts and/or steps. Finally, once the solution is understood, meaningful code can be created."
Others consider it pointless:
"It's a waste of time. A computer program already contains all the detail needed. Flowcharting only to start over writing code to match the flowchart doesn't make sense. A good software engineer understands what needs to be done and sees lines of code floating around in his head even before he sits down to start coding."
(All quotes from Quora.com)
You will find a lot of detail in a tutorial here if you find that this page doesn't leave flowcharts in a spot close to your heart.