high quality code why it matters
DESCRIPTION
High Quality Code Why it matters. By Ryan Ruzich. Design. Definition: Software Design means the conception, invention, or contrivance of a scheme for turning a specification for computer software into operational software. Challenges in Design. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: High Quality Code Why it matters](https://reader033.vdocuments.us/reader033/viewer/2022051115/5681429a550346895daed06b/html5/thumbnails/1.jpg)
High Quality CodeWhy it matters.
By Ryan Ruzich
![Page 2: High Quality Code Why it matters](https://reader033.vdocuments.us/reader033/viewer/2022051115/5681429a550346895daed06b/html5/thumbnails/2.jpg)
Design
Definition: Software Design means the conception, invention, or contrivance of a scheme for turning a specification for computer software into operational software.
![Page 3: High Quality Code Why it matters](https://reader033.vdocuments.us/reader033/viewer/2022051115/5681429a550346895daed06b/html5/thumbnails/3.jpg)
![Page 4: High Quality Code Why it matters](https://reader033.vdocuments.us/reader033/viewer/2022051115/5681429a550346895daed06b/html5/thumbnails/4.jpg)
Challenges in Design
Horst Rittel and Melvin Webber defined a “wicked” problem as one that could be clearly described only by solving it, or by solving part of it.
Essentially, this implies you have to “solve” the problem in order to define it, and solve it again to create a solution that works.
![Page 5: High Quality Code Why it matters](https://reader033.vdocuments.us/reader033/viewer/2022051115/5681429a550346895daed06b/html5/thumbnails/5.jpg)
![Page 6: High Quality Code Why it matters](https://reader033.vdocuments.us/reader033/viewer/2022051115/5681429a550346895daed06b/html5/thumbnails/6.jpg)
Challenges in Design
Design is a sloppy processDesign is about tradeoffs and prioritiesDesign involves restrictionsDesign is nondeterministic (multiple
ways to solve each part)Design is a heuristic process (rules of
thumb)Design is emergent(evolves over time).
![Page 7: High Quality Code Why it matters](https://reader033.vdocuments.us/reader033/viewer/2022051115/5681429a550346895daed06b/html5/thumbnails/7.jpg)
![Page 8: High Quality Code Why it matters](https://reader033.vdocuments.us/reader033/viewer/2022051115/5681429a550346895daed06b/html5/thumbnails/8.jpg)
Desireable Characteristics of a DesignMinimal ComplexityEase of MaintenanceLoose CouplingExtensibilityReusabilityHigh Fan-inLow-to-medium Fan-inPortability
![Page 9: High Quality Code Why it matters](https://reader033.vdocuments.us/reader033/viewer/2022051115/5681429a550346895daed06b/html5/thumbnails/9.jpg)
Desireable Characteristics of a Design ContLeannessStratificationStandard Techniques
![Page 10: High Quality Code Why it matters](https://reader033.vdocuments.us/reader033/viewer/2022051115/5681429a550346895daed06b/html5/thumbnails/10.jpg)
5 Levels of Design
Level 1: The complete software systemLevel 2: Divisions into subsystemsLevel 3: Division into classesLevel 4: Division into data and routinesLevel 5: Internal routine design
![Page 11: High Quality Code Why it matters](https://reader033.vdocuments.us/reader033/viewer/2022051115/5681429a550346895daed06b/html5/thumbnails/11.jpg)
Heuristics
Because Design is nondeterministic, Software Engineers must follow “rules of thumb”, more commonly known as Heuristics, in their approach to software design.
![Page 12: High Quality Code Why it matters](https://reader033.vdocuments.us/reader033/viewer/2022051115/5681429a550346895daed06b/html5/thumbnails/12.jpg)
Some Common Heuristics
Find Real World Objects to base your ADT’s on.
Form Consistent AbstractionsEncapsulate Implementation DetailsInheritanceInformation HidingIdentify Areas Likely to Change and
Isolate them.Keep Coupling of Classes Loose
![Page 13: High Quality Code Why it matters](https://reader033.vdocuments.us/reader033/viewer/2022051115/5681429a550346895daed06b/html5/thumbnails/13.jpg)
Common Design Patterns
Reduce Complexity by providing ready-made abstractions
Reduce Errors by institutionalizing details of common solutions
Provide Heuristic Value by suggesting Design Alternatives
Streamline Communication by moving the design dialog to a higher level
![Page 14: High Quality Code Why it matters](https://reader033.vdocuments.us/reader033/viewer/2022051115/5681429a550346895daed06b/html5/thumbnails/14.jpg)
Other Heuristics
Aim for Strong CohesionBuild HierarchiesFormalize Class ConstructsAssign ResponsibilitesDesign for TestAvoid Failure
![Page 15: High Quality Code Why it matters](https://reader033.vdocuments.us/reader033/viewer/2022051115/5681429a550346895daed06b/html5/thumbnails/15.jpg)
Other Heuristics
Choose Variable Binding (assigning values) time carefully
Make Central Points of ControlConsider using Brute ForceDraw a DiagramModularity
![Page 16: High Quality Code Why it matters](https://reader033.vdocuments.us/reader033/viewer/2022051115/5681429a550346895daed06b/html5/thumbnails/16.jpg)
![Page 17: High Quality Code Why it matters](https://reader033.vdocuments.us/reader033/viewer/2022051115/5681429a550346895daed06b/html5/thumbnails/17.jpg)
Design Practices
Iterate--Keep iterating at a design process until you arrive at the most optimal
Divide and ConquerTop-Down and Bottom-Up DesignExperimental PrototypingCollaborative Design
![Page 18: High Quality Code Why it matters](https://reader033.vdocuments.us/reader033/viewer/2022051115/5681429a550346895daed06b/html5/thumbnails/18.jpg)
Capturing your Design
Insert design documentation into the code itself
Capture design discussion and decisions on a wiki
Write email summaries
![Page 19: High Quality Code Why it matters](https://reader033.vdocuments.us/reader033/viewer/2022051115/5681429a550346895daed06b/html5/thumbnails/19.jpg)
Questions?