Published on

  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. Chapter 1 OO Software Development Summary and additional points by Rick Mercer
  2. 2. Software Challenges <ul><ul><li>Specification may be incomplete </li></ul></ul><ul><ul><li>Software product is expected to be used for for a long time </li></ul></ul><ul><ul><li>Ever more complex systems, high expectations </li></ul></ul><ul><ul><li>Requirements change </li></ul></ul>
  3. 3. Waterfall Life Cycle <ul><ul><li>Software go through several stages called the life cycle </li></ul></ul><ul><ul><li>Waterfall model: popular way to organizing activities </li></ul></ul>
  4. 4. Waterfall Model
  5. 5. Waterfall Model (con.) <ul><ul><li>Waterfall has some severe problems. </li></ul></ul><ul><ul><ul><li>The team has to be almost clairvoyant little room for error. </li></ul></ul></ul><ul><ul><ul><li>places the high risk and difficult elements towards the end </li></ul></ul></ul><ul><ul><li>Craig Larman's book [1] provides proof that waterfall has proved to be a terrible way to develop software. </li></ul></ul><ul><ul><ul><li>In one study, 87% of all projects failed. </li></ul></ul></ul><ul><ul><ul><li>The waterfall process was the &quot;single largest contributing factor for failure, being cited in 82% of the projects as the number one problem.&quot; </li></ul></ul></ul><ul><ul><ul><ul><li>Rick: tell a joke [1] Agile and Iterative Development: a Manager's Guide, Addison-Wesley Professional, 2003 </li></ul></ul></ul></ul>
  6. 6. Iterative Software Development <ul><ul><li>An iteration deals with a small part of the system </li></ul></ul>
  7. 7. Rational Unified Process <ul><ul><li>Practices of RUP </li></ul></ul><ul><ul><ul><li>Develop iteratively </li></ul></ul></ul><ul><ul><ul><li>Manage changing requirements </li></ul></ul></ul><ul><ul><ul><li>Use components such as Java classes </li></ul></ul></ul><ul><ul><ul><li>Visually Model with UML </li></ul></ul></ul><ul><ul><ul><li>Continuously test </li></ul></ul></ul><ul><ul><li>RUP builds models rather than paper documents </li></ul></ul><ul><ul><ul><ul><li>http://www-306.ibm.com/software/awdtools/rup/ </li></ul></ul></ul></ul>
  8. 8. Agile <ul><ul><li>Agile Manfesto See http://agilemanifesto.org/ </li></ul></ul><ul><ul><li>Started with Scrum and XP, around 1995 </li></ul></ul><ul><ul><li>Has developed into a Chinese menu AGILE 05 </li></ul></ul><ul><ul><li>I choose this practices for Project 1, Iteration 1: </li></ul></ul><ul><ul><ul><li>pair programming </li></ul></ul></ul><ul><ul><ul><li>test driven development </li></ul></ul></ul><ul><ul><ul><li>short releases </li></ul></ul></ul><ul><ul><ul><li>sustainable pace </li></ul></ul></ul>
  9. 9. By Rick Mercer with help from Kent Beck and Scott Ambler Test Driven Development:
  10. 10. <ul><ul><li>What is TDD? </li></ul></ul><ul><ul><li>Tests as documentation </li></ul></ul><ul><ul><li>Tests as a way to verify your code works </li></ul></ul><ul><ul><li>Goup Actvity: </li></ul></ul><ul><ul><ul><li>Write a test plan to think about the behavior of objects in the system </li></ul></ul></ul>Outline
  11. 11. Test Driven Development (TDD) <ul><ul><li>&quot;TDD is emerging as one of the most successful developer productivity enhancing techniques to be recently discovered. The three-step: write test, write code, refactor – is a dance many of us are enjoying&quot; </li></ul></ul><ul><ul><ul><li>Eric Vautier, David Vydra </li></ul></ul></ul><ul><ul><li>&quot;TDD is the Gem of XP&quot; </li></ul></ul><ul><ul><ul><li>Kent Beck </li></ul></ul></ul>
  12. 12. TDD: What is it? <ul><ul><li>TDD turns traditional development around. </li></ul></ul><ul><ul><ul><li>Write test code before the methods </li></ul></ul></ul><ul><ul><ul><li>Do so in very small steps </li></ul></ul></ul><ul><ul><ul><li>Refuse to add any code until a test exists for it </li></ul></ul></ul><ul><ul><li>You can run the test anytime </li></ul></ul><ul><ul><ul><li>And you should do so quite often </li></ul></ul></ul>
  13. 13. Simple, yet hard to do <ul><ul><li>When you first try TDD, it requires great discipline because it is easy to “slip” and write methods without first writing a new test </li></ul></ul><ul><ul><li>Pair programming helps you to stay on track </li></ul></ul><ul><ul><ul><li>Williams and Kessler, 2002 </li></ul></ul></ul>
  14. 14. Comments, Documentation? <ul><ul><li>Most programmers don’t read documentation </li></ul></ul><ul><ul><ul><li>instead they prefer to work with the code. </li></ul></ul></ul><ul><ul><li>Programmers often look for sample code that sends messages to instances of a class </li></ul></ul><ul><ul><ul><li>Well-written unit tests can provide such a working specification of your code </li></ul></ul></ul><ul><ul><ul><ul><li>more docs are necessary </li></ul></ul></ul></ul><ul><ul><ul><li>Unit tests effectively become a significant portion of your technical documentation </li></ul></ul></ul>
  15. 15. Testing Framework <ul><ul><li>An underlying assumption of TDD is that you have a unit-testing framework </li></ul></ul><ul><ul><li>Agile software developers often use the xUnit family of open source tools, such or JUnit </li></ul></ul><ul><ul><li>Without a unit-testing framework, TDD is virtually impossible. </li></ul></ul>
  16. 16. TDD Helps Design <ul><ul><li>TDD makes you think about what you want or need before you write the code </li></ul></ul><ul><ul><ul><li>pick class and method names </li></ul></ul></ul><ul><ul><ul><li>decide what arguments might be needed </li></ul></ul></ul><ul><ul><ul><li>decide return types </li></ul></ul></ul><ul><ul><ul><li>write the class, constructors, instance variables, and methods to make the what you want work </li></ul></ul></ul><ul><ul><li>The unit tests are there to verify the code works and to notify of errors when refactoring </li></ul></ul>
  17. 17. Demo <ul><ul><li>TDD a bit of JukeboxAccount </li></ul></ul>