Quality Douglas Crockford Yahoo! http://www.crockford.com/codecamp/quality.ppt
The Software Crisis The topic dominated the computer industry trade press for about a decade.
The Software Crisis <ul><li>Over budget </li></ul><ul><li>Over time </li></ul><ul><li>Unreliable </li></ul><ul><li>Require...
Software Crisis <ul><li>Year 45 </li></ul><ul><li>It is old news, so no one talks about it </li></ul><ul><li>In other news...
Craft v Engineering
Computer Science has not taught us how to manage software projects
Software Construction <ul><li>In some ways like any other sort of construction. </li></ul><ul><li>In some ways radically d...
The Nature of Software <ul><li>Software is powerful and malleable </li></ul><ul><li>That is its blessing </li></ul><ul><li...
Programming is Difficult Software is the most complicated stuff that humans make
Lack of metrics Measure of quality or completeness
Lines of Code <ul><li>Not an indicator of quality </li></ul><ul><li>Not an effective measure of completeness </li></ul><ul...
Programmers are optimists They wouldn't be able to do this work if they were not
Programmers do not understand how they  spend their time <ul><li>They think they mostly are typing programs </li></ul><ul>...
Programmers do not understand how they  spend their time <ul><li>Programmers tend to be skeptical of process improvements ...
Programming is  a social activity Solo projects are  the exception
Cost of Innovation <ul><li>Doing what has been done before </li></ul><ul><ul><li>v </li></ul></ul><ul><li>Doing what has n...
Legacy <ul><li>In other industries, the wealth of practice and tradition </li></ul><ul><li>In software, past accomplishmen...
Leaps <ul><li>Software is not governed by Moore's Law </li></ul><ul><li>Software is governed by Murphy's Law </li></ul><ul...
Leaps <ul><li>Leaps make it possible to implement projects of greater complexity. </li></ul><ul><li>Adoption of leaping so...
Leaps <ul><li>Plugboards </li></ul>
Leaps
Leaps <ul><li>Plugboards </li></ul><ul><li>Symbolic Assembly Language </li></ul>
Leaps <ul><li>Plugboards </li></ul><ul><li>Symbolic Assembly Language </li></ul><ul><li>High Level Languages </li></ul>
Leaps <ul><li>Plugboards </li></ul><ul><li>Symbolic Assembly Language </li></ul><ul><li>High Level Languages </li></ul><ul...
Leaps <ul><li>Plugboards </li></ul><ul><li>Symbolic Assembly Language </li></ul><ul><li>High Level Languages </li></ul><ul...
Object Oriented Programming <ul><li>1967 Simula </li></ul><ul><li>1972 Kay begins Smalltalk </li></ul><ul><li>1980 Smallta...
Leaps <ul><li>Plugboards </li></ul><ul><li>Symbolic Assembly Language </li></ul><ul><li>High Level Languages </li></ul><ul...
Failed Leaps <ul><li>Artificial Intelligence </li></ul><ul><li>Fifth Generation Languages </li></ul><ul><li>Computer Aided...
Software does not have enough self awareness  to be afraid of bugs. That's why it works  as well as it does.
Bugs <ul><li>Mr Edison, I was informed, had been up the two previous nights discovering  a bug  in his phonograph. </li></...
Grace Hopper's Bug
Snake Oil Silver Bullets
Mythical Man Month (1975) <ul><li>Fredrick Brooks </li></ul><ul><li>&quot;Adding manpower to a late software project makes...
Literate Programming <ul><li>Donald Knuth </li></ul><ul><li>Programs are designed to be read. </li></ul><ul><li>The progra...
Incrementalism
Beta Perpetually unfinished
Winchester House
Winchester House
Winchester House
Application Triad <ul><li>Skill </li></ul><ul><ul><li>Training and experience </li></ul></ul><ul><li>Technology </li></ul>...
 
