Week3 - Wednesday, January 21 Overview Last Class Code...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Wednesday, January 21 Week 2, Slide 2 Inf111/CSE121 Overview • Last Class – Code Reading • This Class – Code Reading – Programming Practices • Next Class – Revision Control
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Week 2, Slide 3 Inf111/CSE121 Step 1: Acquire Domain Knowledge • Start with what the program is supposed to do – Don’t start with the code – Things to try • Asking experts • Reading documentation or comments • Running the program • Running test cases Week 2, Slide 4 Inf111/CSE121 Step 2: Start Looking at the Code • Where to start – Main – Specific UI parts – Consider the roles of components in the framework – Do not just start reading code from top to bottom
Background image of page 2
3 Week 2, Slide 5 Inf111/CSE121 Code Reading Strategy • Use a methodical approach – Use program structure and component relationships as a guide – IDEs help with this Week 2, Slide 6 Inf111/CSE121 Code Reading Tactic • Make use of the style and formatting – e.g. indentation, and naming convention – But don’t let it fool you …. If (meetCondition) \\1 a.doSomething(). \\2 b.doSomething(). \\3 ….. If meetCondition is false , will statement 3 be executed? – Yes
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Week 2, Slide 7 Inf111/CSE121 More Tactics • Code and comments (or other documentation) may not agree – Even names of variables/methods might not agree with their purposes • Consider the possibility that the programmer did not
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/27/2010 for the course CSCI 561 at USC.

Page1 / 10

Week3 - Wednesday, January 21 Overview Last Class Code...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online