SlideShare uma empresa Scribd logo
1 de 5
Software Bugs - A Software Architect point of view



By: Shahzad Sarwar
To: Development Team, Management
Date: 28th Feb 2010
Table of Content




    3.1.Arithmetic bugs......................................................................................................3
    3.2.Logic bugs..............................................................................................................3
    3.3.Syntax bugs............................................................................................................3
    .....................................................................................................................................3
    3.4.Resource bugs........................................................................................................3
    3.5.Co-programming bugs...........................................................................................4
    3.6.Functional bugs......................................................................................................4
    3.7.Teamworking bugs ................................................................................................4




Objective:
        To Analysis reasons of bugs in PCMS, Pegasus Cargo Management System.
        To study the nature and classification of bugs.
        To suggest a line of action for reducing bugs in application.
1. Bugs in Software Development

A software bug is the common term used to describe an error, flaw, mistake, failure, or fault in a
computer program or system that produces an incorrect or unexpected result, or causes it to
behave in unintended ways.


2. 20 Reasons for Bugs
       I. Lack of business domain.
     II. Lack of techno skills.
     III. Unfamiliarity with programming language
    IV. Unclear requirements
      V. Incorrect architecture
    VI. Incomplete design
    VII. Typos
   VIII. Inadequate understanding of interfaces
    IX. Inadequate understanding of standards (e.g. TCP/IP, ODBC, SQL, etc.)
      X. Poor documentation for legacy system
    XI. Design based on outdated requirements
    XII. Code written to outdated design
   XIII. Poor design for future expansion (e.g. hardwired constants, buried assumptions, etc.)
   XIV. Conflicting requirements
   XV. Laziness – the desire to use the easiest to implement solution.
   XVI. Bad fix of a previous problem
  XVII. Last minute changes/Lack of proper version control.
  XVIII. Lack of Unit testing by developers.
   XIX. Compromises made in req/design to meet delivery schedules.
   XX. Change: to requirements, infrastructure, tools etc., because it introduces the likelihood
          of all of the above to happen.


3. Common types of computer bugs
    3.1. Arithmetic bugs
             Division by zero
            Arithmetic overflow or underflow
            Loss of arithmetic precision due to rounding or numerically unstable algorithms

    3.2. Logic bugs
            Infinite loops and infinite recursion
            Off by one error, counting one too many or too few when looping

    3.3. Syntax bugs
            Use of the wrong operator, such as performing assignment instead of equality test.
             In simple cases often warned by the compiler; in many languages, deliberately
             guarded against by language syntax


    3.4. Resource bugs
        •    Null pointer dereference
        •    Using an uninitialized variable
        •    Using an otherwise valid instruction on the wrong data type (see packed
             decimal/binary coded decimal)
        •    Access violations
•    Resource leaks, where a finite system resource such as memory or file handles are
            exhausted by repeated allocation without release.
       •    Buffer overflow, in which a program tries to store data past the end of allocated
            storage. This may or may not lead to an access violation or storage violation. These
            bugs can form a security vulnerability.
       •    Excessive recursion which though logically valid causes stack overflow


   3.5. Co-programming bugs
           Deadlock
           Race condition
           Concurrency errors in Critical sections, Mutual exclusions and other features of
            concurrent processing. Time-of-check-to-time-of-use (TOCTOU) is a form of
            unprotected critical section.

   3.6. Functional bugs
         Lack of functionality
         Misunstanding of requirement specfications.

   3.7. Teamworking bugs
           Unpropagated updates; e.g. programmer changes "myAdd" but forgets to change
            "mySubtract", which uses the same algorithm. These errors are mitigated by the
            Don't Repeat Yourself philosophy.
           Comments out of date or incorrect: many programmers assume the comments
            accurately describe the code
           Differences between documentation and the actual product


4. Tips For Avoiding Bugs:
    Read Bugs reasons identfied in section 1daily and act accordingly.
    Be a Good Debugger
    Adopt a Bug Management and Tracking Methodology.
      Code Reviews. Four eyes see more than two. Pair programming is a good technique.
      Using log files or live logging during development and production usage is an important
       and useful technique to identify bugs.
      Use automated error and exception reporting techniques.
      Unit and regression testing is must.
      Test-driven development (TDD) is a software development technique that relies on the
       repetition of a very short development cycle: First the developer writes a failing
       automated test case that defines a desired improvement or new function, then produces
       code to pass that test and finally refactors the new code to acceptable standards.