Mr Blandings Builds His Dream House (1948) <ul><li>Best movie ever about project management </li></ul><ul><li>Blandings's ...
Feature Cost <ul><li>Development Time </li></ul><ul><li>Deployment Cost </li></ul><ul><li>Maintenance Cost (bloat, cruft) ...
Code Value <ul><li>A significant fraction of our valuation is the state of our codebase. </li></ul><ul><li>A low quality c...
Code Quality <ul><li>Microview: Coding Conventions </li></ul><ul><li>Macroview: Program Architecture </li></ul>
The simplest thing we can do to enhance the value of our codebase is to make our programs readable.
Distinguish Invocations <ul><li>return(value); </li></ul><ul><li>if(blah) </li></ul><ul><li>foo (wah) </li></ul><ul><li>fu...
Programs are a medium of intentional communication <ul><li>Communicating detailed instructions with the machine </li></ul>...
Good architecture is necessary to give programs enough structure to be able to grow large without collapsing into a puddle...
Changing a correct program into another correct program.
Cruft Software Scar Tissue
Causes of Cruft <ul><li>Premature optimization </li></ul><ul><li>Inexperience </li></ul><ul><li>Misread source </li></ul><...
Bloat Software Obesity
Insecurity Marginal security
Good secure programming is good programming.
As cruft accumulates, complexity grows,  progess slows. Eventually, the codebase itself becomes a huge source of friction
Refactoring <ul><li>The process of code refinement. </li></ul><ul><li>Correction of formatting. </li></ul><ul><li>Insertio...
Plant and harvest your crops for six years, but let the land rest  and lie fallow  during the seventh year Exodus 23:10-11
Sometimes the best course is to start over
The Pain of the Crash Loss of a week's work, a day's work, an hour's work, is unbearable.
The illusion of completion &quot;It's in the can.&quot;
An experienced team  can cross that ground again very quickly. Focus must be on simplicity to avoid the second system effe...
Have regular code readings. <ul><li>Don’t wait until release to do code reviews. </li></ul><ul><li>Do team code reading re...
Have regular code readings. <ul><li>Frequent. </li></ul><ul><li>Helpful. </li></ul><ul><li>Respectful. </li></ul>
Conclusion <ul><li>Quality First. Quality Last. </li></ul><ul><li>Readable Code. Code Reading. </li></ul><ul><li>Invest in...
Upcoming SlideShare
Loading in …5
×

Quality - Douglas Crockford

1,516 views

Published on

