Blog, COLDSURF

Thoughts on Contributing to Open Source

The Importance of Breaking Down PRs

I've contributed to open source projects before. One of my tasks involved migrating a codebase, specifically working on gradually implementing the new architecture coming from React Native. Since it was a code migration task, there were a lot of git diff changes.

Successful PR Contribution

Unsuccessful PR Contribution

Ā 
Contributing to open source also requires approval from reviewers within the repository. The maintainers tend to provide very sharp, critical reviews. Therefore, if you want to merge your contribution, it's essential that your intentions behind the PR are clearly understood by the reviewer.
I believe a PR is a tool to persuade others through code. In other words, in order to persuade, I need to ensure that my intentions are understood, which can be quite challenging in open source. If the PR is too large, it seems like breaking it down into smaller parts makes it easier to get the message across.
Large tasks, when reviewed over time, sometimes reveal areas that can be abstracted. As a result, it's possible to break the work down further. I think the ideal PR size is one where the reviewer can easily understand the changes in a functional context or where reverting is clean and straightforward.
Ā 
ā† Go home