[-] djnattyp@lemmy.world 3 points 1 week ago

Google for "replace conditional with polymorphism".

Just checked and it is in "Clean Code" - Chaper 17; Section G23 "Prefer Polymorphism to if/else or switch/case".

[-] djnattyp@lemmy.world 4 points 1 month ago

Parquet is a storage format; graphQL is a query language/transmission strategy.

[-] 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?

[-] djnattyp@lemmy.world 2 points 4 months ago

Just wait he could exonerate himself by exposing that the crimes were actually perpetrated by a secret identical twin brother or by opening up a warehouse full of dead clones and claiming that one of them did it.

[-] djnattyp@lemmy.world 1 points 6 months ago

I mean, maybe it has happened before in history, but someone changed it via AI and we just don't know...

djnattyp

joined 1 year ago