• 0 Posts
  • 4 Comments
Joined 1 year ago
cake
Cake day: June 11th, 2023

help-circle

  • This is also against clean code examples, because Uncle Bob seems to be allergic against function arguments and return values.

    I think this is your strawman version of “Clean Code”… not anything that’s actually in it…

    I “like” some parts of your example more than the previous one, but a lot of this depends on where exactly in the whole program this method is - if this method is on a “Salesman” class - does it make sense to pass the “Contract” in? If there’s a Contract class available, why doesn’t the “calculateCommission” method exist on it?