Seeing that Uncle Bob is making a new version of Clean Code I decided to try and find this article about the original.

  • djnattyp@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    4 months ago

    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?