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

Effortless Software Development

Effortless Software Development

Software development can be an eternal struggle, or it can be code that pretty much writes itself. In this talk, we’ll look at how simple acceptance tests and a few diagrams help us dive right into the code, which we in turn outline using DDD, This allows us to have a clean and testable design without worrying about implementation details. Code can be then implemented without developers worrying about stepping on each others’ toes, while still be confident that everything will work once put together. Discover how my team can build features faster than the client can sign them off.

Anna Filina
PRO

September 28, 2023
Tweet

More Decks by Anna Filina

Other Decks in Programming

Transcript

  1. Effortless
    Software
    Development
    NERDEARLA 2023 | BUENOS AIRES
    @[email protected]

    View Slide

  2. Waiting for user tests
    Merge conflicts
    Adding missing requirements
    Waiting on someone else
    Someone you never heard of
    disagrees with requirements
    Redesign
    Writing code
    Figuring out requirements
    50-page document
    Approving the document
    20 levels of inheritance
    800-line methods
    6 levels of nested IFs
    What does
    array2 contain?
    How to unit-test it?
    Is this null right now?

    View Slide

  3. Anna Filina
    ‣ Coding since 1997.
    ‣ PHP, Java, C#, etc.
    ‣ Legacy archaeology.
    ‣ Test automation.
    ‣ Talks and workshops.
    ‣ YouTube videos.
    ‣ Filina Consulting.

    View Slide

  4. 1/3
    Better
    Specifications

    View Slide

  5. Getting an answer
    Dev
    Requirements User testing
    50-page
    document

    View Slide

  6. Question 2
    Missing use cases / redesign More testing
    er
    User testing

    View Slide

  7. Recommendation
    ‣ Get a product owner.
    ‣ With direct & quick access.
    ‣ Should not have other roles in the org.
    ‣ Should not delegate questions.
    ‣ Communicate requirements using acceptance tests.

    View Slide

  8. View Slide

  9. View Slide

  10. Requirements
    Collection of use cases to implement.

    View Slide

  11. I select a
    membership option
    I submit valid credit
    card details
    I should see a
    payment receipt
    Requirements
    Use cases
    (scenarios)

    View Slide

  12. Scenario
    Dev
    Requirements User testing
    Use cases
    (scenarios)

    View Slide

  13. 2/3
    Iterative Design

    View Slide

  14. Design Dev
    Approval
    Mistake in
    design

    View Slide

  15. The map is not the territory.
    — Alfred Korzybski

    View Slide

  16. Recommendation
    ‣ Sequence or activity diagram.
    ‣ Minimal code to validate design.

    View Slide

  17. API
    UI
    User
    Select membership
    Order
    Create order {product_code}
    Payment screen
    Enter payment details
    Receipt {confirmation_num}
    Finalize order {card}
    Receipt

    View Slide

  18. 3/3
    More Cooks
    in the Kitchen

    View Slide

  19. Recommendation
    ‣ Team programming: validate the design + shared vision.
    ‣ Split the work: implementation + tests.

    View Slide

  20. API
    UI
    User
    Select membership
    Order
    Create order {product_code}
    Payment screen
    Enter payment details
    Receipt {confirmation_num}
    Finalize order {card}
    Receipt

    View Slide

  21. View Slide

  22. View Slide

  23. View Slide

  24. View Slide

  25. View Slide

  26. View Slide

  27. Team Programming
    ‣ Handler: 13 lines.
    ‣ Interfaces: 8 lines.
    ‣ DTOs: 46 lines.
    ‣ Total: 67
    ‣ Shared vision.

    View Slide

  28. Split the Work
    ‣ Test handler.
    ‣ Implement interfaces + tests.
    ‣ Implement validation of DTOs + tests.
    ‣ Implement steps of acceptance tests.

    View Slide

  29. View Slide

  30. Acceptance Tests
    ‣ Both for backend and frontend.
    ‣ Just for the backend.

    View Slide

  31. HTTP request 1
    HTTP request 2
    Assertion

    View Slide

  32. Mission
    Accomplished

    View Slide

  33. Lessons Learned
    ‣ Code is living documentation.
    ‣ Don't try to figure everything out upfront (unknowns).
    ‣ Mistakes are normal (fail fast).
    ‣ Work together more often.

    View Slide

  34. Further Topics
    ‣ Domain-driven design.
    ‣ Test-driven development.
    ‣ Acceptance tests.
    ‣ SOLID principles.
    ‣ Clean code.
    ‣ Extreme programming.
    ‣ Agile principles (not “agile” framework).

    View Slide

  35. View Slide