Tuesday, May 10, 2011

Elementary Program Design Structure Model



In computer programming:

When beginning to design a program you must identify the input stream, output stream and processing center.  The input stream is every logical process that reads and edits the input to your program.  The output stream is all of the logical processes that edit and write the output of your program.  The processing center is all of the logical processes that turn the inputs into outputs.  From there you would create the top level module of your structure chart.  This top level module usually controls and/or coordinates activities but does little if any processing itself.  It would ideally receive the input from the input stream and passes it to the processing center as well as receive the output from the processing center.

From there you would create all lower level modules.  These modules should process all input data and create an output to be sent back to the level above it.  From there you can refine the structure chart of your program so all modules are simple and efficient.  If a module is not efficient enough, break it down into more efficient modules that are easier to work with. 

You must then create data access and error handling modules.  These are created to read and write any data needed and to explain what error has occurred if any do occur.  You should then evaluate the quality of design you have created using the design principals that apply to structured design.  Your goal should be to decrease coupling and increase cohesion.

In the real world:

This process could relate to many things where planning is necessary to complete your goal and once completed refinement is needed for the future.  I think it is somewhat similar to the process of preparing for a football game.  The setup would consist of watching film on your opponent and constructing a game plan on the best way to defeat your opponent.  Knowing how to attack the problems of design is like knowing what defense is best to stop the style of offence your opponent uses.

The process would be practicing your game plan and getting better at your execution.  The more you practice the more you understand how your game plan will work in different situations.  You can also see your planning coming into being.  Finally you get to game day and you implement your game plan and see how well all of the planning you did works in the situation you planned for.  Hopefully it pays off.

Whether you win or lose the game, afterwards you talk about what happened.  You watch film of the game and see what worked and didn’t work so well.  You talk about what you could have done better and how you could have performed better if you did things differently.  Hopefully this will help you play better next week.  Fortunately in programming you can go back and make those changes that need to be made.  Then you can “watch game film” again and make any changes needed repeatedly until your program is perfect.

No comments:

Post a Comment