Week4 - 1 Monday, January 26 Week 4, Slide 2 Inf111/CSE121...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 Monday, January 26 Week 4, Slide 2 Inf111/CSE121 Overview Last Class Revision control This Class Revision control Code reading Programming practices Next Class UML 2 Week 4, Slide 3 Inf111/CSE121 What to check in Code that compiles cleanly and has been tested Don't check in files that are automatically created from others e.g. .class files Do check in: Your own little test programs And their expected output Readme files, notes, build logs, etc. Anything else you created by hand Week 4, Slide 4 Inf111/CSE121 When to check in Version control is not a backup system Your computer should have one of those Don't check in just because you're taking a break Check in files when they are stable e.g. After adding a new feature Or when you have to switch machines e.g. From home to school or vice versa 3 Week 4, Slide 5 Inf111/CSE121 Comments Upon check in, you will have the opportunity to add a comment USE THIS FEATURE! Youre going to wish you did when you try to revert back to an earlier version Week 4, Slide 6 Inf111/CSE121 More Uses for Version Control Protecting you from yourself Backing out changes Finding where errors were injected Working with a team Simultaneous file sharing More complex products Multiple versions, platforms Recording an audit trail Hey boss, Ive been working Linus Torvalds vs. SCO 4 Week 4, Slide 7 Inf111/CSE121 Branching and Merging Using a particular version as the baseline for a series of versions Reasons for branching Variations on a theme Experimental code Bug fix chains Happens at the repository, not your working copy Week 4, Slide 8 Inf111/CSE121 Tagging Use tags to label a group of files Makes it easy to check out a release or configuration 5 Week 4, Slide 9 Inf111/CSE121 Exercise Adding Tax Rules Week 4, Slide 10 Inf111/CSE121 Program Intently and Expressively The PIE Principle Code you write must clearly communicate your intent and must be expressive. By doing so, your code will be readable and understandable. Since your code is not confusing you will also avoid some potential errors. Program Intently and Expressively. Choose readability over convenience Clearly communicate your intent int result = val <<1; //More difficult to understand. int result = val * 2; //Much clearer Pick this. Examples Avoid magic numbers Avoid unnecessary optimization 6 Wednesday, January 28 Week 4, Slide 12 Inf111/CSE121 Overview Last Class Revision Control Programming Practices This Class Programming Practices UML Next Class UML 7 Week 4, Slide 13 Inf111/CSE121 Program Intently and Expressively The PIE Principle Code you write must clearly communicate your intent and must be expressive. By doing so, your code will be readable and understandable. Since your code is not confusing you will alsounderstandable....
View Full Document

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

Page1 / 27

Week4 - 1 Monday, January 26 Week 4, Slide 2 Inf111/CSE121...

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

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