One piece

One request changes one thing that can be checked.

A piece is small not out of modesty. You can read it in full, run it with one test and roll it back if it is bad. "Add validation and logs and metrics and refactor the neighbouring package" is four tasks. The model will glue them into one diff, and you will not know which part broke the build.

A good size is often one function, one test or one fix to an error message. If a second job comes up along the way, write it down and do not mix it into the same request. A list of loose ends is more honest than a heroic three-screen answer.

The order of the pieces is yours too. First whatever gives an observable result: a red test turns green, bad input gets a clear error. Then names, then the neighbouring clutter. Models like to start by renaming the whole file. You like to start with behaviour. Say so in the request.

If you cannot explain a piece in a few lines, it is still too thick. Cut it before sending. Cutting takes less time than reviewing a random architecture.

Practice

  1. What size to ask for

    What should you ask for in one message?

    • One function with an example
    • The whole refactoring of a module
    • A new application architecture
    • Every task on the list at once
  2. A thick request

    One message asks for validation, logging and renaming a package all at once. Is that one piece? Answer yes or no.

  3. Where to start

    Select the sensible order.

    • First the behaviour a test can see
    • First rename the whole file
    • Fix the error message as a separate step
    • Switch the framework right away