SlideShare a Scribd company logo
1 of 27
Pragmatic Programmer - 2




               By -: Uday Pratap Singh
Agenda

   DRY
   Duplication
   Orthogonality
   Estimation
   Debugging
What we do ........

    Collect , organize, maintain
    knowledge.

    Documents knowledge.

    Make it come alive in running code.

    Test what have been done with our
    knowledge.
Knowledge isn't stable

    Changes after a meeting with client.

    Change in the business rule.

    Changes because test showed the
    problem with our knowledge.
Common assumption


    Maintenance begins when application
    released.


    Maintenance means fixing bugs and
    enhancing features.
What maintenance means


    It's not a discrete activity but a
    routine part of development process.


    Code should be changed with the
    change in our knowledge.
Tip




     Tip 11
       
           There are no final decisions
Maintenance is a very difficult
task if your code is not



        DRY
Tip



    Tip 12
      
             Don't repeat yourself
Duplication

    Imposed – It’s the environment
     
       Diff languages, code,
       documentation and comments.


    Inadvertent – Developers didn’t
    realize
    
        Truck, Driver and DeliveryRoute
        (Distribution industry)
Duplication

    Impatient – Lazy developers
      
          Why not copy paste the existing code
          or class. It needs discipline and
          willingness to save pain later


    Inter-developer duplication
      
          Encourage active and frequent
          communication between developers
Tip



    Tip 13
      
             Make it easy to Reuse
Orthogonality



    Two or more things are orthogonal if
    changes in one do not affect any other.
Benefits of orthogonality

    Forces the developer to write
    independent and small code.

    Reduces development time and testing

    Reusable code.

    Frequency of change in small code is
    relatively less than a Bigger piece of
    code.

    Easier to slice out diseased sections of
    code.
Tip



     Tip 14
       
              Eliminate effects between unrelated
              things
Estimating

    Anything can be estimated even with
    missing information only if you are
    comfortable with estimation.

    Everyone can estimate its just some
    are more accurate than other.

    Estimation is always contextual.

    Estimating the value of pie differs in
    different context.

    Ask someone who has already done it.
Estimating

    Understand what's being asked.

    Build a model of the system.

    Break the model into component.

    Give points to each component.

    Keep track of your estimation.
Tip


    Tip 15
      
          Estimate to avoid surprises




    Tip 16
      
          Iterate the schedule with code
Debugging
 It is a painful thing to look at your
 own trouble and know that you
 yourself and no one else has made it.
            - Sophocles
Debugging

    Do not describe bug as “Object of terror”.

    Computer systems do what you tell them to
    do, not necessarily what you want them to do.

    No one writes a perfect software.

    Debugging is just a problem solving, do not
    make it a emotional subject.

    Do not spend time and energy laying blame on
    who created the bug.

    It doesn't matter the bug is your fault or
    someone else's. It is still your problem.
Tip



    Tip 17
      
          Fix the problem, Not the Blame
Debugging mindset


 The easiest person to deceive is one's
 self
   - Edward Bulwer
Debugging mindset

    Turn off your defences you use each
    day to protect your ego.

    Turn out any project pressure.

    Get yourself comfortable.

    Don't say “it cant happen” because
    quite clearly it can, and has.
Tip



    Tip 18
      
          Don't panic
Debugging Strategy

    Try to reproduce it.

    Get the full and detailed information from
    bug reporter.

    If you are lost try to explain it to someone
    else.

    The bug might be because of third party tool
    but it should not be your first thought.

    If your small change breaks the system than
    its most likely the small change responsible
    for it no matter how farfetched it seems to
    be.
Tip


     Tip 19
       
           “Select” isn't Broken


     Tip 20
       
           Don’t assume it – Prove it
Thank You!

More Related Content

What's hot

TDD and Unit Testing in Golang
TDD and Unit Testing in GolangTDD and Unit Testing in Golang
TDD and Unit Testing in GolangSofian Hadiwijaya
 
Carnegie Mellon MS PM Internships 2020
Carnegie Mellon MS PM Internships 2020Carnegie Mellon MS PM Internships 2020
Carnegie Mellon MS PM Internships 2020Lewis Lin 🦊
 
AI and ChatGPT in Online Education
AI and ChatGPT in Online Education AI and ChatGPT in Online Education
AI and ChatGPT in Online Education D2L Barry
 
Poo1 aula 1 - java - história e introdução
Poo1   aula 1 - java -  história e introduçãoPoo1   aula 1 - java -  história e introdução
Poo1 aula 1 - java - história e introduçãoDenis Sobrenome
 
BDD não é Automação de Testes
BDD não é Automação de TestesBDD não é Automação de Testes
BDD não é Automação de TestesElias Nogueira
 
Generative AI and Student Writing.pptx
Generative AI and Student Writing.pptxGenerative AI and Student Writing.pptx
Generative AI and Student Writing.pptxMike Sharples
 
The Rise of the LLMs - How I Learned to Stop Worrying & Love the GPT!
The Rise of the LLMs - How I Learned to Stop Worrying & Love the GPT!The Rise of the LLMs - How I Learned to Stop Worrying & Love the GPT!
The Rise of the LLMs - How I Learned to Stop Worrying & Love the GPT!taozen
 
개발이 테스트를 만났을 때(Shift left testing)
개발이 테스트를 만났을 때(Shift left testing)개발이 테스트를 만났을 때(Shift left testing)
개발이 테스트를 만났을 때(Shift left testing)SangIn Choung
 
How to use the database Academic Search Complete
How to use the database Academic Search CompleteHow to use the database Academic Search Complete
How to use the database Academic Search CompleteJustineWhite6
 
Unleashing the Google Bard Discover the Revolutionary New Tool How does it Co...
Unleashing the Google Bard Discover the Revolutionary New Tool How does it Co...Unleashing the Google Bard Discover the Revolutionary New Tool How does it Co...
Unleashing the Google Bard Discover the Revolutionary New Tool How does it Co...i-engage
 

What's hot (13)

TDD and Unit Testing in Golang
TDD and Unit Testing in GolangTDD and Unit Testing in Golang
TDD and Unit Testing in Golang
 
Carnegie Mellon MS PM Internships 2020
Carnegie Mellon MS PM Internships 2020Carnegie Mellon MS PM Internships 2020
Carnegie Mellon MS PM Internships 2020
 
AI and ChatGPT in Online Education
AI and ChatGPT in Online Education AI and ChatGPT in Online Education
AI and ChatGPT in Online Education
 
Poo1 aula 1 - java - história e introdução
Poo1   aula 1 - java -  história e introduçãoPoo1   aula 1 - java -  história e introdução
Poo1 aula 1 - java - história e introdução
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
BDD não é Automação de Testes
BDD não é Automação de TestesBDD não é Automação de Testes
BDD não é Automação de Testes
 
Mobility testing
Mobility testingMobility testing
Mobility testing
 
Generative AI and Student Writing.pptx
Generative AI and Student Writing.pptxGenerative AI and Student Writing.pptx
Generative AI and Student Writing.pptx
 
The Rise of the LLMs - How I Learned to Stop Worrying & Love the GPT!
The Rise of the LLMs - How I Learned to Stop Worrying & Love the GPT!The Rise of the LLMs - How I Learned to Stop Worrying & Love the GPT!
The Rise of the LLMs - How I Learned to Stop Worrying & Love the GPT!
 
개발이 테스트를 만났을 때(Shift left testing)
개발이 테스트를 만났을 때(Shift left testing)개발이 테스트를 만났을 때(Shift left testing)
개발이 테스트를 만났을 때(Shift left testing)
 
How to use the database Academic Search Complete
How to use the database Academic Search CompleteHow to use the database Academic Search Complete
How to use the database Academic Search Complete
 
Unleashing the Google Bard Discover the Revolutionary New Tool How does it Co...
Unleashing the Google Bard Discover the Revolutionary New Tool How does it Co...Unleashing the Google Bard Discover the Revolutionary New Tool How does it Co...
Unleashing the Google Bard Discover the Revolutionary New Tool How does it Co...
 
Introducing MLOps.pdf
Introducing MLOps.pdfIntroducing MLOps.pdf
Introducing MLOps.pdf
 

Similar to Pragmatic programmer 2

30% faster coder on-boarding when you have a code cookbook
30% faster coder on-boarding when you have a code cookbook30% faster coder on-boarding when you have a code cookbook
30% faster coder on-boarding when you have a code cookbookGabriel Paunescu 🤖
 
Linux Commands, C, C++, Java and Python Exercises For Beginners
Linux Commands, C, C++, Java and Python Exercises For BeginnersLinux Commands, C, C++, Java and Python Exercises For Beginners
Linux Commands, C, C++, Java and Python Exercises For BeginnersManjunath.R -
 
Structured Software Design
Structured Software DesignStructured Software Design
Structured Software DesignGiorgio Zoppi
 
C, C++, Java, Python, PHP, JavaScript and Linux For Beginners
C, C++, Java, Python, PHP, JavaScript and Linux For BeginnersC, C++, Java, Python, PHP, JavaScript and Linux For Beginners
C, C++, Java, Python, PHP, JavaScript and Linux For BeginnersManjunath.R -
 
Are You a SOLID Coder?
Are You a SOLID Coder?Are You a SOLID Coder?
Are You a SOLID Coder?Steve Green
 
What every developer can learn from startups
What every developer can learn from startupsWhat every developer can learn from startups
What every developer can learn from startupsOleg Podsechin
 
How have we developed product without bugs
How have we developed product without bugsHow have we developed product without bugs
How have we developed product without bugsSigma Software
 
5. ch 4-principles that guide practice
5. ch 4-principles that guide practice5. ch 4-principles that guide practice
5. ch 4-principles that guide practiceDelowar hossain
 
Software Development Essential Skills
Software Development Essential SkillsSoftware Development Essential Skills
Software Development Essential SkillsJohn Choi
 
16 Practical Insights from Designing Software
16 Practical Insights from Designing Software16 Practical Insights from Designing Software
16 Practical Insights from Designing SoftwareKok Chiann
 
Originate - Think In Hours Not Sprints
Originate - Think In Hours Not SprintsOriginate - Think In Hours Not Sprints
Originate - Think In Hours Not SprintsRob Meadows
 
Startups & the Product Management Perspective
Startups & the Product Management PerspectiveStartups & the Product Management Perspective
Startups & the Product Management PerspectiveAmarpreet Kalkat
 
UX Prototyping (UXiD) - Slide by Anton Chandra and Bahni Mahariasha
UX Prototyping (UXiD) - Slide by Anton Chandra and Bahni MahariashaUX Prototyping (UXiD) - Slide by Anton Chandra and Bahni Mahariasha
UX Prototyping (UXiD) - Slide by Anton Chandra and Bahni MahariashaAnton Chandra
 
Continuous integration
Continuous integrationContinuous integration
Continuous integrationBoris Dominic
 
Cinci ug-january2011-anti-patterns
Cinci ug-january2011-anti-patternsCinci ug-january2011-anti-patterns
Cinci ug-january2011-anti-patternsSteven Smith
 
Developing on large scale applications
Developing on large scale applicationsDeveloping on large scale applications
Developing on large scale applicationsAdrian IORGU
 
Daily Habits Of Highly Agile Developers
Daily Habits Of Highly Agile DevelopersDaily Habits Of Highly Agile Developers
Daily Habits Of Highly Agile DevelopersNitin Bhide
 

Similar to Pragmatic programmer 2 (20)

30% faster coder on-boarding when you have a code cookbook
30% faster coder on-boarding when you have a code cookbook30% faster coder on-boarding when you have a code cookbook
30% faster coder on-boarding when you have a code cookbook
 
Best pratice
Best praticeBest pratice
Best pratice
 
Linux Commands, C, C++, Java and Python Exercises For Beginners
Linux Commands, C, C++, Java and Python Exercises For BeginnersLinux Commands, C, C++, Java and Python Exercises For Beginners
Linux Commands, C, C++, Java and Python Exercises For Beginners
 
Structured Software Design
Structured Software DesignStructured Software Design
Structured Software Design
 
C, C++, Java, Python, PHP, JavaScript and Linux For Beginners
C, C++, Java, Python, PHP, JavaScript and Linux For BeginnersC, C++, Java, Python, PHP, JavaScript and Linux For Beginners
C, C++, Java, Python, PHP, JavaScript and Linux For Beginners
 
Are You a SOLID Coder?
Are You a SOLID Coder?Are You a SOLID Coder?
Are You a SOLID Coder?
 
What every developer can learn from startups
What every developer can learn from startupsWhat every developer can learn from startups
What every developer can learn from startups
 
How have we developed product without bugs
How have we developed product without bugsHow have we developed product without bugs
How have we developed product without bugs
 
Preocupações Desenvolvedor Ágil
Preocupações Desenvolvedor ÁgilPreocupações Desenvolvedor Ágil
Preocupações Desenvolvedor Ágil
 
5. ch 4-principles that guide practice
5. ch 4-principles that guide practice5. ch 4-principles that guide practice
5. ch 4-principles that guide practice
 
Software Development Essential Skills
Software Development Essential SkillsSoftware Development Essential Skills
Software Development Essential Skills
 
16 Practical Insights from Designing Software
16 Practical Insights from Designing Software16 Practical Insights from Designing Software
16 Practical Insights from Designing Software
 
Originate - Think In Hours Not Sprints
Originate - Think In Hours Not SprintsOriginate - Think In Hours Not Sprints
Originate - Think In Hours Not Sprints
 
Startups & the Product Management Perspective
Startups & the Product Management PerspectiveStartups & the Product Management Perspective
Startups & the Product Management Perspective
 
UX Prototyping (UXiD) - Slide by Anton Chandra and Bahni Mahariasha
UX Prototyping (UXiD) - Slide by Anton Chandra and Bahni MahariashaUX Prototyping (UXiD) - Slide by Anton Chandra and Bahni Mahariasha
UX Prototyping (UXiD) - Slide by Anton Chandra and Bahni Mahariasha
 
While You Are Coding
While You Are CodingWhile You Are Coding
While You Are Coding
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Cinci ug-january2011-anti-patterns
Cinci ug-january2011-anti-patternsCinci ug-january2011-anti-patterns
Cinci ug-january2011-anti-patterns
 
Developing on large scale applications
Developing on large scale applicationsDeveloping on large scale applications
Developing on large scale applications
 
Daily Habits Of Highly Agile Developers
Daily Habits Of Highly Agile DevelopersDaily Habits Of Highly Agile Developers
Daily Habits Of Highly Agile Developers
 

Recently uploaded

Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 

Recently uploaded (20)

Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 

Pragmatic programmer 2

  • 1. Pragmatic Programmer - 2 By -: Uday Pratap Singh
  • 2. Agenda  DRY  Duplication  Orthogonality  Estimation  Debugging
  • 3. What we do ........  Collect , organize, maintain knowledge.  Documents knowledge.  Make it come alive in running code.  Test what have been done with our knowledge.
  • 4. Knowledge isn't stable  Changes after a meeting with client.  Change in the business rule.  Changes because test showed the problem with our knowledge.
  • 5. Common assumption  Maintenance begins when application released.  Maintenance means fixing bugs and enhancing features.
  • 6. What maintenance means  It's not a discrete activity but a routine part of development process.  Code should be changed with the change in our knowledge.
  • 7. Tip  Tip 11  There are no final decisions
  • 8. Maintenance is a very difficult task if your code is not DRY
  • 9. Tip  Tip 12  Don't repeat yourself
  • 10. Duplication  Imposed – It’s the environment  Diff languages, code, documentation and comments.  Inadvertent – Developers didn’t realize  Truck, Driver and DeliveryRoute (Distribution industry)
  • 11. Duplication  Impatient – Lazy developers  Why not copy paste the existing code or class. It needs discipline and willingness to save pain later  Inter-developer duplication  Encourage active and frequent communication between developers
  • 12. Tip  Tip 13  Make it easy to Reuse
  • 13. Orthogonality  Two or more things are orthogonal if changes in one do not affect any other.
  • 14. Benefits of orthogonality  Forces the developer to write independent and small code.  Reduces development time and testing  Reusable code.  Frequency of change in small code is relatively less than a Bigger piece of code.  Easier to slice out diseased sections of code.
  • 15. Tip  Tip 14  Eliminate effects between unrelated things
  • 16. Estimating  Anything can be estimated even with missing information only if you are comfortable with estimation.  Everyone can estimate its just some are more accurate than other.  Estimation is always contextual.  Estimating the value of pie differs in different context.  Ask someone who has already done it.
  • 17. Estimating  Understand what's being asked.  Build a model of the system.  Break the model into component.  Give points to each component.  Keep track of your estimation.
  • 18. Tip  Tip 15  Estimate to avoid surprises  Tip 16  Iterate the schedule with code
  • 19. Debugging It is a painful thing to look at your own trouble and know that you yourself and no one else has made it. - Sophocles
  • 20. Debugging  Do not describe bug as “Object of terror”.  Computer systems do what you tell them to do, not necessarily what you want them to do.  No one writes a perfect software.  Debugging is just a problem solving, do not make it a emotional subject.  Do not spend time and energy laying blame on who created the bug.  It doesn't matter the bug is your fault or someone else's. It is still your problem.
  • 21. Tip  Tip 17  Fix the problem, Not the Blame
  • 22. Debugging mindset The easiest person to deceive is one's self - Edward Bulwer
  • 23. Debugging mindset  Turn off your defences you use each day to protect your ego.  Turn out any project pressure.  Get yourself comfortable.  Don't say “it cant happen” because quite clearly it can, and has.
  • 24. Tip  Tip 18  Don't panic
  • 25. Debugging Strategy  Try to reproduce it.  Get the full and detailed information from bug reporter.  If you are lost try to explain it to someone else.  The bug might be because of third party tool but it should not be your first thought.  If your small change breaks the system than its most likely the small change responsible for it no matter how farfetched it seems to be.
  • 26. Tip  Tip 19  “Select” isn't Broken  Tip 20  Don’t assume it – Prove it