SlideShare a Scribd company logo
1 of 21
Download to read offline
Code Inspections

Ideas & Conceptualization
Before
Before




http://thenextweb.com/shareables/2011/01/
08/how-to-write-good-code-cartoon/
Agenda

• A set of ideas about code inspection
Sources
•   Schach, Stephen R. Object-Oriented and Classical
    Software Engineering Eighth Edition. Mc Graw Hill,
    2010
•   Boswell and Foucher. The Art of Readable Code.
    O’Reilly Media, Inc., 2012.
•   Robert C. Martin. Clean Code - A Handbook of Agile
    Software Craftsmanship. Pearson Education, 2009.
•   Max Kanat-Alexander. Code Simplicity. O’Reilly
    Media, Inc., 2012

•   And so others…
Key Issues

 •   Meaningful Variable Names
 •   Self-Documenting Code
 •   Parameters
 •   Layout & Readability
 •   Coding Standards
Meaningful Variable Names
• meaningful variable names means: “meaningful
  from the viewpoint of future maintenance
  programmers.”
• consistent variable names, examples
  •   averageFreq , frequencyMaximum , minFr , and
      frqncyTotl (X)
  •   frequencyMaximum / minimumFrequency (X)
  •   frequencyAverage, frequencyMaximum,
      frequencyMinimum, and frequencyTotal, (OK)
  •   averageFrequency, maximumFrequency,
      minimumFrequency, and totalFrequency (OK).
Meaningful Variable Names
• The idea is that the name of a variable should
  incorporate type information.

• The best known of such schemes are the
  Hungarian Naming Conventions, popularized
  by Microsoft.
Meaningful Variable Names




      Source: The Art of Readable code
Self-Documenting Code
• The code artifact can be understood easily and
  unambiguously by all the other programmers who have to
  read it, starting with the software quality assurance group and
  including a number of different postdelivery maintenance
  programmers
• The problem becomes more acute in the light of the
  unfortunate practice of assigning postdelivery maintenance
  tasks to inexperienced programmers and not supervising
  them closely. The undocumented code of the artifact may be
  only partially comprehensible to an experienced programmer.
  How much worse, then, is the situation when the
  maintenance programmer is inexperienced.
Self-Documenting Code




 Source: Object-Oriented and Classical Software Engineering Eighth Edition
Parameters
• All such apparent constants should be treated as
  parameters. If a value should change for any
  reason, this change can be implemented quickly
  and effectively
• Better still, the value of the constants should be
  read in from a parameter file at the beginning of
  the run
Layout & Readability
• No more than one statement should appear on a
  line, even though many programming languages
  permit more than one.

• Another useful aid is blank lines. Methods should
  be separated by blank lines; in addition, it often is
  helpful to break up large blocks of code with
  blank lines. The extra “white space” makes the
  code easier to read and, hence, comprehend
Layout & Readability

       X-(

       X-(


       =)
Layout & Readability




  =)
Coding Standards
• The aim of coding standards is to make
  maintenance easier.
• However, if the effect of a standard is to make the
  life of software developers difficult, then such a
  standard should be modified, even in the middle
  of a project.
• Overly     restrictive  coding    standards     are
  counterproductive, in that the quality of software
  production inevitably must suffer if programmers
  have to develop software within such a
  framework
So…
• Think about code inspection
  • Look for tools for supporting your code
    inspections
  • How are integrated the tool(s) with your
    development environment?
     (Including CI, development platform,
       versioning)
  • How the tool(s) make inspections/analysis to
    the code in the chosen language?
So…

• ¿Code Inspection and Code analysis are the
  same?
• ¿Which is the role of debugging in the code
  analysis?
• The tool supports static and/or dynamic analysis?
• How can you configure the rules for code
  analysis / inspections?
So…
• What advantages gives you SONAR for the code
  inspection process?
• SONAR “contains” the chosen tool(s)?
• Are there some ways for linking the code
  inspection tool (and SONAR) with your
  development environment?
• The chosen tool(s), and SONAR, give you some
  sub-tools or plugins for improving the productivity
  of your developer team? ¿Which?
So…

• ¿Are there any previous coding standard that you
  can use?
• ¿Are there any guideline for reviewing your code
  in the language that you work?
Thanks for your attention
fdgiraldo@uniquindio.edu.co

More Related Content

What's hot

Supporting program comprehension with source code summarization
Supporting program comprehension with source code summarizationSupporting program comprehension with source code summarization
Supporting program comprehension with source code summarization
Masud Rahman
 
The Dark Side of Code Metrics
The Dark Side of Code MetricsThe Dark Side of Code Metrics
The Dark Side of Code Metrics
Donald Belcham
 

