Typical Programming Work Flow
The Programming Process
requirements
implementation
run the program
check the output
go back to step #2
or possibly even #1!
do this until… ?
INFO - reconstruct diagram
Requirements gathering
what are you building?
"problem" definition
how big is it going to be (scope)?
design
problem solving
system architecture
design techniques and documentation
flowcharts, sequence diagrams, etc.
pseudocode
QUESTION: flowchart for printing even numbers QUESTION: pseudocode for printing even numbers
Coding / Implementation
actually writing the source code!
implementation isn't necessarily just writing new code; it can be:
bug-fixing (finding and removing errors)
refactoring (improving a program for efficiency, maintainability, etc.)
Executing Your Program
simply running your program
our textbook includes compilation (source code to object code) as another explicit step
since we're using Python, this isn't something we need to be concerned with
we can just execute our code immediately using the interpreter
Checking Output
was there a
syntax error
(a problem with the structure of the program)?
was there a
runtime error
(an issue that comes up during program execution)?
is the output what we expected? (a
logic error
)
if any of the above (each correspond to one of three types of errors:
syntax
,
runtime
, and
logical
) can be answered "yes", then we have to debug:
debugging
is tracking down the root cause of an error and fixing it
may (more often than not, will!) take a long time!
* QUESTION - what kind of error is forgetting a parentheses? * QUESTION - what kind of error is adding a number to a string?
Iteration
this process is repeated many times
our textbook shows that iteration goes back to the writing the source code (implementation) step, but…
even the requirements may change!
the process continues until the requirements or met…
or you're sufficiently happy with your program
or a deadline comes up
or until forever (is this forever?)
Let's Review