Keep it consistent

Consistency in a codebase helps keep things clear and predictable. Using four different patterns or libraries for accomplishing a single task just adds mental overhead. Strive to consolidate these things where it doesn't increase complexity and act with consistency as a team.

Examples

  • You have a personal style preference, but join a team where the code preferences are different, don't make a big deal out of it and prefer consistency over personal subjective preference.
  • You are building a combobox experience on one page and discover two instances of this each using separate libraries. Make some time to understand the use cases for each and find a single library that can satisfy all cases.