Presentation on Quality by Douglas Crockford.

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,516
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Quality - Douglas Crockford

  1. 1. Quality Douglas Crockford Yahoo! http://www.crockford.com/codecamp/quality.ppt
  2. 2. The Software Crisis The topic dominated the computer industry trade press for about a decade.
  3. 3. The Software Crisis <ul><li>Over budget </li></ul><ul><li>Over time </li></ul><ul><li>Unreliable </li></ul><ul><li>Requirements not fully met </li></ul><ul><li>Unmaintainable </li></ul><ul><li>Failure </li></ul><ul><li>Insecure (New!) </li></ul>
  4. 4. Software Crisis <ul><li>Year 45 </li></ul><ul><li>It is old news, so no one talks about it </li></ul><ul><li>In other news, the Sun will exhaust its supply of Hydrogen </li></ul>
  5. 5. Craft v Engineering
  6. 6. Computer Science has not taught us how to manage software projects
  7. 7. Software Construction <ul><li>In some ways like any other sort of construction. </li></ul><ul><li>In some ways radically different. </li></ul>
  8. 8. The Nature of Software <ul><li>Software is powerful and malleable </li></ul><ul><li>That is its blessing </li></ul><ul><li>That is its curse </li></ul>
  9. 9. Programming is Difficult Software is the most complicated stuff that humans make
  10. 10. Lack of metrics Measure of quality or completeness
  11. 11. Lines of Code <ul><li>Not an indicator of quality </li></ul><ul><li>Not an effective measure of completeness </li></ul><ul><li>Estimation is difficult </li></ul>
  12. 12. Programmers are optimists They wouldn't be able to do this work if they were not
  13. 13. Programmers do not understand how they spend their time <ul><li>They think they mostly are typing programs </li></ul><ul><li>Mostly they are in meetings or technical conversations </li></ul><ul><li>Or staring at the screen saying &quot;My God. What have I done?&quot; </li></ul>
  14. 14. Programmers do not understand how they spend their time <ul><li>Programmers tend to be skeptical of process improvements that might require more keystrokes. </li></ul><ul><li>First Rule of Optimization: Optimize the process that is taking the most time. </li></ul>
  15. 15. Programming is a social activity Solo projects are the exception
  16. 16. Cost of Innovation <ul><li>Doing what has been done before </li></ul><ul><ul><li>v </li></ul></ul><ul><li>Doing what has not been done before </li></ul>
  17. 17. Legacy <ul><li>In other industries, the wealth of practice and tradition </li></ul><ul><li>In software, past accomplishments are considered a liability </li></ul><ul><li>The age at which programs become legacy is getting younger and younger </li></ul><ul><li>Some programs become legacy before they are finished </li></ul>
  18. 18. Leaps <ul><li>Software is not governed by Moore's Law </li></ul><ul><li>Software is governed by Murphy's Law </li></ul><ul><li>Software leaps tend to come at 20 year intervals, not 2 year intervals </li></ul><ul><li>Cycle of software generation closely related to cycle of human generation. </li></ul>
  19. 19. Leaps <ul><li>Leaps make it possible to implement projects of greater complexity. </li></ul><ul><li>Adoption of leaping software technologies tends to be very slow. </li></ul><ul><li>Controversy. </li></ul><ul><li>Reluctance. </li></ul>
  20. 20. Leaps <ul><li>Plugboards </li></ul>
  21. 21. Leaps
  22. 22. Leaps <ul><li>Plugboards </li></ul><ul><li>Symbolic Assembly Language </li></ul>
  23. 23. Leaps <ul><li>Plugboards </li></ul><ul><li>Symbolic Assembly Language </li></ul><ul><li>High Level Languages </li></ul>
  24. 24. Leaps <ul><li>Plugboards </li></ul><ul><li>Symbolic Assembly Language </li></ul><ul><li>High Level Languages </li></ul><ul><li>Structured Programming </li></ul>
  25. 25. Leaps <ul><li>Plugboards </li></ul><ul><li>Symbolic Assembly Language </li></ul><ul><li>High Level Languages </li></ul><ul><li>Structured Programming </li></ul><ul><li>Object Oriented Programming </li></ul>
  26. 26. Object Oriented Programming <ul><li>1967 Simula </li></ul><ul><li>1972 Kay begins Smalltalk </li></ul><ul><li>1980 Smalltalk released </li></ul><ul><li>1985 C++ Programming Language </li></ul><ul><li>1995 The Java Programming Language </li></ul><ul><li>2004 PHP 5 </li></ul>
  27. 27. Leaps <ul><li>Plugboards </li></ul><ul><li>Symbolic Assembly Language </li></ul><ul><li>High Level Languages </li></ul><ul><li>Structured Programming </li></ul><ul><li>Object Oriented Programming </li></ul><ul><li>Distributed Programming </li></ul>
  28. 28. Failed Leaps <ul><li>Artificial Intelligence </li></ul><ul><li>Fifth Generation Languages </li></ul><ul><li>Computer Aided Software Engineering </li></ul><ul><li>Subjective-oriented, etc. </li></ul>
  29. 29. Software does not have enough self awareness to be afraid of bugs. That's why it works as well as it does.
  30. 30. Bugs <ul><li>Mr Edison, I was informed, had been up the two previous nights discovering a bug in his phonograph. </li></ul><ul><ul><li>Pall Mall Gazette , 1889-03-11 </li></ul></ul>
  31. 31. Grace Hopper's Bug
  32. 32. Snake Oil Silver Bullets
  33. 33. Mythical Man Month (1975) <ul><li>Fredrick Brooks </li></ul><ul><li>&quot;Adding manpower to a late software project makes it later.&quot; </li></ul><ul><li>Second System Effect </li></ul><ul><li>Prototyping (software is like waffles) </li></ul><ul><li>&quot;A project becomes a year late one day at a time.&quot; </li></ul>
  34. 34. Literate Programming <ul><li>Donald Knuth </li></ul><ul><li>Programs are designed to be read. </li></ul><ul><li>The program is the specification and documentation. </li></ul>
  35. 35. Incrementalism
  36. 36. Beta Perpetually unfinished
  37. 37. Winchester House
  38. 38. Winchester House
  39. 39. Winchester House
  40. 40. Application Triad <ul><li>Skill </li></ul><ul><ul><li>Training and experience </li></ul></ul><ul><li>Technology </li></ul><ul><ul><li>Work with technology providers and standards bodies </li></ul></ul><ul><li>Requirements </li></ul><ul><ul><li>Better understanding of the impact of requirements determination and crisis </li></ul></ul>
  41. 42. Mr Blandings Builds His Dream House (1948) <ul><li>Best movie ever about project management </li></ul><ul><li>Blandings's problems: </li></ul><ul><li>Lack of knowledge of technology </li></ul><ul><li>Poor control over requirements </li></ul>
  42. 43. Feature Cost <ul><li>Development Time </li></ul><ul><li>Deployment Cost </li></ul><ul><li>Maintenance Cost (bloat, cruft) </li></ul><ul><li>Download Time </li></ul><ul><li>User Confusion/Training </li></ul><ul><li>Bug Delivery </li></ul>
  43. 44. Code Value <ul><li>A significant fraction of our valuation is the state of our codebase. </li></ul><ul><li>A low quality codebase is a liability. </li></ul>
  44. 45. Code Quality <ul><li>Microview: Coding Conventions </li></ul><ul><li>Macroview: Program Architecture </li></ul>
  45. 46. The simplest thing we can do to enhance the value of our codebase is to make our programs readable.
  46. 47. Distinguish Invocations <ul><li>return(value); </li></ul><ul><li>if(blah) </li></ul><ul><li>foo (wah) </li></ul><ul><li>function(){} </li></ul><ul><li>return value; </li></ul><ul><li>if (blah) </li></ul><ul><li>foo(wah) </li></ul><ul><li>function () {} </li></ul>
  47. 48. Programs are a medium of intentional communication <ul><li>Communicating detailed instructions with the machine </li></ul><ul><li>Communicating with your development community </li></ul><ul><li>Communicating with yourself </li></ul>
  48. 49. Good architecture is necessary to give programs enough structure to be able to grow large without collapsing into a puddle of confusion
  49. 50. Changing a correct program into another correct program.
  50. 51. Cruft Software Scar Tissue
  51. 52. Causes of Cruft <ul><li>Premature optimization </li></ul><ul><li>Inexperience </li></ul><ul><li>Misread source </li></ul><ul><li>Feature enhancement </li></ul><ul><li>Death March </li></ul>
  52. 53. Bloat Software Obesity
  53. 54. Insecurity Marginal security
  54. 55. Good secure programming is good programming.
  55. 56. As cruft accumulates, complexity grows, progess slows. Eventually, the codebase itself becomes a huge source of friction
  56. 57. Refactoring <ul><li>The process of code refinement. </li></ul><ul><li>Correction of formatting. </li></ul><ul><li>Insertion of documentation. </li></ul><ul><li>Removal of cruft and bloat. </li></ul><ul><li>Restructuring. </li></ul>
  57. 58. Plant and harvest your crops for six years, but let the land rest and lie fallow during the seventh year Exodus 23:10-11
  58. 59. Sometimes the best course is to start over
  59. 60. The Pain of the Crash Loss of a week's work, a day's work, an hour's work, is unbearable.
  60. 61. The illusion of completion &quot;It's in the can.&quot;
  61. 62. An experienced team can cross that ground again very quickly. Focus must be on simplicity to avoid the second system effect.
  62. 63. Have regular code readings. <ul><li>Don’t wait until release to do code reviews. </li></ul><ul><li>Do team code reading regularly during development. </li></ul><ul><li>Problems can be discovered early. </li></ul><ul><li>Good techniques can be shared early. </li></ul><ul><li>Experienced developers can lead by example. </li></ul><ul><li>Novice developers learn from the group. </li></ul>
  63. 64. Have regular code readings. <ul><li>Frequent. </li></ul><ul><li>Helpful. </li></ul><ul><li>Respectful. </li></ul>
  64. 65. Conclusion <ul><li>Quality First. Quality Last. </li></ul><ul><li>Readable Code. Code Reading. </li></ul><ul><li>Invest in the quality of your code base. </li></ul><ul><li>Invest in your programmers and managers. </li></ul><ul><li>Quality is the most important feature. </li></ul>

×