| home | | talks | | blogs | | posts | | react | | graphql | | learning | | hiring | | oss | | testing |

tips for better pull requests

February 05, 2019

Any fool can write code that a computer can understand. Good programmers write code that humans can understand. — Refactoring: Improving the Design of Existing Code, 1999

Something we should think about every day, especially when asking someone to review your PR!

  1. Make the PR easy to navigate. Mention the core changes of your PR and which files to look at.

  2. Write better description, this is where you describe why this PR exists.

  3. A working .gif is super helpful.

  4. Make sure that you’ve run prettier or whatever linting tool is in for the season.

  5. Try to follow the best practices of the framework or language.

  6. Keep the code consistent.

  7. Super Important: Add meaningful comments to your code.

  8. Tests: Write tests which test the functionality of your code and not just do coverage. I have found that good tests are the best documentation as it is always updated with functionality change.