the art of programming. the process of breaking problems down into smaller, manageable parts by...

14
The Art of Programming

Upload: lindsey-lucas

Post on 18-Jan-2016

224 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: The Art of Programming. The process of breaking problems down into smaller, manageable parts By breaking the problem down, each part becomes more specific

The Art of Programming

Page 2: The Art of Programming. The process of breaking problems down into smaller, manageable parts By breaking the problem down, each part becomes more specific

• The process of breaking problems down into smaller, manageable parts

• By breaking the problem down, each part becomes more specific

• These individual solutions are combined to create a solution for the larger problem

Problem Solving

Page 3: The Art of Programming. The process of breaking problems down into smaller, manageable parts By breaking the problem down, each part becomes more specific

Step 1: Determine what the output should look like

Step 2: Determine the input needed to obtain the output

Step 3: Determine how to process the input to obtain the desired output

Problems with this approach?

One Method: The Problem Solving Approach

Page 4: The Art of Programming. The process of breaking problems down into smaller, manageable parts By breaking the problem down, each part becomes more specific

Second Approach:Waterfall of Software Development

Page 5: The Art of Programming. The process of breaking problems down into smaller, manageable parts By breaking the problem down, each part becomes more specific

• Use the problem solving approach (method 1) to define the problem

• Gives a clear idea of what the input looks like

• Defines the relations between the input and the final output

Analyze: Defining the Problem

Page 6: The Art of Programming. The process of breaking problems down into smaller, manageable parts By breaking the problem down, each part becomes more specific

• Find a logical sequence of precise steps that solve the problem.

• This sequence is called an Algorithm

• Every detail should appear, even the obvious steps

• Flowcharts, pseudo-code, UML Diagrams, and top-down charts can be used to help break the problem into smaller steps

• Test data should be run through the design to test its accuracy

Design: Planning the Solution

Page 7: The Art of Programming. The process of breaking problems down into smaller, manageable parts By breaking the problem down, each part becomes more specific

• Translate your design algorithm into computer readable code

• The choice of computer language depends on the needs of the program

Code: Translation to Program

Page 8: The Art of Programming. The process of breaking problems down into smaller, manageable parts By breaking the problem down, each part becomes more specific

• Locate and remove any problems in the code

• Testing is the process of finding the errors in the program: both logic and coding errors

• Debugging is the process of remove the errors found

Test and Debug: Looking for Trouble

Page 9: The Art of Programming. The process of breaking problems down into smaller, manageable parts By breaking the problem down, each part becomes more specific

• Updating the code to make sure it continues to function properly

• Reducing errors found after the code has been released

• Correcting issues with documentation (user manuals, websites, etc.) released to the public

Maintenance: Keeping it Running

Page 10: The Art of Programming. The process of breaking problems down into smaller, manageable parts By breaking the problem down, each part becomes more specific

• Documentation is necessary for both understanding code while developing software and conducting maintenance after software has been released

• Documentation can include comments made inside of the code, user manuals, development notes, or original design details.

Documentation: The Key to Understanding

Page 11: The Art of Programming. The process of breaking problems down into smaller, manageable parts By breaking the problem down, each part becomes more specific

• No going back to previous steps• Perfect code every time! (yeah right…..)

• Assumes everything progresses in a linear fashion• Can only be in one location at any time

• Always start from the beginning every time

Problems With the Waterfall

Page 12: The Art of Programming. The process of breaking problems down into smaller, manageable parts By breaking the problem down, each part becomes more specific

The Iterative Approach:What Software Dev Really Looks Like

Page 13: The Art of Programming. The process of breaking problems down into smaller, manageable parts By breaking the problem down, each part becomes more specific

• An English like representation of how the program language should function and mimics what the actual code will do

• Comprised of the words “pseudo” and “code”

• Pseudo meaning almost or imitation

• Code meaning the physical software code

Pseudo-Code: The “Fake” Programming Language

Page 14: The Art of Programming. The process of breaking problems down into smaller, manageable parts By breaking the problem down, each part becomes more specific

Pseudo-Code:Making a PB and J Sandwich