SlideShare une entreprise Scribd logo
1  sur  24
Télécharger pour lire hors ligne
5. Design in Construction
Code Complete
Author : Steven C. McConnell.

Prof. Asha N

1
Introduction




SOME PEOPLE MIGHT ARGUE THAT design isn’t really a
construction activity, but many activities are thought of as
construction, often including design.
A lot of design is done while the programmer sits at the
keyboard.
- “Design” might be just writing a class interface in pseudo
code before writing the details. It might be drawing diagrams of
a few class relationships before coding them.

Prof. Asha N

2
5.1. Design Challenges





“software design” means the conception,
invention, or contrivance of a scheme for
turning a specification for a computer program
into an operational program.
that links requirements to coding and debugging.
A good top-level design provides a structure that
can safely contain multiple lower level designs.

Prof. Asha N

3
Design is a “Wicked” Problem




Prof. Asha N

“wicked” problem as one that
could be clearly defined only
by solving it, or by solving
part of it.
This paradox implies,
essentially, that you have to
“solve” the problem once in
order to clearly define it and
then solve it again to create a
solution that works.
4
Design is a Sloppy Process




Design is sloppy because a good solution is
often only subtly different from a poor one.
Design is also sloppy because it’s hard to know
when your design is “good enough.”
Since design is open-ended, the most common
answer to that question is
-“When you’re out of time.”

Prof. Asha N

5
Other Design Challenges







Design is About Trade-Offs and Priorities
Design Involves Restrictions
Design is Non-Deterministic
Design is a Heuristic Process
Design is Emergent

Prof. Asha N

6
5.2 Design Concepts


Good design depends on understanding a handful of
key concepts.








The role of complexity.
desirable characteristics of designs.
levels of design.

Managing Complexity:
Two different classes of problems—the essential and the
accidental
the complexity of a problem is reduced by dividing the
system into subsystems.
Prof. Asha N

7
Design Concepts
Ineffective Design:





A complex solution to a simple problem
A simple, incorrect solution to a complex
problem
An inappropriate, complex solution to a
complex problem

Prof. Asha N

8
Design Concepts
How to Attack Complexity
Two-prong approach to managing Complexity:
1. Minimize the amount of essential complexity
that anyone’s brain has to deal with at any one
time.
2. Keep accidental complexity from needlessly
proliferating.

Prof. Asha N

9
Design Concepts


Desirable Characteristics of a Design
•
•
•
•
•
•
•

•
•
•
•

Minimal complexity
Ease of maintenance
Minimal connectedness
Extensibility
Reusability
High fan-in
Low-to-medium fan-out
Portability
Leanness
Stratification
Standard techniques
Prof. Asha N

10
Design Concepts
Levels of Design

Prof. Asha N

11
Design Concepts
Levels:
 The system (1) is first organized into subsystems (2).
 The subsystems are further divided into classes (3), and
the classes are divided into routines and data (4).
 The inside of each routine is also designed (5).

Prof. Asha N

12
5.3 Design Building Blocks: Heuristics


design is non-deterministic, So skillful application of
an effective set of heuristics is the core activity in
good software design.
1.

Find Real-World Objects
The steps in designing with objects are







Identify the objects and their attributes (methods and data).
Determine what can be done to each object.
Determine what each object can do to other objects.
Determine the parts of each object that will be visible to other
objects— which parts will be public and which will be private.
Define each object’s public interface.

Prof. Asha N

13
Design Building Blocks: Heuristics


The Billing System

Prof. Asha N

14
Design Building Blocks: Heuristics
2.

Form Consistent Abstractions
• Abstraction allows
to focus on the
interface without
needing to worry
about the internal
workings of the
class.
•Abstraction allows
you to take a simpler
view of a complex
concept.
Prof. Asha N

15
Design Building Blocks: Heuristics
3. Encapsulate Implementation Details
Encapsulation says that, not
only are you allowed to take
a simpler view of a complex
concept, you are not allowed
to look at any of the details
of the complex concept.

Prof. Asha N

16
Design Building Blocks: Heuristics
4. Inherit When Inheritance Simplifies the
Design


