AAB - Techniques of Organization (Lesson)

Techniques of Organization

Introduction

We have looked at pseudocode and algorithms, as well as the organization of the internet with the binary code used for the data transfer.  The initial transfer of data on the internet was solved with much thought, pseudocode and eventually many algorithms, some of which we have tried and examined. Now let's look at some other techniques used to assist with the organization of programs.  

The storyboard and flowchart are organization methods which help us at a high level to solve problems.  These organization methods can help us decide where good programming techniques will allow us to create reusable code, our own abstraction, to simplify program reading and checking.  

Storyboard

A storyboard is a visualization of what is to happen. It is a set of scene organization directions that assists with programming action and stories.  Our programming projects this semester will involve animation and solving problems with the use of animation techniques.   Below is an example of a storyboard. The first sets the scene with camera action and dialogue, the second the story object appears with further dialogue, and the third scene labeled, S-2 shows how the dragon coming out of the cave will move his wings.

Notice the labeling allowed the background to remain stable, S-2, yet the page, action depiction is allowed to take precedence in s-2 page 2 of 7.

Notice the setting of the scene, S-1, indicates where the focus of the story should be, S-2 1/7 (1 of 7) shows a scene for the dragon coming out of the cave, and S-2, 2/7 shows sketching of the wing action of the dragon.  

Movies and other automated items start out exactly like this with a rough picture, rough sketches which might be drawn in paint software, or sketched by hand. These sketches could initially be stick figures, a round circle labeled rock, or three round circles labeled snowman.  Items in the scene could be pictures or images that you are using as example only for the storyboard, to be created by you later.  In all cases, the beginning is rough sketches.  What is important is that you set the title, scene, tell of action and dialogue.   When you are making detailed movies or animations with a company you may need to set timing or other language considerations.  

The basics that you will need for your storyboard is a rough sketch, yes, it could be a rectangle or oval standing for a flying saucer (label inside the rectangle or oval). The intent of the storyboard is to map out the scenes, action, and dialogue of your story that you will program.    

If you were at a company, you would show the storyboard ideas to those allowing you to proceed. In this way, you gain approval for continuing on to the actual design phase of your product. In this course, you may share storyboards with other students through discussion. Storyboards create dialogue between people that allow further ideas to flow, problems to become known, and solutions to begin being thought of.  

Storyboards are not static, but others may be added to address issues and items not initially thought of.  

Flowchart

Another method of describing the internal working of a computer program to organize your thoughts is using a flowchart. A flowchart shows the top level flow of a program or the minute detail of an algorithm to solve a very specific problem. Visualization of what is to occur is provided with the flowchart. Symbols are used to represent various parts of a flowchart, the simplest being a rectangle indicating a process to perform.  A more complex symbol, a diamond allows for choices and decisions.

In an upcoming assignment, you will create a flowchart. Flowchart symbol information, including how to structure and use arrows is included in the following presentation.  Use the arrows in the lower right hand corner of the presentation to navigate.

Here is a flowchart of the conversion of the decimal number to a binary number using flowchart symbols.

Flowchart Example

Note that decision blocks, the diamonds, allow for branching into choices that could result in repeating a section of code without rewriting In the image above. It is better form to take the arrow back to point at the arrow above the decision box creating one entry point for the decision. Keeping the flowchart as simple as possible, using single entry and exit points allows for quick ease of reading.

The exception is two out arrows from binary decision diamond, one for the affirmative of the question and one for the negation of the question, or one for yes or one for no, or one for black and another for yes. The yes arrow may go on to more parts of the program, so come from the down point, whereas the no arrow may loop back up to the arrow entering the top point to indicate that the checking of the question will continue until the yes answer is reached. If the yes answer is never a possibility, then an infinite loop occurs. Programmers strive to not have infinite loops, so finding this on a diagram or knowing where the possibilities could occur from the flowchart diagram helps with debugging.

A decision (diamond) box with more than two choices for the affirmative yes, will have the yes arrow out and then a segment across the arrow with the different choices coming off the segment to continue the program.

This is why we organize our thoughts prior to programming. Not only does it help us stay focused on what is to be accomplished, but allows us to make decisions. In a team setup for writing a program, different portions of the team could write a section of code once the input and output of each section is known. The storyboard and flowchart allow a collaborative team to work together and split up the parts to accomplish the task in an effective manner.  

In the flowchart above, notice that the input is labeled, nbrIn, and what is to be stored is labeled, largestNbr and its place value, as well as the output from a calculation, leftOver. With these labels different people may write the various algorithms needed to complete the program and variables, the names of a data storage area, will match.  

Note, starting with a lower case word followed directly by the next word beginning with a capital letter is called camel case.  Camel case allows the eye to catch the new word easily. Names of storage items do not contain spaces.

IMAGES GAVS CREATED OR IN PUBLIC DOMAIN AND USED ACCORDING TO TERMS OF USE.