Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 190 Lecture Notes: Wrapup

Similar presentations


Presentation on theme: "CS 190 Lecture Notes: Wrapup"— Presentation transcript:

1 CS 190 Lecture Notes: Wrapup
Key Ideas Overall goal: reduce complexity Dependencies Obscurity Working isn’t good enough Complexity accumulates in small units: zero tolerance Must invest up front for good design Abstraction: find simple ways to think about complicated things Information hiding Classes should be thick Interface versus implementation Avoid specialization: make APIs generic The Martyr Principle Comments should describe things that aren’t obvious from the code Comments should be complete and precise yet short Comments are a canary in the coal mine for complexity Names matter! Reduce the number of places where exceptions must be handled Define errors out of existence CS 190 Lecture Notes: Wrapup

2 CS 190 Lecture Notes: Wrapup
Red Flags Information leakage Dependencies Thin classes Special cases Inconsistencies Repeated code Comment duplicates code Method documentation has to be long to be complete Hard to find clear and simple name for variable Pass-through methods Classes calling back and forth to each other Deep call stacks CS 190 Lecture Notes: Wrapup


Download ppt "CS 190 Lecture Notes: Wrapup"

Similar presentations


Ads by Google