5. Conclusion:

      All developers must read the reasons, classification and tips for bugs once a week and
       try to act accordingly.

      Following a TDD approach to software development can help a lot for developers and
       software development team in general for solving common problems in testing / bugs
       management.
   Bug frees software is a myth. There is a trade off between bug free software in first
        strike and increase in cost of software development. If we try to create software bug free
        then software development cost is increased considerable.

     Lets calculate DRE for PCMS. Defect Removal Effectiveness: (or efficiency as used
      by some writers) is calculated:
DRE = Defects removed during a development phase
          Defects latent in the product at that phase x 100%


Example:




The Defect Removal Effectiveness for each of the phases would be as follows:
Requirements DRE = 10 / (10+3+0+2+1) x 100% = 63%
Design DRE = (3+18) / (3+0+2+1+18+4+5+2) x 100% = 60%
Coding DRE = (0+4+26) / (0+2+1+4+5+2+26+8+7) x 100% = 55%
Testing DRE = (2+5+8) / (2+1+5+2+8+7) x 100% = 60%

Development DRE = (Pre-release Defect) / (Total Defects) x 100% =
(10+3+2+18+4+5+26+8) / (10+3+2+1+18+4+5+2+26+8+7) x 100 = 88%

The longer a defect exists in a product before it is detected, the more expensive it is to fix.

           So, Happy Bug fixing for PCMS.


6. References:
http://www.westfallteam.com/Papers/defect_removal_effectiveness.pdf
http://en.wikipedia.org
http://www.google.com

Mais conteúdo relacionado

Mais procurados

It's Not a Bug, It's a Feature — How Misclassification Impacts Bug Prediction
It's Not a Bug, It's a Feature — How Misclassification Impacts Bug PredictionIt's Not a Bug, It's a Feature — How Misclassification Impacts Bug Prediction
It's Not a Bug, It's a Feature — How Misclassification Impacts Bug Prediction
sjust
 
The Impact of Test Ownership and Team Structure on the Reliability and Effect...
The Impact of Test Ownership and Team Structure on the Reliability and Effect...The Impact of Test Ownership and Team Structure on the Reliability and Effect...
The Impact of Test Ownership and Team Structure on the Reliability and Effect...
Kim Herzig
 
Programming fundamentals lecture 1&2
Programming fundamentals lecture 1&2Programming fundamentals lecture 1&2
Programming fundamentals lecture 1&2
Raja Hamid
 

Mais procurados (19)

Improving Bug Tracking Systems
Improving Bug Tracking SystemsImproving Bug Tracking Systems
Improving Bug Tracking Systems
 
debugging - system software
debugging - system softwaredebugging - system software
debugging - system software
 
Stnotes doc 5
Stnotes doc 5Stnotes doc 5
Stnotes doc 5
 
Debugging
DebuggingDebugging
Debugging
 
Debugging with NetBeans IDE
Debugging with NetBeans IDEDebugging with NetBeans IDE
Debugging with NetBeans IDE
 
TAMUC LO 10
TAMUC LO 10TAMUC LO 10
TAMUC LO 10
 
Fundamental Programming Lect 1
Fundamental Programming Lect 1Fundamental Programming Lect 1
Fundamental Programming Lect 1
 
It's Not a Bug, It's a Feature — How Misclassification Impacts Bug Prediction
It's Not a Bug, It's a Feature — How Misclassification Impacts Bug PredictionIt's Not a Bug, It's a Feature — How Misclassification Impacts Bug Prediction
It's Not a Bug, It's a Feature — How Misclassification Impacts Bug Prediction
 
The Impact of Test Ownership and Team Structure on the Reliability and Effect...
The Impact of Test Ownership and Team Structure on the Reliability and Effect...The Impact of Test Ownership and Team Structure on the Reliability and Effect...
The Impact of Test Ownership and Team Structure on the Reliability and Effect...
 
PROBLEM SOLVING
PROBLEM SOLVINGPROBLEM SOLVING
PROBLEM SOLVING
 
Software Testing for Data Scientists
Software Testing for Data ScientistsSoftware Testing for Data Scientists
Software Testing for Data Scientists
 
Issre2014 test defectprediction
Issre2014 test defectpredictionIssre2014 test defectprediction
Issre2014 test defectprediction
 
Programming fundamentals lecture 1&2
Programming fundamentals lecture 1&2Programming fundamentals lecture 1&2
Programming fundamentals lecture 1&2
 
Software Testing and the R language
Software Testing and the R languageSoftware Testing and the R language
Software Testing and the R language
 
Java Code Review Checklist
Java Code Review ChecklistJava Code Review Checklist
Java Code Review Checklist
 
Fault tolerance
Fault toleranceFault tolerance
Fault tolerance
 
Qualidade de Software em zOS usando IBM Debug Tool e RDz
Qualidade de Software em zOS usando IBM Debug Tool e RDzQualidade de Software em zOS usando IBM Debug Tool e RDz
Qualidade de Software em zOS usando IBM Debug Tool e RDz
 
Software Fault Tolerance
Software Fault ToleranceSoftware Fault Tolerance
Software Fault Tolerance
 
Black box testing
Black box testingBlack box testing
Black box testing
 

Destaque (8)

"Social Media, a challenge which can be won" - SDA Bocconi 21apr10
"Social Media, a challenge which can be won" - SDA Bocconi 21apr10"Social Media, a challenge which can be won" - SDA Bocconi 21apr10
"Social Media, a challenge which can be won" - SDA Bocconi 21apr10
 
ch.1 edmond
ch.1 edmondch.1 edmond
ch.1 edmond
 
Building Community: Social Media for Multifamily
Building Community: Social Media for MultifamilyBuilding Community: Social Media for Multifamily
Building Community: Social Media for Multifamily
 
distance learning
distance learningdistance learning
distance learning
 
Unit 1 First Americans Student A 4
Unit 1 First Americans Student A 4Unit 1 First Americans Student A 4
Unit 1 First Americans Student A 4
 
‫Cancer
‫Cancer‫Cancer
‫Cancer
 
Production
ProductionProduction
Production
 
Edmonda U00a4
Edmonda U00a4Edmonda U00a4
Edmonda U00a4
 

Semelhante a Software Bugs A Software Architect Point Of View

VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdfVISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
NALANDACSCCENTRE
 
The "Evils" of Optimization
The "Evils" of OptimizationThe "Evils" of Optimization
The "Evils" of Optimization
BlackRabbitCoder
 
02. Fault Tolerance Pattern 위한 mindset
02. Fault Tolerance Pattern 위한 mindset02. Fault Tolerance Pattern 위한 mindset
02. Fault Tolerance Pattern 위한 mindset
eva
 
Software Engineering Methodologies
Software Engineering MethodologiesSoftware Engineering Methodologies
Software Engineering Methodologies
Nesrine Shokry
 
3Audit Software & Tools.pptx
3Audit Software & Tools.pptx3Audit Software & Tools.pptx
3Audit Software & Tools.pptx
jack952975
 
Code Review
Code ReviewCode Review
Code Review
Ravi Raj
 

Semelhante a Software Bugs A Software Architect Point Of View (20)

VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdfVISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
 
The "Evils" of Optimization
The "Evils" of OptimizationThe "Evils" of Optimization
The "Evils" of Optimization
 
02. Fault Tolerance Pattern 위한 mindset
02. Fault Tolerance Pattern 위한 mindset02. Fault Tolerance Pattern 위한 mindset
02. Fault Tolerance Pattern 위한 mindset
 
Modern Software Testing Techniques: A Practical Guide for Developers and Testers
Modern Software Testing Techniques: A Practical Guide for Developers and TestersModern Software Testing Techniques: A Practical Guide for Developers and Testers
Modern Software Testing Techniques: A Practical Guide for Developers and Testers
 
Application and Website Security -- Developer Edition: Introducing Security I...
Application and Website Security -- Developer Edition:Introducing Security I...Application and Website Security -- Developer Edition:Introducing Security I...
Application and Website Security -- Developer Edition: Introducing Security I...
 
Building of systems of automatic C/C++ code logging
Building of systems of automatic C/C++ code loggingBuilding of systems of automatic C/C++ code logging
Building of systems of automatic C/C++ code logging
 
Why test with flex unit
Why test with flex unitWhy test with flex unit
Why test with flex unit
 
Programming Fundamentals lecture 3
Programming Fundamentals lecture 3Programming Fundamentals lecture 3
Programming Fundamentals lecture 3
 
Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening
 
Defect Tracking Software Project Presentation
Defect Tracking Software Project PresentationDefect Tracking Software Project Presentation
Defect Tracking Software Project Presentation
 
Software Engineering Methodologies
Software Engineering MethodologiesSoftware Engineering Methodologies
Software Engineering Methodologies
 
debuggingSession.pptx
debuggingSession.pptxdebuggingSession.pptx
debuggingSession.pptx
 
Problems of testing 64-bit applications
Problems of testing 64-bit applicationsProblems of testing 64-bit applications
Problems of testing 64-bit applications
 
Workshop - The Little Pattern That Could.pdf
Workshop - The Little Pattern That Could.pdfWorkshop - The Little Pattern That Could.pdf
Workshop - The Little Pattern That Could.pdf
 
3Audit Software & Tools.pptx
3Audit Software & Tools.pptx3Audit Software & Tools.pptx
3Audit Software & Tools.pptx
 
Maturity of-code-mgmt-2016-04-06
Maturity of-code-mgmt-2016-04-06Maturity of-code-mgmt-2016-04-06
Maturity of-code-mgmt-2016-04-06
 
Software Development Standard Operating Procedure
Software Development Standard Operating Procedure Software Development Standard Operating Procedure
Software Development Standard Operating Procedure
 
Code Review
Code ReviewCode Review
Code Review
 
Ensuring code quality
Ensuring code qualityEnsuring code quality
Ensuring code quality
 
Manual testing interview questions
Manual testing interview questionsManual testing interview questions
Manual testing interview questions
 

Mais de Shahzad

Srs sso-version-1.2-stable version-0
Srs sso-version-1.2-stable version-0Srs sso-version-1.2-stable version-0
Srs sso-version-1.2-stable version-0
Shahzad
 
Srs sso-version-1.2-stable version
Srs sso-version-1.2-stable versionSrs sso-version-1.2-stable version
Srs sso-version-1.2-stable version
Shahzad
 
Software architecture to analyze licensing needs for pcms- pegasus cargo ma...
Software architecture   to analyze licensing needs for pcms- pegasus cargo ma...Software architecture   to analyze licensing needs for pcms- pegasus cargo ma...
Software architecture to analyze licensing needs for pcms- pegasus cargo ma...
Shahzad
 
Software architecture case study - why and why not sql server replication
Software architecture   case study - why and why not sql server replicationSoftware architecture   case study - why and why not sql server replication
Software architecture case study - why and why not sql server replication
Shahzad
 

Mais de Shahzad (20)

Srs sso-version-1.2-stable version-0
Srs sso-version-1.2-stable version-0Srs sso-version-1.2-stable version-0
Srs sso-version-1.2-stable version-0
 
Srs sso-version-1.2-stable version
Srs sso-version-1.2-stable versionSrs sso-version-1.2-stable version
Srs sso-version-1.2-stable version
 
Exploration note - none windows based authentication for WCF
Exploration note - none windows based authentication for WCFExploration note - none windows based authentication for WCF
Exploration note - none windows based authentication for WCF
 
To study pcms pegasus erp cargo management system-release-7 from architectu...
To study pcms   pegasus erp cargo management system-release-7 from architectu...To study pcms   pegasus erp cargo management system-release-7 from architectu...
To study pcms pegasus erp cargo management system-release-7 from architectu...
 
To study pcms pegasus erp cargo management system-release-6 from architectu...
To study pcms   pegasus erp cargo management system-release-6 from architectu...To study pcms   pegasus erp cargo management system-release-6 from architectu...
To study pcms pegasus erp cargo management system-release-6 from architectu...
 
Pakistan management
Pakistan managementPakistan management
Pakistan management
 
Corporate lessons
Corporate lessonsCorporate lessons
Corporate lessons
 
What is future of web with reference to html5 will it devalue current present...
What is future of web with reference to html5 will it devalue current present...What is future of web with reference to html5 will it devalue current present...
What is future of web with reference to html5 will it devalue current present...
 