What's hot (20)

Coding standard
Coding standardCoding standard
Coding standard
 
Coding principles
Coding principles Coding principles
Coding principles
 
Abcxyz
AbcxyzAbcxyz
Abcxyz
 
Coding standards
Coding standardsCoding standards
Coding standards
 
Portrait of professional developer 2.0
Portrait of professional developer 2.0Portrait of professional developer 2.0
Portrait of professional developer 2.0
 
sitVIE - No comment?
sitVIE - No comment?sitVIE - No comment?
sitVIE - No comment?
 
Importance of the quality of code
Importance of the quality of codeImportance of the quality of code
Importance of the quality of code
 
Generic Tools - Specific Languages (PhD Defense Slides)
Generic Tools - Specific Languages (PhD Defense Slides)Generic Tools - Specific Languages (PhD Defense Slides)
Generic Tools - Specific Languages (PhD Defense Slides)
 
Introducing systems analysis, design & development Concepts
Introducing systems analysis, design & development ConceptsIntroducing systems analysis, design & development Concepts
Introducing systems analysis, design & development Concepts
 
Language-Oriented Business Applications
Language-Oriented Business ApplicationsLanguage-Oriented Business Applications
Language-Oriented Business Applications
 
Solid principles
Solid principlesSolid principles
Solid principles
 
Euro python 2015 writing quality code
Euro python 2015   writing quality codeEuro python 2015   writing quality code
Euro python 2015 writing quality code
 
Supporting program comprehension with source code summarization
Supporting program comprehension with source code summarizationSupporting program comprehension with source code summarization
Supporting program comprehension with source code summarization
 
The Dark Side of Code Metrics
The Dark Side of Code MetricsThe Dark Side of Code Metrics
The Dark Side of Code Metrics
 
Aspect Oriented Programing - Introduction
Aspect Oriented Programing - IntroductionAspect Oriented Programing - Introduction
Aspect Oriented Programing - Introduction
 
Introduction to Aspect Oriented Programming
Introduction to Aspect Oriented ProgrammingIntroduction to Aspect Oriented Programming
Introduction to Aspect Oriented Programming
 
Standard Coding, OOP Techniques and Code Reuse
Standard Coding, OOP Techniques and Code ReuseStandard Coding, OOP Techniques and Code Reuse
Standard Coding, OOP Techniques and Code Reuse
 
Software development best practices & coding guidelines
Software development best practices & coding guidelinesSoftware development best practices & coding guidelines
Software development best practices & coding guidelines
 
Architecting Domain-Specific Languages
Architecting Domain-Specific LanguagesArchitecting Domain-Specific Languages
Architecting Domain-Specific Languages
 
1 cc
1 cc1 cc
1 cc
 

Viewers also liked

Lesson 1: scratch basics
Lesson 1: scratch basicsLesson 1: scratch basics
Lesson 1: scratch basics
jonathanbyrne
 
Workflows adaptations for security management through MDD and Aspects
Workflows adaptations for security management through MDD and Aspects Workflows adaptations for security management through MDD and Aspects
Workflows adaptations for security management through MDD and Aspects
Fáber D. Giraldo
 
software configuration management
software configuration managementsoftware configuration management
software configuration management
Fáber D. Giraldo
 

Viewers also liked (15)

Scratch for Second Life
Scratch for Second Life Scratch for Second Life
Scratch for Second Life
 
Lesson 1: scratch basics
Lesson 1: scratch basicsLesson 1: scratch basics
Lesson 1: scratch basics
 
Workflows adaptations for security management through MDD and Aspects
Workflows adaptations for security management through MDD and Aspects Workflows adaptations for security management through MDD and Aspects
Workflows adaptations for security management through MDD and Aspects
 
L software testing
L   software testingL   software testing
L software testing
 
Patterns Overview
Patterns OverviewPatterns Overview
Patterns Overview
 
PhD Proposal - A Framework for evaluating the quality of languages in MDE env...
PhD Proposal - A Framework for evaluating the quality of languages in MDE env...PhD Proposal - A Framework for evaluating the quality of languages in MDE env...
PhD Proposal - A Framework for evaluating the quality of languages in MDE env...
 
I software quality
I   software qualityI   software quality
I software quality
 
Continuous Integration Introduction
Continuous Integration IntroductionContinuous Integration Introduction
Continuous Integration Introduction
 
Software configuration management in deep
Software configuration management in deepSoftware configuration management in deep
Software configuration management in deep
 
ISO 29119 and Software Testing - now what??
ISO 29119 and Software Testing - now what??ISO 29119 and Software Testing - now what??
ISO 29119 and Software Testing - now what??
 
