Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 2.07 KB

refactoring_suggestions_are_a_compliment.md

File metadata and controls

28 lines (18 loc) · 2.07 KB

Refactoring suggestions are a compliment

Bob is a software developer. He implements a lot of nice new features. Alice, his colleague, occasionally gives suggestions on how to refactor the code - sometimes in a formal code review, sometimes casually, sometimes as actual commits in a merge request she opens.

Bob interprets her ideas as a compliment because deep in his heart he knows that the intentions of Alice are noble and that she is making these suggestions because

  • she thinks the stuff Bob is working on is important enough to receive such care. She believes the code will be used and extended for quite some time in the future, and that investing her time in it is worth it.
  • she wants to reduce the amount of work on Bob and others in the long-term. They will be more efficient (and happier) maintaining a clean code base compared to something less SOLID.
  • she is positive that Bob is interested in learning and improving his skills. She cares about his personal growth as a developer.

Bob constantly reminds himself of these conditions. Bob is awesome. Think as Bob thinks.

Alice facilitates Bob's mindset by

  • conveying that these refactorings are not urgent but still important and by keeping them at a reasonable size.
  • being aware that it is usually easier to recognize smells (opportunities for improvement) if one looks at code from a distance compared to being knee-deep in the details.
  • striving towards an agreement of two equals by explaining her points and asking questions to understand Bob's way of thinking. She does not try to use authority.
  • being open to learning why Bob's original way might be better than her suggestion.

Alice talks more in terms of "we" instead of "you" and "I". Alice is awesome. Do as Alice does.

Carlos, their CTO, is happy about this friendly culture, which

  • helps to reduce the bus factor thanks to shared knowledge.
  • allows everyone to grow and results in low employee churn.
  • makes the team more productive and lets them create quality software.

Carlos fosters this culture by being a good role model. Carlos is awesome. Lead as Carlos leads.