==========================
== Timoteo Ponce's blog ==
==========================

What's in a Pull Request

pull-request programming best-practices

For a while I’ve been involved in programming, mostly writing and testing the code, either by myself and with other people. But a few years ago my main responsability switched from programming to review other people’s code since my role changed from content producer to gatekeeper.

Initially I had my reservations, I didn’t want to do it, it was simpler to keep programming and producing daily value. But after a while, it started to click in me, by reading code I would need to understand what they are trying to do, and I would be learning all the time and getting more knowledge over the system. That sealed the deal.

So, I’ve performed that role for almost 6 months, it was interesting, I’ve learned a lot from my peers and from myself, I’ve developed a sense for code that’s useful and code that while it might work, it’s perhaps not practical for a project.

Here a summary of my findings:

  • Any pull request should be as small as possible, too many changes are confusing
  • Only change things that matter, formatting and other things can be done later
  • Readable code over clever code
  • When in doubt, comment and document the shit out of it
  • Define a style and keep it
  • Add a HowToTest guide
  • Add a small summary of the changes

In conclusion, it’s good to switch roles from time to time, we get used to an environment, role or responsibilities quite often and that provides us the chance to change our perspective.