Encouraging Smaller PRs

Best Practices for Ruby on Rails and JS Developers

Patrick Karsh
3 min readMay 28, 2024

In the fast-paced world of software development, maintaining code quality and efficiency is crucial. One effective way to achieve this is by encouraging smaller pull requests (PRs). Smaller PRs can lead to quicker reviews, faster feedback, and smoother integrations, ultimately enhancing the productivity of your development team. Here’s how you can promote this practice among your Ruby on Rails and JavaScript developers.

Nice small PR

Set Clear Guidelines

Define the Ideal Size: Establish a clear definition of what constitutes a “small” PR in terms of lines of code or the scope of changes. For example, aim for PRs that involve fewer than 200 lines of code or that implement a single feature or bug fix.

Communicate Benefits: Educate your team about the advantages of smaller PRs, such as easier reviews, quicker feedback, reduced merge conflicts, and more manageable deployments. Emphasize that smaller PRs are a win-win for both the authors and reviewers.

Break Down Tasks

Story Decomposition: Break down user stories or tasks into smaller, manageable chunks. For instance, instead of tackling a complete user authentication system in one go, divide it into subtasks like setting up the…

--

--

Patrick Karsh

NYC-based Ruby on Rails and Javascript Engineer leveraging AI to explore Engineering. https://linktr.ee/patrickkarsh