It might be easier to split a cake but it’s not impossible!
I encourage doing as small PRs as possible. Preferably under 200 lines of code. But how is this possible? If you have a big feature or so? It may contain loads of code.
That’s completely fine. We don’t need to finish an entire story in a single PR, rather, any task is good to split down and review incrementally. I try to do this with other things than code as well. If I’m making a proposal or something for example. I first write a rough draft I check with someone involved before I continue. I can do this in several stages if it’s a big thing.
Consider a PR for being able to add address details (in a monolith).
But we can actually split this quite nicely. And if we do so at the start by defining the contracts, we can also have several people working nicely in parallel on these things. I’ve found that setting contracts and pushing interfaces/mocks as the first step really helps smooth integrations because everyone is working towards the same contracts.
Another example of breaking down maybe one big landing page or so:
Now granted. This is way easier said than done 😅 but still, it’s worthwhile striving for! Keeping it smaller makes it easier to review and revert if things start going sideways. If this is all new functionality, it’s usually easy to hide/show the entire thing once it’s done.
For modifying existing APIs and UIs, well, it’s harder. But in these days we should aim to extend our APIs as far as is possible without breaking changes and in doing that we can split it in a similar way.
Thanks for reading, catch you next time!