Programmers spend 30% of their time doing what one study found them to do. "Defensive programming" is the idea that the developer makes as few assumptions as absolutely necessary. "Code-level optimization" is the process of optimizing code at each level.
Programmers spend 30% of their time doing what one study found them to do. "Defensive programming" is the idea that the developer makes as few assumptions as absolutely necessary. "Code-level optimization" is the process of optimizing code at each level.
Programmers spend 30% of their time doing what one study found them to do. "Defensive programming" is the idea that the developer makes as few assumptions as absolutely necessary. "Code-level optimization" is the process of optimizing code at each level.
Q $100 Q $200 Q $300 Q $400 Q $500 Q $100 Q $100 Q $100 Q $200 Q $200 Q $200 Q $300 Q $300 Q $300 Q $400 Q $400 Q $400 Q $500 Q $500 Q $500 Final Jeopardy $100 Question from Trivia Where did the variable i come from? $100 Answer from Trivia From Mathematics : i = 1 n $200 Question from Trivia What did one study find the programmers spent 30% of their time doing? $200 Answer from Trivia Working as Individuals $300 Question from Trivia How many programmers maintain the average system before it is discarded or re-written? $300 Answer from Trivia 10 programmers $400 Question from Trivia What does the average maintenance programmer spend 50%-60% of their time doing? $400 Answer from Trivia Figuring out what code written by another programmer is doing $500 Question from Trivia What are accidental and essential difficulties? $500 Answer from Trivia Essential difficulty: the difficulty inherent in the problem
Accidental difficulty: the difficulty added by the solution $100 Question from Concepts Should you favor read-time convenience over write-time convenience? $100 Answer from Concepts Read-time convenience.
Code is read many more times than it is written and in many cases is the best live document of design $200 Question from Concepts What is pseudo-programming process? $200 Answer from Concepts Pseudo programming process : 1. Write each step of the routine in English using comment syntax 2. Review the pseudo code 3. Fill in code below each comment (Apply PPP recursively if needed) 4. Keep the pseudo code as comments Advantages 1. Better organized code and easier code review 2. Automatic comments 3. Easier to resume interrupted work 4. Forces you to think more about design $300 Question from Concepts What is Defensive programming? $300 Answer from Concepts Defensive programming is the idea that the developer makes as few assumptions as absolutely necessary.
In addition, the developer preemptively creates code that anticipates not only potential problems but also specification changes
In short, the programmer never assumes a particular function call or library will work as advertised, and so handles it in the code. If anything can go wrong, it will $400 Question from Concepts What is code-level optimization and how should you approach it? $400 Answer from Concepts Semantic-preserving transformations of the program at the detailed Coding level motivated by desire to improve performance Great example of code adding accidental complexity. Rule 1: Dont do it Rule 2: (for experts only) Dont do it yet Aim for a working clean solution & optimize only the hot spots Measure your optimization. $500 Question from Concepts What is Design by Contract? $500 Answer from Concepts Design By Contract is a software correctness methodology.
The basic idea is that a class can be viewed as having a contract with its clients whereby : 1. the class guarantees to provide certain results (postconditions of its methods) 2. provided that the clients agree to satisfy certain requirements (preconditions of the class's methods) Design by Contract is a registered trademark [1] of Eiffel Software $100 Question from Design According to a study, how many designs do most designers consider before selecting the design they implement? $100 Answer from Design 1. One $200 Question from Design How much do different design solutions to the same design problem vary in the code volumes required to implement them (e.g. 2:1,3:1?) $200 Answer from Design 10:1 $300 Question from Design What attributes did one study find that great designers had in common? $300 Answer from Design They tried out and discarded more than one design. $400 Question from Design Name 3 sources of change that would affect your design. $400 Answer from Design Requirements Resources Technology Market scenario Project pulled in Incorrect initial assumptions Business rules $500 Question from Design What are some of the key Design approaches to handle complexity? Name 3. $500 Answer from Design Hierarchies Information hiding Modularization Encapsulation Abstraction Cohesion Separation of concerns $100 Question from Quality What percentage of a typical systems code exists to implement error processing? (a range is ok) $100 Answer from Quality 25-75% $200 Question from Quality Error Processing is a/an __________ issue.
a. Construction b. Design c. Architecture d. Unimportant
$200 Answer from Quality c. Architecture $300 Question from Quality What percentage of modules in a system account for 80% of all the defects? $300 Answer from Quality 20% $400 Question from Quality What is the difference between robustness and correctness? $400 Answer from Quality Correct : Never returning an inaccurate result, even if you dont always return a result
Robust : Always returning a result, even if sometimes the result is not accurate
$500 Question from Quality Based on above graph, What are two ways to reduce cost? $500 Answer from Quality 1. Detect and correct defects in the same phase theyre created in. 2. Fix more defects earlier.
Final Jeopardy What is the 3 year half-life principle? Final Jeopardy Answer
Half of what you know today will be obsolete in 3 years Half of what you know is learned in the last 3 years Thank You