Defining similarities and differences among objects
is called “inheritance”

5. Hide Secrets (Information Hiding)


Information hiding is characterized by the idea of
“secrets,” design and implementation decisions that
a software developer hides in one place from the rest
of a program.
Prof. Asha N

17
Design Building Blocks: Heuristics
6.

Secrets and the Right to Privacy
A good class interface is like
the tip of an iceberg, leaving
most of the class unexposed.
Two Categories of Secrets
● Hiding complexity so that your
brain doesn’t have to deal with it
unless you’re specifically
concerned with it
● Hiding sources of change so that
when change occurs the effects
are localized
Prof. Asha N

18
Design Building Blocks: Heuristics
7. Value of Information Hiding


Information hiding has unique heuristic power, a unique
ability to inspire effective design solutions.

8. Identify Areas Likely to Change


ability to anticipate change
few areas that are likely to change:








Business logic
Hardware dependencies
Input and output
Nonstandard language features
Difficult design and construction areas
Status variables
Data-size constraints
Prof. Asha N

19
Design Building Blocks: Heuristics
9. Anticipating Different Degrees of Change


design the system so that the effect or scope of the
change is proportional to the chance that the change
will occur.

10. Keep Coupling Loose


Coupling describes how tightly a class or routine is
related to other classes or routines. The goal is to
create classes and routines with small, direct, visible,
and flexible relations to other classes and routines
(loose coupling).
Prof. Asha N

20
Design Building Blocks: Heuristics
Coupling Criteria


Size
 Visibility
 Flexibility

Kinds of Coupling


Simple-data-parameter coupling
 Simple-object coupling
 Object-parameter coupling
 Semantic coupling
Prof. Asha N

21
Look for Common Design Patterns





Patterns reduce complexity by providing
ready-made abstractions
Patterns reduce errors by institutionalizing
details of common solutions
Patterns provide heuristic value by
suggesting design alternatives
Patterns streamline communication by
moving the design dialog to a higher level
Prof. Asha N

22
Other Heuristics














Aim for Strong Cohesion
Build Hierarchies
Formalize Class Contracts
Assign Responsibilities
Design for Test
Avoid Failure
Choose Binding Time Consciously
Make Central Points of Control
Consider Using Brute Force
Draw a Diagram
Keep Your Design Modular
Prof. Asha N

23
5.4 Design Practices










Iterate
Divide and Conquer
Top-Down and Bottom-Up Design Approaches
Argument for Top Down
Argument for Bottom Up
Experimental Prototyping
Collaborative Design
How Much Design is Enough?
Capturing Your Design Work
Prof. Asha N

24

Contenu connexe

Tendances

Advanced softwares used in civil engineering
Advanced softwares used in civil  engineeringAdvanced softwares used in civil  engineering
Advanced softwares used in civil engineeringVinaykumar Koli
 
STEEL STRUCTURE CONSTRUCTION.
STEEL STRUCTURE CONSTRUCTION.STEEL STRUCTURE CONSTRUCTION.
STEEL STRUCTURE CONSTRUCTION.Mehul Gohil
 
DESIGN AND ANALYSIS OF G+3 RESIDENTIAL BUILDING BY S.MAHAMMAD FROM RAJIV GAND...
DESIGN AND ANALYSIS OF G+3 RESIDENTIAL BUILDING BY S.MAHAMMAD FROM RAJIV GAND...DESIGN AND ANALYSIS OF G+3 RESIDENTIAL BUILDING BY S.MAHAMMAD FROM RAJIV GAND...
DESIGN AND ANALYSIS OF G+3 RESIDENTIAL BUILDING BY S.MAHAMMAD FROM RAJIV GAND...Mahammad2251
 
Application of programming languages in civil engineering
Application of programming languages in civil engineeringApplication of programming languages in civil engineering
Application of programming languages in civil engineeringMuhammad Usama Umer
 
7 english 2 2.5 brick thick bond
7 english 2 2.5 brick thick bond7 english 2 2.5 brick thick bond
7 english 2 2.5 brick thick bondVartika khandelwal
 
Analysis and design of building
Analysis and design of buildingAnalysis and design of building
Analysis and design of buildingKrishnagnr
 
Green Building Materials
Green Building MaterialsGreen Building Materials
Green Building MaterialsPulkit Shukla
 
Designing and drawing of flat slab with the help of i.s code
Designing and drawing of flat slab with the help of i.s code Designing and drawing of flat slab with the help of i.s code
Designing and drawing of flat slab with the help of i.s code Sandeep Yadav
 
Construction Technology I Presentation Slides
Construction Technology I Presentation SlidesConstruction Technology I Presentation Slides
Construction Technology I Presentation SlidesJiaYu36
 
Digital construction for integrated project delivery
Digital construction for integrated project deliveryDigital construction for integrated project delivery
Digital construction for integrated project deliveryStephen Au
 
073 Modern Method of Construction https://www.blogger.com/profile/0220990482...
073 Modern Method of Construction  https://www.blogger.com/profile/0220990482...073 Modern Method of Construction  https://www.blogger.com/profile/0220990482...
073 Modern Method of Construction https://www.blogger.com/profile/0220990482...Dr Fereidoun Dejahang
 
Air pollution due to construction
Air pollution due to constructionAir pollution due to construction
Air pollution due to constructionSaurabh Singh
 
causes & prevention of cracks
causes & prevention of crackscauses & prevention of cracks
causes & prevention of cracksBhavek Sharma
 
Construction Industry Augmented Reality
Construction Industry Augmented RealityConstruction Industry Augmented Reality
Construction Industry Augmented RealityARMarketing.org
 
Bc open pre fabricated construction system
Bc open pre fabricated construction systemBc open pre fabricated construction system
Bc open pre fabricated construction systemAnuj Singhal
 

Tendances (20)

SOFTWARES IN CIVIL ENGINEERING
SOFTWARES IN CIVIL ENGINEERINGSOFTWARES IN CIVIL ENGINEERING
SOFTWARES IN CIVIL ENGINEERING
 
Civil drawing detail
Civil drawing detailCivil drawing detail
Civil drawing detail
 
Advanced softwares used in civil engineering
Advanced softwares used in civil  engineeringAdvanced softwares used in civil  engineering
Advanced softwares used in civil engineering
 
STEEL STRUCTURE CONSTRUCTION.
STEEL STRUCTURE CONSTRUCTION.STEEL STRUCTURE CONSTRUCTION.
STEEL STRUCTURE CONSTRUCTION.
 
DESIGN AND ANALYSIS OF G+3 RESIDENTIAL BUILDING BY S.MAHAMMAD FROM RAJIV GAND...
DESIGN AND ANALYSIS OF G+3 RESIDENTIAL BUILDING BY S.MAHAMMAD FROM RAJIV GAND...DESIGN AND ANALYSIS OF G+3 RESIDENTIAL BUILDING BY S.MAHAMMAD FROM RAJIV GAND...
DESIGN AND ANALYSIS OF G+3 RESIDENTIAL BUILDING BY S.MAHAMMAD FROM RAJIV GAND...
 
X10862(oen751)
X10862(oen751)X10862(oen751)
X10862(oen751)
 
Application of programming languages in civil engineering
Application of programming languages in civil engineeringApplication of programming languages in civil engineering
Application of programming languages in civil engineering
 
7 english 2 2.5 brick thick bond
7 english 2 2.5 brick thick bond7 english 2 2.5 brick thick bond
7 english 2 2.5 brick thick bond
 
Analysis and design of building
Analysis and design of buildingAnalysis and design of building
Analysis and design of building
 
Green Building Materials
Green Building MaterialsGreen Building Materials
Green Building Materials
 
Designing and drawing of flat slab with the help of i.s code
Designing and drawing of flat slab with the help of i.s code Designing and drawing of flat slab with the help of i.s code
Designing and drawing of flat slab with the help of i.s code
 
Introduction To Building Services
Introduction To Building ServicesIntroduction To Building Services
Introduction To Building Services
 
Design engineering
Design engineeringDesign engineering
Design engineering
 
Construction Technology I Presentation Slides
Construction Technology I Presentation SlidesConstruction Technology I Presentation Slides
Construction Technology I Presentation Slides
 
Digital construction for integrated project delivery
Digital construction for integrated project deliveryDigital construction for integrated project delivery
Digital construction for integrated project delivery
 
073 Modern Method of Construction https://www.blogger.com/profile/0220990482...
073 Modern Method of Construction  https://www.blogger.com/profile/0220990482...073 Modern Method of Construction  https://www.blogger.com/profile/0220990482...
073 Modern Method of Construction https://www.blogger.com/profile/0220990482...
 
Air pollution due to construction
Air pollution due to constructionAir pollution due to construction
Air pollution due to construction
 
causes & prevention of cracks
causes & prevention of crackscauses & prevention of cracks
causes & prevention of cracks
 
Construction Industry Augmented Reality
Construction Industry Augmented RealityConstruction Industry Augmented Reality
Construction Industry Augmented Reality
 
Bc open pre fabricated construction system
Bc open pre fabricated construction systemBc open pre fabricated construction system
Bc open pre fabricated construction system
 

En vedette

Design in construction
Design in constructionDesign in construction
Design in constructionAsha Sari
 
Code tuning techniques
Code tuning techniquesCode tuning techniques
Code tuning techniquesAsha Sari
 
程序员实践之路
程序员实践之路程序员实践之路
程序员实践之路Horky Chen
 
代码大全(内训)
代码大全(内训)代码大全(内训)
代码大全(内训)Horky Chen
 
程序员发展漫谈
程序员发展漫谈程序员发展漫谈
程序员发展漫谈Horky Chen
 
Java scriptcore brief introduction
Java scriptcore brief introductionJava scriptcore brief introduction
Java scriptcore brief introductionHorky Chen
 
MOST_OpenFoundry_version control system_Git
MOST_OpenFoundry_version control system_GitMOST_OpenFoundry_version control system_Git
MOST_OpenFoundry_version control system_GitSu Jan
 
Defencive programming
Defencive programmingDefencive programming
Defencive programmingAsha Sari
 
A Guideline to Test Your Own Code - Developer Testing
A Guideline to Test Your Own Code - Developer TestingA Guideline to Test Your Own Code - Developer Testing
A Guideline to Test Your Own Code - Developer TestingFolio3 Software
 
高品質軟體的基本動作 101 + 102 for NUU
高品質軟體的基本動作 101 + 102 for NUU高品質軟體的基本動作 101 + 102 for NUU
高品質軟體的基本動作 101 + 102 for NUUSu Jan
 
Code tuning strategies
Code tuning strategiesCode tuning strategies
Code tuning strategiesAsha Sari
 
高品質軟體的基本動作 101 for NTHU
高品質軟體的基本動作 101 for NTHU高品質軟體的基本動作 101 for NTHU
高品質軟體的基本動作 101 for NTHUSu Jan
 
Code Tuning
Code TuningCode Tuning
Code Tuningbgtraghu
 
The pseudocode
The pseudocodeThe pseudocode
The pseudocodeAsha Sari
 
Rm 1 Intro Types Research Process
Rm   1   Intro Types   Research ProcessRm   1   Intro Types   Research Process
Rm 1 Intro Types Research Processitsvineeth209
 

En vedette (19)

Design in construction
Design in constructionDesign in construction
Design in construction
 
Code tuning techniques
Code tuning techniquesCode tuning techniques
Code tuning techniques
 
程序员实践之路
程序员实践之路程序员实践之路
程序员实践之路
 
代码大全(内训)
代码大全(内训)代码大全(内训)
代码大全(内训)
 
程序员发展漫谈
程序员发展漫谈程序员发展漫谈
程序员发展漫谈
 
Coding Style
Coding StyleCoding Style
Coding Style
 
Java scriptcore brief introduction
Java scriptcore brief introductionJava scriptcore brief introduction
Java scriptcore brief introduction
 
MOST_OpenFoundry_version control system_Git
MOST_OpenFoundry_version control system_GitMOST_OpenFoundry_version control system_Git
MOST_OpenFoundry_version control system_Git
 
Defencive programming
Defencive programmingDefencive programming
Defencive programming
 
Integration
IntegrationIntegration
Integration
 
A Guideline to Test Your Own Code - Developer Testing
A Guideline to Test Your Own Code - Developer TestingA Guideline to Test Your Own Code - Developer Testing
A Guideline to Test Your Own Code - Developer Testing
 
高品質軟體的基本動作 101 + 102 for NUU
高品質軟體的基本動作 101 + 102 for NUU高品質軟體的基本動作 101 + 102 for NUU
高品質軟體的基本動作 101 + 102 for NUU
 
Variables
VariablesVariables
Variables
 
Code tuning strategies
Code tuning strategiesCode tuning strategies
Code tuning strategies
 
高品質軟體的基本動作 101 for NTHU
高品質軟體的基本動作 101 for NTHU高品質軟體的基本動作 101 for NTHU
高品質軟體的基本動作 101 for NTHU
 
Code Tuning
Code TuningCode Tuning
Code Tuning
 
Code Complete
Code CompleteCode Complete
Code Complete
 
The pseudocode
The pseudocodeThe pseudocode
The pseudocode
 
Rm 1 Intro Types Research Process
Rm   1   Intro Types   Research ProcessRm   1   Intro Types   Research Process
Rm 1 Intro Types Research Process
 

Similaire à Design in construction

SE2018_Lec 18_ Design Principles and Design Patterns
SE2018_Lec 18_ Design Principles and Design PatternsSE2018_Lec 18_ Design Principles and Design Patterns
SE2018_Lec 18_ Design Principles and Design PatternsAmr E. Mohamed
 
SE2_Lec 19_Design Principles and Design Patterns
SE2_Lec 19_Design Principles and Design PatternsSE2_Lec 19_Design Principles and Design Patterns
SE2_Lec 19_Design Principles and Design PatternsAmr E. Mohamed
 
Design concepts and principle,
Design concepts and principle, Design concepts and principle,
Design concepts and principle, awikhan12
 
Introduction to Design Pattern
Introduction to Design  PatternIntroduction to Design  Pattern
Introduction to Design PatternSanae BEKKAR
 
Excavating the knowledge of our ancestors
Excavating the knowledge of our ancestorsExcavating the knowledge of our ancestors
Excavating the knowledge of our ancestorsUwe Friedrichsen
 
04 designing architectures
04 designing architectures04 designing architectures
04 designing architecturesMajong DevJfu
 
Contemporary Software Engineering Practices Together With Enterprise
Contemporary Software Engineering Practices Together With EnterpriseContemporary Software Engineering Practices Together With Enterprise
Contemporary Software Engineering Practices Together With EnterpriseKenan Sevindik
 
Cs 1023 lec 4 (week 1)
Cs 1023 lec 4 (week 1)Cs 1023 lec 4 (week 1)
Cs 1023 lec 4 (week 1)stanbridge
 
Software Architecture for Agile Development
Software Architecture for Agile DevelopmentSoftware Architecture for Agile Development
Software Architecture for Agile DevelopmentHayim Makabee
 
Part C Developing Your Design SolutionThe Production Cycle.docx
Part C Developing Your Design SolutionThe Production Cycle.docxPart C Developing Your Design SolutionThe Production Cycle.docx
Part C Developing Your Design SolutionThe Production Cycle.docxsmile790243
 
PATTERNS01 - An Introduction to Design Patterns
PATTERNS01 - An Introduction to Design PatternsPATTERNS01 - An Introduction to Design Patterns
PATTERNS01 - An Introduction to Design PatternsMichael Heron
 
OOSE Unit 4 PPT.ppt
OOSE Unit 4 PPT.pptOOSE Unit 4 PPT.ppt
OOSE Unit 4 PPT.pptitadmin33
 
Software Architecture: How Much Design?
Software Architecture: How Much Design?Software Architecture: How Much Design?
Software Architecture: How Much Design?Òscar Vilaplana
 
Oose unit 4 ppt
Oose unit 4 pptOose unit 4 ppt
Oose unit 4 pptDr VISU P
 
Mit109 – software engineering
Mit109 – software engineeringMit109 – software engineering
Mit109 – software engineeringsmumbahelp
 

Similaire à Design in construction (20)

SE2018_Lec 18_ Design Principles and Design Patterns
SE2018_Lec 18_ Design Principles and Design PatternsSE2018_Lec 18_ Design Principles and Design Patterns
SE2018_Lec 18_ Design Principles and Design Patterns
 
SE2_Lec 19_Design Principles and Design Patterns
SE2_Lec 19_Design Principles and Design PatternsSE2_Lec 19_Design Principles and Design Patterns
SE2_Lec 19_Design Principles and Design Patterns
 
Design concepts and principle,
Design concepts and principle, Design concepts and principle,
Design concepts and principle,
 
Introduction to Design Pattern
Introduction to Design  PatternIntroduction to Design  Pattern
Introduction to Design Pattern
 
Unit 3
Unit 3Unit 3
Unit 3
 
Excavating the knowledge of our ancestors
Excavating the knowledge of our ancestorsExcavating the knowledge of our ancestors
Excavating the knowledge of our ancestors
 
04 designing architectures
04 designing architectures04 designing architectures
04 designing architectures
 
Design final
Design finalDesign final
Design final
 
Contemporary Software Engineering Practices Together With Enterprise
Contemporary Software Engineering Practices Together With EnterpriseContemporary Software Engineering Practices Together With Enterprise
Contemporary Software Engineering Practices Together With Enterprise
 
Cs 1023 lec 4 (week 1)
Cs 1023 lec 4 (week 1)Cs 1023 lec 4 (week 1)
Cs 1023 lec 4 (week 1)
 
Software Architecture for Agile Development
Software Architecture for Agile DevelopmentSoftware Architecture for Agile Development
Software Architecture for Agile Development
 
Software engg unit 3
Software engg unit 3 Software engg unit 3
Software engg unit 3
 
Chapter 08
Chapter 08Chapter 08
Chapter 08
 
Part C Developing Your Design SolutionThe Production Cycle.docx
Part C Developing Your Design SolutionThe Production Cycle.docxPart C Developing Your Design SolutionThe Production Cycle.docx
Part C Developing Your Design SolutionThe Production Cycle.docx
 
PATTERNS01 - An Introduction to Design Patterns
PATTERNS01 - An Introduction to Design PatternsPATTERNS01 - An Introduction to Design Patterns
PATTERNS01 - An Introduction to Design Patterns
 
CHAPTER12.ppt
CHAPTER12.pptCHAPTER12.ppt
CHAPTER12.ppt
 
OOSE Unit 4 PPT.ppt
OOSE Unit 4 PPT.pptOOSE Unit 4 PPT.ppt
OOSE Unit 4 PPT.ppt
 
Software Architecture: How Much Design?
Software Architecture: How Much Design?Software Architecture: How Much Design?
Software Architecture: How Much Design?
 
Oose unit 4 ppt
Oose unit 4 pptOose unit 4 ppt
Oose unit 4 ppt
 
Mit109 – software engineering
Mit109 – software engineeringMit109 – software engineering
Mit109 – software engineering
 

Dernier

AUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptxAUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptxiammrhaywood
 
Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...raviapr7
 
Education and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptxEducation and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptxraviapr7
 
What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?TechSoup
 
HED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfHED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfMohonDas
 
Human-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesHuman-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesMohammad Hassany
 
The basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxThe basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxheathfieldcps1
 
Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.EnglishCEIPdeSigeiro
 
In - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxIn - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxAditiChauhan701637
 
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRADUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRATanmoy Mishra
 
Quality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICEQuality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICESayali Powar
 
How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17Celine George
 
3.21.24 The Origins of Black Power.pptx
3.21.24  The Origins of Black Power.pptx3.21.24  The Origins of Black Power.pptx
3.21.24 The Origins of Black Power.pptxmary850239
 
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxPractical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxKatherine Villaluna
 
The Singapore Teaching Practice document
The Singapore Teaching Practice documentThe Singapore Teaching Practice document
The Singapore Teaching Practice documentXsasf Sfdfasd
 
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptxClinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptxraviapr7
 
Diploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdfDiploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdfMohonDas
 
The Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George WellsThe Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George WellsEugene Lysak
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.raviapr7
 

Dernier (20)

AUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptxAUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptx
 
Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...
 
Education and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptxEducation and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptx
 
What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?What is the Future of QuickBooks DeskTop?
What is the Future of QuickBooks DeskTop?
 
HED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfHED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdf
 
Human-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesHuman-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming Classes
 
The basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxThe basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptx
 
Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.
 
In - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxIn - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptx
 
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRADUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
 
Quality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICEQuality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICE
 
Prelims of Kant get Marx 2.0: a general politics quiz
Prelims of Kant get Marx 2.0: a general politics quizPrelims of Kant get Marx 2.0: a general politics quiz
Prelims of Kant get Marx 2.0: a general politics quiz
 
How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17How to Make a Field read-only in Odoo 17
How to Make a Field read-only in Odoo 17
 
3.21.24 The Origins of Black Power.pptx
3.21.24  The Origins of Black Power.pptx3.21.24  The Origins of Black Power.pptx
3.21.24 The Origins of Black Power.pptx
 
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxPractical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
 
The Singapore Teaching Practice document
The Singapore Teaching Practice documentThe Singapore Teaching Practice document
The Singapore Teaching Practice document
 
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptxClinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
 
Diploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdfDiploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdf
 
The Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George WellsThe Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George Wells
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.
 

Design in construction

  • 1. 5. Design in Construction Code Complete Author : Steven C. McConnell. Prof. Asha N 1
  • 2. Introduction   SOME PEOPLE MIGHT ARGUE THAT design isn’t really a construction activity, but many activities are thought of as construction, often including design. A lot of design is done while the programmer sits at the keyboard. - “Design” might be just writing a class interface in pseudo code before writing the details. It might be drawing diagrams of a few class relationships before coding them. Prof. Asha N 2
  • 3. 5.1. Design Challenges    “software design” means the conception, invention, or contrivance of a scheme for turning a specification for a computer program into an operational program. that links requirements to coding and debugging. A good top-level design provides a structure that can safely contain multiple lower level designs. Prof. Asha N 3
  • 4. Design is a “Wicked” Problem   Prof. Asha N “wicked” problem as one that could be clearly defined only by solving it, or by solving part of it. This paradox implies, essentially, that you have to “solve” the problem once in order to clearly define it and then solve it again to create a solution that works. 4
  • 5. Design is a Sloppy Process    Design is sloppy because a good solution is often only subtly different from a poor one. Design is also sloppy because it’s hard to know when your design is “good enough.” Since design is open-ended, the most common answer to that question is -“When you’re out of time.” Prof. Asha N 5
  • 6. Other Design Challenges      Design is About Trade-Offs and Priorities Design Involves Restrictions Design is Non-Deterministic Design is a Heuristic Process Design is Emergent Prof. Asha N 6
  • 7. 5.2 Design Concepts  Good design depends on understanding a handful of key concepts.       The role of complexity. desirable characteristics of designs. levels of design. Managing Complexity: Two different classes of problems—the essential and the accidental the complexity of a problem is reduced by dividing the system into subsystems. Prof. Asha N 7
  • 8. Design Concepts Ineffective Design:    A complex solution to a simple problem A simple, incorrect solution to a complex problem An inappropriate, complex solution to a complex problem Prof. Asha N 8
  • 9. Design Concepts How to Attack Complexity Two-prong approach to managing Complexity: 1. Minimize the amount of essential complexity that anyone’s brain has to deal with at any one time. 2. Keep accidental complexity from needlessly proliferating. Prof. Asha N 9
  • 10. Design Concepts  Desirable Characteristics of a Design • • • • • • • • • • • Minimal complexity Ease of maintenance Minimal connectedness Extensibility Reusability High fan-in Low-to-medium fan-out Portability Leanness Stratification Standard techniques Prof. Asha N 10
  • 11. Design Concepts Levels of Design Prof. Asha N 11
  • 12. Design Concepts Levels:  The system (1) is first organized into subsystems (2).  The subsystems are further divided into classes (3), and the classes are divided into routines and data (4).  The inside of each routine is also designed (5). Prof. Asha N 12
  • 13. 5.3 Design Building Blocks: Heuristics  design is non-deterministic, So skillful application of an effective set of heuristics is the core activity in good software design. 1. Find Real-World Objects The steps in designing with objects are      Identify the objects and their attributes (methods and data). Determine what can be done to each object. Determine what each object can do to other objects. Determine the parts of each object that will be visible to other objects— which parts will be public and which will be private. Define each object’s public interface. Prof. Asha N 13
  • 14. Design Building Blocks: Heuristics  The Billing System Prof. Asha N 14
  • 15. Design Building Blocks: Heuristics 2. Form Consistent Abstractions • Abstraction allows to focus on the interface without needing to worry about the internal workings of the class. •Abstraction allows you to take a simpler view of a complex concept. Prof. Asha N 15
  • 16. Design Building Blocks: Heuristics 3. Encapsulate Implementation Details Encapsulation says that, not only are you allowed to take a simpler view of a complex concept, you are not allowed to look at any of the details of the complex concept. Prof. Asha N 16
  • 17. Design Building Blocks: Heuristics 4. Inherit When Inheritance Simplifies the Design  Defining similarities and differences among objects is called “inheritance” 5. Hide Secrets (Information Hiding)  Information hiding is characterized by the idea of “secrets,” design and implementation decisions that a software developer hides in one place from the rest of a program. Prof. Asha N 17
  • 18. Design Building Blocks: Heuristics 6. Secrets and the Right to Privacy A good class interface is like the tip of an iceberg, leaving most of the class unexposed. Two Categories of Secrets ● Hiding complexity so that your brain doesn’t have to deal with it unless you’re specifically concerned with it ● Hiding sources of change so that when change occurs the effects are localized Prof. Asha N 18
  • 19. Design Building Blocks: Heuristics 7. Value of Information Hiding  Information hiding has unique heuristic power, a unique ability to inspire effective design solutions. 8. Identify Areas Likely to Change  ability to anticipate change few areas that are likely to change:        Business logic Hardware dependencies Input and output Nonstandard language features Difficult design and construction areas Status variables Data-size constraints Prof. Asha N 19
  • 20. Design Building Blocks: Heuristics 9. Anticipating Different Degrees of Change  design the system so that the effect or scope of the change is proportional to the chance that the change will occur. 10. Keep Coupling Loose  Coupling describes how tightly a class or routine is related to other classes or routines. The goal is to create classes and routines with small, direct, visible, and flexible relations to other classes and routines (loose coupling). Prof. Asha N 20
  • 21. Design Building Blocks: Heuristics Coupling Criteria  Size  Visibility  Flexibility Kinds of Coupling  Simple-data-parameter coupling  Simple-object coupling  Object-parameter coupling  Semantic coupling Prof. Asha N 21
  • 22. Look for Common Design Patterns     Patterns reduce complexity by providing ready-made abstractions Patterns reduce errors by institutionalizing details of common solutions Patterns provide heuristic value by suggesting design alternatives Patterns streamline communication by moving the design dialog to a higher level Prof. Asha N 22
  • 23. Other Heuristics            Aim for Strong Cohesion Build Hierarchies Formalize Class Contracts Assign Responsibilities Design for Test Avoid Failure Choose Binding Time Consciously Make Central Points of Control Consider Using Brute Force Draw a Diagram Keep Your Design Modular Prof. Asha N 23
  • 24. 5.4 Design Practices          Iterate Divide and Conquer Top-Down and Bottom-Up Design Approaches Argument for Top Down Argument for Bottom Up Experimental Prototyping Collaborative Design How Much Design is Enough? Capturing Your Design Work Prof. Asha N 24