139

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

you are viewing a single comment's thread
view the rest of the comments
[-] djnattyp@lemmy.world 1 points 1 month 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?

this post was submitted on 10 Aug 2024
139 points (94.8% liked)

Programming

16971 readers
267 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS