topic 3 structured programming case study
play

Topic 3 Structured Programming Case Study Ugly programs are like - PowerPoint PPT Presentation

Topic 3 Structured Programming Case Study Ugly programs are like ugly suspension bridges: they're much more liable to collapse than pretty ones, because the way humans (especially engineer- humans) perceive beauty is intimately related to


  1. Topic 3 Structured Programming Case Study “ Ugly programs are like ugly suspension bridges: they're much more liable to collapse than pretty ones, because the way humans (especially engineer- humans) perceive beauty is intimately related to our ability to process and understand complexity. ” - Eric Steven Raymond, Author of The Cathedral and the Bazaar and maintainer of The Jargon File CS305j Introduction to Structured Programming Case Study 1 Computing

  2. What We Will Do Today 8 Do a case study 8 case study – an in depth look at a single problem exploring the possible approaches and solutions. CS305j Introduction to Structured Programming Case Study 2 Computing

  3. Desired output /\ / \ / \ \ / \ / \/ \ / \ / \/ /\ / \ / \ /\ / \ / \ +------+ | | | | +------+ |United| |States| +------+ | | | | +------+ /\ / \ / \ CS305j Introduction to Structured Programming Case Study 3 Computing

  4. Various Solutions 8 Unstructured 8 Structured 8 Structured without redundancy – and what is the big deal about redundancy anyway? – what is wrong with copying and pasting? CS305j Introduction to Structured Programming Case Study 4 Computing

  5. It Works 8 If a program works isn’t that all that matters? 8 Aren’t all programs that solve the same problem equivalent? Isn’t one just as good as another? CS305j Introduction to Structured Programming Case Study 5 Computing

  6. Bad Solutions 8 No, all working solutions are NOT equal 8 Some solutions are poor: – hard to change – hard for someone else to understand – brittle, easily broken 8 Problem Statement: Create a device to sharpen pencils CS305j Introduction to Structured Programming Case Study 6 Computing

  7. Open window (A) and fly kite (B). String (C) lifts small door (D) allowing moths (E) to escape and eat red flannel shirt (F). As weight of shirt becomes less, shoe (G) steps on switch (H) which heats electric iron (I) and burns hole in pants (J). Smoke (K) enters hole in tree (L), smoking out opossum (M) which jumps into basket (N), pulling rope (O) and lifting cage (P), allowing woodpecker (Q) to chew wood from pencil (R), exposing lead. Emergency knife (S) is always handy in case opossum or the woodpecker gets sick and can't work. CS305j Introduction to Structured Programming Case Study 7 Computing

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend