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 runn...
Knowledge isnt stable    Changes after a meeting with client.    Change in the business rule.    Changes because test s...
Common assumption    Maintenance begins when application    released.    Maintenance means fixing bugs and    enhancing ...
What maintenance means    Its not a discrete activity but a    routine part of development process.    Code should be ch...
Tip     Tip 11                  There are no final decisions
Maintenance is a very difficulttask if your code is not        DRY
Tip    Tip 12                   Dont repeat yourself
Duplication    Imposed – It’s the environment            Diff languages, code,       documentation and comments.    Ina...
Duplication    Impatient – Lazy developers                Why not copy paste the existing code          or class. It nee...
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 an...
Tip     Tip 14                     Eliminate effects between unrelated              things
Estimating    Anything can be estimated even with    missing information only if you are    comfortable with estimation....
Estimating    Understand whats being asked.    Build a model of the system.    Break the model into component.    Give...
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.       ...
Debugging    Do not describe bug as “Object of terror”.    Computer systems do what you tell them to    do, not necessar...
Tip    Tip 17                Fix the problem, Not the Blame
Debugging mindset The easiest person to deceive is ones self   - Edward Bulwer
Debugging mindset    Turn off your defences you use each    day to protect your ego.    Turn out any project pressure. ...
Tip    Tip 18                Dont panic
Debugging Strategy    Try to reproduce it.    Get the full and detailed information from    bug reporter.    If you are...
Tip     Tip 19                  “Select” isnt Broken     Tip 20                  Don’t assume it – Prove it
Thank You!
Upcoming SlideShare
Loading in …5
×

Pragmatic programmer 2

14,742 views

Published on

This is in continuation with my last presentation about pragmatic programmer. In this I will be discussing the next 10 tips of the book Pramatic Programmer. I hope you will enjoy

Published in: Education
2 Comments
2 Likes
Statistics
Notes
No Downloads
Views
Total views
14,742
On SlideShare
0
From Embeds
0
Number of Embeds
44
Actions
Shares
0
Downloads
13
Comments
2
Likes
2
Embeds 0
No embeds

No notes for slide

Pragmatic programmer 2

  1. 1. Pragmatic Programmer - 2 By -: Uday Pratap Singh
  2. 2. Agenda DRY Duplication Orthogonality Estimation Debugging
  3. 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. 4. Knowledge isnt stable Changes after a meeting with client. Change in the business rule. Changes because test showed the problem with our knowledge.
  5. 5. Common assumption Maintenance begins when application released. Maintenance means fixing bugs and enhancing features.
  6. 6. What maintenance means Its not a discrete activity but a routine part of development process. Code should be changed with the change in our knowledge.
  7. 7. Tip Tip 11  There are no final decisions
  8. 8. Maintenance is a very difficulttask if your code is not DRY
  9. 9. Tip Tip 12  Dont repeat yourself
  10. 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. 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. 12. Tip Tip 13  Make it easy to Reuse
  13. 13. Orthogonality Two or more things are orthogonal if changes in one do not affect any other.
  14. 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. 15. Tip Tip 14  Eliminate effects between unrelated things
  16. 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. 17. Estimating Understand whats being asked. Build a model of the system. Break the model into component. Give points to each component. Keep track of your estimation.
  18. 18. Tip Tip 15  Estimate to avoid surprises Tip 16  Iterate the schedule with code
  19. 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. 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 doesnt matter the bug is your fault or someone elses. It is still your problem.
  21. 21. Tip Tip 17  Fix the problem, Not the Blame
  22. 22. Debugging mindset The easiest person to deceive is ones self - Edward Bulwer
  23. 23. Debugging mindset Turn off your defences you use each day to protect your ego. Turn out any project pressure. Get yourself comfortable. Dont say “it cant happen” because quite clearly it can, and has.
  24. 24. Tip Tip 18  Dont panic
  25. 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. 26. Tip Tip 19  “Select” isnt Broken Tip 20  Don’t assume it – Prove it
  27. 27. Thank You!

×