Saturday, October 11, 2025

Refactoring.

 A function should ask for the MINIMUM it needs.

Fewer dependencies = easier to change.



Fowler's advice:

"Most of the time you should ignore performance during refactoring. Finish refactoring first, then do performance tuning afterwards."


"Making the implicit explicit"


Instead of memorizing rules:

  • ❌ "Always use fewer parameters" (dogma)
  • ✅ "Fewer parameters reduce coupling, making change easier" (principle)