Designing Software
Designing Software What have we learned?
Designing Software What have we learned? Computers are totally literal
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Decisions – using if … else if … help the computer
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Decisions – using if … else if … help the computer Variables help us remember information
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Decisions – using if … else if … help the computer Variables help us remember information Top-down design – figure out major steps/flow before details
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Decisions – using if … else if … help the computer Variables help us remember information Top-down design – figure out major steps/flow before details Simple is always best
Designing Software What have we learned? Computers are totally literal
Designing Software What have we learned? Computers are totally literal They do EXACTLY what you tell them to do
Designing Software What have we learned? Computers are totally literal They do EXACTLY what you tell them to do They do ONLY what you tell them to do
Designing Software What have we learned? Computers are totally literal They do EXACTLY what you tell them to do They do ONLY what you tell them to do They make absolutely NO assumptions
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Look for steps that are repeated
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Look for steps that are repeated Look for complicated sub-tasks that could be considered on their own
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Look for steps that are repeated Look for complicated sub-tasks that could be considered on their own Name the function something meaningful
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Loop WHILE something is true
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Loop WHILE something is true Loop UNTIL a condition is met
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Loop WHILE something is true Loop UNTIL a condition is met Great opportunity to use functions
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Decisions – using if … else if … help the computer
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Decisions – using if … else if … help the computer More efficient than if … else if …
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Decisions – using if … else if … help the computer More efficient than if … else if … As soon as it gets a match, can skip the rest…
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Decisions – using if … else if … help the computer More efficient than if … else if … As soon as it gets a match, can skip the rest… Avoids errors of if … if …
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Decisions – using if … else if … help the computer More efficient than if … else if … As soon as it gets a match, can skip the rest… Avoids errors of if … if … What if get a match on more than one if ?
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Decisions – using if … else if … help the computer More efficient than if … else if … As soon as it gets a match, can skip the rest… Avoids errors of if … if … What if get a match on more than one if ? What if handing the match changes what you are using to do following matches?
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Decisions – using if … else if … help the computer Variables help us remember information
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Decisions – using if … else if … help the computer Variables help us remember information Basically a bucket that holds a piece of information
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Decisions – using if … else if … help the computer Variables help us remember information Basically a bucket that holds a piece of information You can find out what is in the bucket … read the variable
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Decisions – using if … else if … help the computer Variables help us remember information Basically a bucket that holds a piece of information You can find out what is in the bucket … read the variable You can put new info in the bucket … write the variable
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Decisions – using if … else if … help the computer Variables help us remember information Top-down design – figure out major steps/flow before details
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Decisions – using if … else if … help the computer Variables help us remember information Top-down design – figure out major steps/flow before details Start with general, then go to specific
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Decisions – using if … else if … help the computer Variables help us remember information Top-down design – figure out major steps/flow before details Start with general, then go to specific Don’t dive into the details until you know the basics of how you’ll do it
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Decisions – using if … else if … help the computer Variables help us remember information Top-down design – figure out major steps/flow before details Simple is always best
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Decisions – using if … else if … help the computer Variables help us remember information Top-down design – figure out major steps/flow before details Simple is always best Analyze how you would do it … your brain is very efficient
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Decisions – using if … else if … help the computer Variables help us remember information Top-down design – figure out major steps/flow before details Simple is always best Analyze how you would do it … your brain is very efficient Find a similar but simpler problem to analyze
Designing Software What have we learned? Computers are totally literal Functions are great for repackaging complex stuff into one thing Looping helps us handle repeated tasks Decisions – using if … else if … help the computer Variables help us remember information Top-down design – figure out major steps/flow before details Simple is always best
Clear and Unclear Windows