Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Software Development in Practice

Software Development in Practice

Insights into some aspects of every-day software development for computer science students.

Tom Hombergs

January 09, 2019
Tweet

More Decks by Tom Hombergs

Other Decks in Technology

Transcript

  1. 01.01.2019 Software Development in Practice 2 Who‘s Talking?  Tom

    Hombergs  Team Lead & Software Architect at adesso AG  Java Blogger at reflectoring.io  Editor at baeldung.com  Organizer of Java User Group Dortmund [email protected] github.com/thombergs
  2. V-Model 01.01.2019 Software Development in Practice 6 Requirements Specification System

    Specification Module Specification Software Architecture Coding Unit Tests Integration Tests System Integration Acceptance Tests
  3. Best Practices – Process Model 01.01.2019 Software Development in Practice

    8  Start small.  Adapt the process model to your Needs.  Get feedback early & regularly.
  4. Use Cases 01.01.2019 Software Development in Practice 10 Compose Blog

    Post Publish Blog Post Update Blog Post Publish on Social Media Subscribe Author Reader
  5. Work Breakdown Structure 01.01.2019 11 Software Development in Practice Blog

    Project Compose Blog Post Display WYSIWYG-Editor Save Blog Post to Database Add Blog Entity to Database Publish Blog Post Display WYSIWYG-Editor Save Blog Post to Database Add „Published“ Field to Blog Entity Update Blog Post Display WYSIWYG-Editor Save Updated Blog Post to Database Add „Updated“ Field to Blog Entity Social Media Integration Publish to Facebook Publish to Twitter Subscribe Send E-Mail on new Blog Post Send E-Mail on updated Blog Post
  6. Slicing of Tasks 01.01.2019 12 Software Development in Practice Blog

    Project Compose Blog Post Display WYSIWYG-Editor Save Blog Post to Database Add Blog Entity to Database Publish Blog Post Display WYSIWYG-Editor Save Blog Post to Database Add „Published“ Field to Blog Entity Update Blog Post Display WYSIWYG-Editor Save Updated Blog Post to Database Add „Updated“ Field to Blog Entity Social Media Integration Publish to Facebook Publish to Twitter Subscribe Send E-Mail on new Blog Post Send E-Mail on updated Blog Post - The Wrong Way
  7. Slicing of Tasks – The Right Way 01.01.2019 13 Software

    Development in Practice Blog Project Compose Blog Post Display WYSIWYG-Editor Save Blog Post to Database Add Blog Entity to Database Publish Blog Post Display WYSIWYG-Editor Save Blog Post to Database Add „Published“ Field to Blog Entity Update Blog Post Display WYSIWYG-Editor Save Updated Blog Post to Database Add „Updated“ Field to Blog Entity Social Media Integration Publish to Facebook Publish to Twitter Subscribe Send E-Mail on new Blog Post Send E-Mail on updated Blog Post
  8. Best Practices – Task Management 01.01.2019 Software Development in Practice

    14  Use a tool!  Adapt the tool to fit your needs.  Break features into tasks at the latest possible moment.  Slice tasks vertically.
  9. Where to put Source Code? 01.01.2019 Software Development in Practice

    17 Local Hard Drive Code Network Drive Code Local Hard Drive Code Local Hard Drive Code Editing Conflicts!
  10. Version Control 01.01.2019 Software Development in Practice 18 Local Hard

    Drive Code Version Control System Code Local Hard Drive Code Local Hard Drive Code
  11. Branching 01.01.2019 Software Development in Practice 19 First Commit Start

    of a feature branch. These changes must not go live in version 1.0! Version 1.0 goes live! Hotfix for a bad bug. The bug disrupted work in the feature branch, so it got merged. Version 2.0 with the new feature goes live Code Review before merging
  12. Best Practices – Version Control 01.01.2019 Software Development in Practice

    21  Use version control!  Provide meaningful commit messages.  Don‘t keep unnecessary code.
  13. Document Requirements 01.01.2019 Software Development in Practice 24  Document

    Goals  Document Use Cases  Document Requirements Requirements further specify Use Cases Use Cases contribute to a Goal Pohl und Rupp, Basiswissen Requirements Engineering, dpunkt Verlag, 2015
  14. Document Architecture – The arc42 Template 01.01.2019 Software Development in

    Practice 28 1. Introduction & Goals 2. Constraints 3. Context 4. Solution Strategy 5. Building Blocks View 6. Runtime View 7. Deployment View 8. Concepts / Patterns 9. Design Decisions 10.Quality Scenarios 11.Technical Risks 12.Glossary www.arc42.de
  15. Document Architecture – The arc42 Template 01.01.2019 Software Development in

    Practice 29 1. Introduction & Goals 2. Constraints 3. Context 4. Solution Strategy 5. Building Blocks View 6. Runtime View 7. Deployment View 8. Concepts / Patterns 9. Design Decisions 10.Quality Scenarios 11.Technical Risks 12.Glossary www.arc42.de
  16. Document Architecture – Example Patterns 01.01.2019 Software Development in Practice

    32  Transactions  Logging  Exception-Handling  Unit-Testing  Integration-Testing  Security  Coding Conventions  Internationalization  Scalability  High Availability  Buildmanagement  Database Access  Migration  Session Handling  User Interface  … www.arc42.de
  17. Best Practices – Documentation 01.01.2019 Software Development in Practice 33

     Document as little as necessary.  Treat documentation as you would source code.  Use a markup language.
  18. Best Practices – Documentation 01.01.2019 Software Development in Practice 34

     Document specifically for each stakeholder group.  Update documentation when a task is done, not when the project is done.  Documentation is a team effort.
  19. 01.01.2019 Software Development in Practice 38 Testing Pyramid Unit Tests

    Integration Tests End to End Tests Manual Tests
  20. 01.01.2019 Software Development in Practice 39 Test Coverage != Test

    Quality @Test public void testAbsoluteSum(){ Calculator calculator = new Calculator(); assertThat(calculator.abslouteSum(-1,2)).isEqualTo(3); } public class Calculator{ public int absoluteSum(int a, int b){ return (a < 0 ? -a : -a) + (b < 0 ? -b : b); } } 100% Line Coverage, 1 Bug missed
  21. 01.01.2019 Software Development in Practice 40 Test Coverage != Test

    Quality @Test public void testAbsoluteSum(){ Calculator calculator = new Calculator(); assertThat(calculator.absoluteSum(-1,2)).isEqualTo(3); assertThat(calculator.absoluteSum(1,2)).isEqualTo(3); assertThat(calculator.absoluteSum(-1,-2)).isEqualTo(3); } public class Calculator{ public int absoluteSum(int a, int b){ return (a < 0 ? -a : -a) + (b < 0 ? -b : b); } } 100% Line Coverage, bug is flushed out
  22. Best Practices – Testing 01.01.2019 Software Development in Practice 41

     Write unit tests!  Write tests when a task is done, not when the project is done.  Don‘t aim for meaningless test coverage percentage.  Review one another‘s Ccode.  Manually test one another‘s features.
  23. 01.01.2019 Software Development in Practice 44 Modular Software Development Blog

    Post Management Visitor Statistics Social Media Integration E-Mail Notification
  24. Best Practices – Continuous Integration 01.01.2019 Software Development in Practice

    46  Separate concerns in separate modules.  Automate your build process.  Run unit tests and integration tests in the build process.  Build regularly.