Software architecture to analyze licensing needs for pcms- pegasus cargo ma...
Software architecture   to analyze licensing needs for pcms- pegasus cargo ma...Software architecture   to analyze licensing needs for pcms- pegasus cargo ma...
Software architecture to analyze licensing needs for pcms- pegasus cargo ma...
 
A cross referenced whitepaper on cloud computing
A cross referenced whitepaper on cloud computingA cross referenced whitepaper on cloud computing
A cross referenced whitepaper on cloud computing
 
Software architecture case study - why and why not sql server replication
Software architecture   case study - why and why not sql server replicationSoftware architecture   case study - why and why not sql server replication
Software architecture case study - why and why not sql server replication
 
Software Architecture New Features of Visual Studio 2010 / .Net 4.0 - Part 1...
Software Architecture New Features of Visual Studio 2010 / .Net 4.0  - Part 1...Software Architecture New Features of Visual Studio 2010 / .Net 4.0  - Part 1...
Software Architecture New Features of Visual Studio 2010 / .Net 4.0 - Part 1...
 
From Windows Presentation Foundation To Silverlight
From Windows Presentation Foundation To SilverlightFrom Windows Presentation Foundation To Silverlight
From Windows Presentation Foundation To Silverlight
 
To Study The Tips Tricks Guidelines Related To Performance Tuning For N Hib...
To Study The Tips Tricks  Guidelines Related To Performance Tuning For  N Hib...To Study The Tips Tricks  Guidelines Related To Performance Tuning For  N Hib...
To Study The Tips Tricks Guidelines Related To Performance Tuning For N Hib...
 
To Study E T L ( Extract, Transform, Load) Tools Specially S Q L Server I...
To Study  E T L ( Extract, Transform, Load) Tools Specially  S Q L  Server  I...To Study  E T L ( Extract, Transform, Load) Tools Specially  S Q L  Server  I...
To Study E T L ( Extract, Transform, Load) Tools Specially S Q L Server I...
 
To Study E T L ( Extract, Transform, Load) Tools Specially S Q L Server I...
To Study  E T L ( Extract, Transform, Load) Tools Specially  S Q L  Server  I...To Study  E T L ( Extract, Transform, Load) Tools Specially  S Q L  Server  I...
To Study E T L ( Extract, Transform, Load) Tools Specially S Q L Server I...
 
To Analyze Cargo Loading Optimization Algorithm
To Analyze Cargo Loading Optimization AlgorithmTo Analyze Cargo Loading Optimization Algorithm
To Analyze Cargo Loading Optimization Algorithm
 
Asp
AspAsp
Asp
 
Whitepaper To Study Filestream Option In Sql Server
Whitepaper To Study Filestream Option In Sql ServerWhitepaper To Study Filestream Option In Sql Server
Whitepaper To Study Filestream Option In Sql Server
 
White Paper On ConCurrency For PCMS Application Architecture
White Paper On ConCurrency For PCMS Application ArchitectureWhite Paper On ConCurrency For PCMS Application Architecture
White Paper On ConCurrency For PCMS Application Architecture
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Último (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Software Bugs A Software Architect Point Of View

  • 1. Software Bugs - A Software Architect point of view By: Shahzad Sarwar To: Development Team, Management Date: 28th Feb 2010
  • 2. Table of Content 3.1.Arithmetic bugs......................................................................................................3 3.2.Logic bugs..............................................................................................................3 3.3.Syntax bugs............................................................................................................3 .....................................................................................................................................3 3.4.Resource bugs........................................................................................................3 3.5.Co-programming bugs...........................................................................................4 3.6.Functional bugs......................................................................................................4 3.7.Teamworking bugs ................................................................................................4 Objective:  To Analysis reasons of bugs in PCMS, Pegasus Cargo Management System.  To study the nature and classification of bugs.  To suggest a line of action for reducing bugs in application.
  • 3. 1. Bugs in Software Development A software bug is the common term used to describe an error, flaw, mistake, failure, or fault in a computer program or system that produces an incorrect or unexpected result, or causes it to behave in unintended ways. 2. 20 Reasons for Bugs I. Lack of business domain. II. Lack of techno skills. III. Unfamiliarity with programming language IV. Unclear requirements V. Incorrect architecture VI. Incomplete design VII. Typos VIII. Inadequate understanding of interfaces IX. Inadequate understanding of standards (e.g. TCP/IP, ODBC, SQL, etc.) X. Poor documentation for legacy system XI. Design based on outdated requirements XII. Code written to outdated design XIII. Poor design for future expansion (e.g. hardwired constants, buried assumptions, etc.) XIV. Conflicting requirements XV. Laziness – the desire to use the easiest to implement solution. XVI. Bad fix of a previous problem XVII. Last minute changes/Lack of proper version control. XVIII. Lack of Unit testing by developers. XIX. Compromises made in req/design to meet delivery schedules. XX. Change: to requirements, infrastructure, tools etc., because it introduces the likelihood of all of the above to happen. 3. Common types of computer bugs 3.1. Arithmetic bugs  Division by zero  Arithmetic overflow or underflow  Loss of arithmetic precision due to rounding or numerically unstable algorithms 3.2. Logic bugs  Infinite loops and infinite recursion  Off by one error, counting one too many or too few when looping 3.3. Syntax bugs  Use of the wrong operator, such as performing assignment instead of equality test. In simple cases often warned by the compiler; in many languages, deliberately guarded against by language syntax 3.4. Resource bugs • Null pointer dereference • Using an uninitialized variable • Using an otherwise valid instruction on the wrong data type (see packed decimal/binary coded decimal) • Access violations
  • 4. Resource leaks, where a finite system resource such as memory or file handles are exhausted by repeated allocation without release. • Buffer overflow, in which a program tries to store data past the end of allocated storage. This may or may not lead to an access violation or storage violation. These bugs can form a security vulnerability. • Excessive recursion which though logically valid causes stack overflow 3.5. Co-programming bugs  Deadlock  Race condition  Concurrency errors in Critical sections, Mutual exclusions and other features of concurrent processing. Time-of-check-to-time-of-use (TOCTOU) is a form of unprotected critical section. 3.6. Functional bugs  Lack of functionality  Misunstanding of requirement specfications. 3.7. Teamworking bugs  Unpropagated updates; e.g. programmer changes "myAdd" but forgets to change "mySubtract", which uses the same algorithm. These errors are mitigated by the Don't Repeat Yourself philosophy.  Comments out of date or incorrect: many programmers assume the comments accurately describe the code  Differences between documentation and the actual product 4. Tips For Avoiding Bugs:  Read Bugs reasons identfied in section 1daily and act accordingly.  Be a Good Debugger  Adopt a Bug Management and Tracking Methodology.  Code Reviews. Four eyes see more than two. Pair programming is a good technique.  Using log files or live logging during development and production usage is an important and useful technique to identify bugs.  Use automated error and exception reporting techniques.  Unit and regression testing is must.  Test-driven development (TDD) is a software development technique that relies on the repetition of a very short development cycle: First the developer writes a failing automated test case that defines a desired improvement or new function, then produces code to pass that test and finally refactors the new code to acceptable standards. 5. Conclusion:  All developers must read the reasons, classification and tips for bugs once a week and try to act accordingly.  Following a TDD approach to software development can help a lot for developers and software development team in general for solving common problems in testing / bugs management.
  • 5. Bug frees software is a myth. There is a trade off between bug free software in first strike and increase in cost of software development. If we try to create software bug free then software development cost is increased considerable.  Lets calculate DRE for PCMS. Defect Removal Effectiveness: (or efficiency as used by some writers) is calculated: DRE = Defects removed during a development phase Defects latent in the product at that phase x 100% Example: The Defect Removal Effectiveness for each of the phases would be as follows: Requirements DRE = 10 / (10+3+0+2+1) x 100% = 63% Design DRE = (3+18) / (3+0+2+1+18+4+5+2) x 100% = 60% Coding DRE = (0+4+26) / (0+2+1+4+5+2+26+8+7) x 100% = 55% Testing DRE = (2+5+8) / (2+1+5+2+8+7) x 100% = 60% Development DRE = (Pre-release Defect) / (Total Defects) x 100% = (10+3+2+18+4+5+26+8) / (10+3+2+1+18+4+5+2+26+8+7) x 100 = 88% The longer a defect exists in a product before it is detected, the more expensive it is to fix.  So, Happy Bug fixing for PCMS. 6. References: http://www.westfallteam.com/Papers/defect_removal_effectiveness.pdf http://en.wikipedia.org http://www.google.com