Teamwork in Software Engineering Projects
Teamwork in Software Engineering ProjectsTeamwork in Software Engineering Projects
Teamwork in Software Engineering Projects
 
Introduction to RUP & SPEM
Introduction to RUP & SPEMIntroduction to RUP & SPEM
Introduction to RUP & SPEM
 
Introduction to Software Process
Introduction to Software ProcessIntroduction to Software Process
Introduction to Software Process
 
Project Planning in Software Engineering
Project Planning in Software EngineeringProject Planning in Software Engineering
Project Planning in Software Engineering
 
software configuration management
software configuration managementsoftware configuration management
software configuration management
 

Similar to Code Inspection

Quality metrics and angular js applications
Quality metrics and angular js applicationsQuality metrics and angular js applications
Quality metrics and angular js applications
nadeembtech
 
NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET
Dmytro Mindra
 
Introduction Software Engineering Basics-Module(01).pptx
Introduction Software Engineering Basics-Module(01).pptxIntroduction Software Engineering Basics-Module(01).pptx
Introduction Software Engineering Basics-Module(01).pptx
AbcXyz302255
 

Similar to Code Inspection (20)

Quality metrics and angular js applications
Quality metrics and angular js applicationsQuality metrics and angular js applications
Quality metrics and angular js applications
 
Software Coding- Software Coding
Software Coding- Software CodingSoftware Coding- Software Coding
Software Coding- Software Coding
 
Autoframework design
Autoframework designAutoframework design
Autoframework design
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best Practices
 
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best PracticesDesign Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best Practices
 
Scope of software engineering
Scope of software engineeringScope of software engineering
Scope of software engineering
 
NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET
 
Introduction to computer programming.pdf
Introduction to computer programming.pdfIntroduction to computer programming.pdf
Introduction to computer programming.pdf
 
Compilers.pptx
Compilers.pptxCompilers.pptx
Compilers.pptx
 
codEnforcer 2013
codEnforcer 2013codEnforcer 2013
codEnforcer 2013
 
Clean Infrastructure as Code
Clean Infrastructure as Code Clean Infrastructure as Code
Clean Infrastructure as Code
 
Domain specific modelling (DSM)
Domain specific modelling (DSM)Domain specific modelling (DSM)
Domain specific modelling (DSM)
 
An Introduction To Software Development - Implementation
An Introduction To Software Development - ImplementationAn Introduction To Software Development - Implementation
An Introduction To Software Development - Implementation
 
Unit_5 and Unit 6.pptx
Unit_5 and Unit 6.pptxUnit_5 and Unit 6.pptx
Unit_5 and Unit 6.pptx
 
Unit iv
Unit ivUnit iv
Unit iv
 
Pointcut Rejuvenation: Recovering Pointcut Expressions in Evolving Aspect-Ori...
Pointcut Rejuvenation: Recovering Pointcut Expressions in Evolving Aspect-Ori...Pointcut Rejuvenation: Recovering Pointcut Expressions in Evolving Aspect-Ori...
Pointcut Rejuvenation: Recovering Pointcut Expressions in Evolving Aspect-Ori...
 
Coding - SDLC Model
Coding - SDLC ModelCoding - SDLC Model
Coding - SDLC Model
 
KeithJohnston06212015
KeithJohnston06212015KeithJohnston06212015
KeithJohnston06212015
 
Introduction Software Engineering Basics-Module(01).pptx
Introduction Software Engineering Basics-Module(01).pptxIntroduction Software Engineering Basics-Module(01).pptx
Introduction Software Engineering Basics-Module(01).pptx
 
The Software Engineering Discipline and Evolution of S/W Engineering Methodol...
The Software Engineering Discipline and Evolution of S/W Engineering Methodol...The Software Engineering Discipline and Evolution of S/W Engineering Methodol...
The Software Engineering Discipline and Evolution of S/W Engineering Methodol...
 

More from Fáber D. Giraldo (11)

Introduction to MDE
Introduction to MDEIntroduction to MDE
Introduction to MDE
 
Applying a software TeleCare prototype in a real residences for older people ...
Applying a software TeleCare prototype in a real residences for older people ...Applying a software TeleCare prototype in a real residences for older people ...
Applying a software TeleCare prototype in a real residences for older people ...
 
Analysing the concept of quality in model-driven engineering literature: a sy...
Analysing the concept of quality in model-driven engineering literature: a sy...Analysing the concept of quality in model-driven engineering literature: a sy...
Analysing the concept of quality in model-driven engineering literature: a sy...
 
SEMAT
SEMATSEMAT
SEMAT
 
The SEI Approach
The SEI ApproachThe SEI Approach
The SEI Approach
 
The Agile Movement
The Agile MovementThe Agile Movement
The Agile Movement
 
software metrics (in spanish)
software metrics (in spanish)software metrics (in spanish)
software metrics (in spanish)
 
CMMI
CMMICMMI
CMMI
 
software estimation (in spanish)
software estimation (in spanish)software estimation (in spanish)
software estimation (in spanish)
 
Lab Software Architecture (in spanish)
Lab Software Architecture (in spanish)Lab Software Architecture (in spanish)
Lab Software Architecture (in spanish)
 
Implementation Model
Implementation ModelImplementation Model
Implementation Model
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Recently uploaded (20)

Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 

Code Inspection

  • 1. Code Inspections Ideas & Conceptualization
  • 4. Agenda • A set of ideas about code inspection
  • 5. Sources • Schach, Stephen R. Object-Oriented and Classical Software Engineering Eighth Edition. Mc Graw Hill, 2010 • Boswell and Foucher. The Art of Readable Code. O’Reilly Media, Inc., 2012. • Robert C. Martin. Clean Code - A Handbook of Agile Software Craftsmanship. Pearson Education, 2009. • Max Kanat-Alexander. Code Simplicity. O’Reilly Media, Inc., 2012 • And so others…
  • 6. Key Issues • Meaningful Variable Names • Self-Documenting Code • Parameters • Layout & Readability • Coding Standards
  • 7. Meaningful Variable Names • meaningful variable names means: “meaningful from the viewpoint of future maintenance programmers.” • consistent variable names, examples • averageFreq , frequencyMaximum , minFr , and frqncyTotl (X) • frequencyMaximum / minimumFrequency (X) • frequencyAverage, frequencyMaximum, frequencyMinimum, and frequencyTotal, (OK) • averageFrequency, maximumFrequency, minimumFrequency, and totalFrequency (OK).
  • 8. Meaningful Variable Names • The idea is that the name of a variable should incorporate type information. • The best known of such schemes are the Hungarian Naming Conventions, popularized by Microsoft.
  • 9. Meaningful Variable Names Source: The Art of Readable code
  • 10. Self-Documenting Code • The code artifact can be understood easily and unambiguously by all the other programmers who have to read it, starting with the software quality assurance group and including a number of different postdelivery maintenance programmers • The problem becomes more acute in the light of the unfortunate practice of assigning postdelivery maintenance tasks to inexperienced programmers and not supervising them closely. The undocumented code of the artifact may be only partially comprehensible to an experienced programmer. How much worse, then, is the situation when the maintenance programmer is inexperienced.
  • 11. Self-Documenting Code Source: Object-Oriented and Classical Software Engineering Eighth Edition
  • 12. Parameters • All such apparent constants should be treated as parameters. If a value should change for any reason, this change can be implemented quickly and effectively • Better still, the value of the constants should be read in from a parameter file at the beginning of the run
  • 13. Layout & Readability • No more than one statement should appear on a line, even though many programming languages permit more than one. • Another useful aid is blank lines. Methods should be separated by blank lines; in addition, it often is helpful to break up large blocks of code with blank lines. The extra “white space” makes the code easier to read and, hence, comprehend
  • 14. Layout & Readability X-( X-( =)
  • 16. Coding Standards • The aim of coding standards is to make maintenance easier. • However, if the effect of a standard is to make the life of software developers difficult, then such a standard should be modified, even in the middle of a project. • Overly restrictive coding standards are counterproductive, in that the quality of software production inevitably must suffer if programmers have to develop software within such a framework
  • 17. So… • Think about code inspection • Look for tools for supporting your code inspections • How are integrated the tool(s) with your development environment? (Including CI, development platform, versioning) • How the tool(s) make inspections/analysis to the code in the chosen language?
  • 18. So… • ¿Code Inspection and Code analysis are the same? • ¿Which is the role of debugging in the code analysis? • The tool supports static and/or dynamic analysis? • How can you configure the rules for code analysis / inspections?
  • 19. So… • What advantages gives you SONAR for the code inspection process? • SONAR “contains” the chosen tool(s)? • Are there some ways for linking the code inspection tool (and SONAR) with your development environment? • The chosen tool(s), and SONAR, give you some sub-tools or plugins for improving the productivity of your developer team? ¿Which?
  • 20. So… • ¿Are there any previous coding standard that you can use? • ¿Are there any guideline for reviewing your code in the language that you work?
  • 21. Thanks for your attention fdgiraldo@uniquindio.edu.co