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.

Bc7aa56e8e004e4984e954e5e4cb2bc0?s=128

Tom Hombergs

January 09, 2019
Tweet

More Decks by Tom Hombergs

Other Decks in Technology

Transcript

  1. adesso lectures Software Development in Practice

  2. 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 hombergs@adesso.de github.com/thombergs
  3. 01.01.2019 Software Development in Practice 3 What we‘re trying to

    avoid…
  4. 01.01.2019 4 Process Models

  5. Waterfall 01.01.2019 Software Development in Practice 5 Requirements Analysis Design

    Development Test Operations
  6. 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
  7. Scrum 01.01.2019 Software Development in Practice 7

  8. 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.
  9. 01.01.2019 9 Task Management

  10. 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
  11. 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
  12. 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
  13. 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
  14. 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.
  15. 01.01.2019 Software Development in Practice 15 Github Demo – Task

    Management
  16. 01.01.2019 16 Version Control

  17. 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!
  18. 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
  19. 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
  20. Advanced Branching 01.01.2019 Software Development in Practice 20 http://nvie.com/posts/a-successful- git-branching-model/

  21. Best Practices – Version Control 01.01.2019 Software Development in Practice

    21  Use version control!  Provide meaningful commit messages.  Don‘t keep unnecessary code.
  22. 01.01.2019 Software Development in Practice 22 Github Demo – Version

    Control
  23. 01.01.2019 23 Documentation

  24. 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
  25. Document a Goal 01.01.2019 Software Development in Practice 25

  26. Document a Use Case 01.01.2019 Software Development in Practice 26

  27. Document a Single Requirement 01.01.2019 Software Development in Practice 27

  28. 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
  29. 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
  30. Document Architecture – Context 01.01.2019 Software Development in Practice 30

  31. Document Architecture – Building Blocks 01.01.2019 Software Development in Practice

    31
  32. 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
  33. 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.
  34. 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.
  35. 01.01.2019 Software Development in Practice 35 Github Demo - Documentation

  36. 01.01.2019 36

  37. 01.01.2019 37 Testing

  38. 01.01.2019 Software Development in Practice 38 Testing Pyramid Unit Tests

    Integration Tests End to End Tests Manual Tests
  39. 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
  40. 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
  41. 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.
  42. 01.01.2019 42

  43. 01.01.2019 43 Continuous Integration

  44. 01.01.2019 Software Development in Practice 44 Modular Software Development Blog

    Post Management Visitor Statistics Social Media Integration E-Mail Notification
  45. 01.01.2019 Erfolgsfaktoren in der Softwareentwicklung 45 CI Pipeline

  46. 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.
  47. 01.01.2019 Software Development in Practice 47 Github Demo – Continuous

    Integration