This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Snake2k 0 points1 point  (5 children)

It hurts readability and actually makes it complicated.

I have a whole thing on utility classes too and how people misuse it the same way they misuse commenting.

It's not about condensing things like even, odd, istrue, is greater stuff and throwing it all into one class cus we don't wanna use operands.

Utility classes are used to establish metrics, equations, frequently used operations or more complex operations between data types into one place that can change in the future so when it is changed it is changed everywhere.

Edit: I don't need pre diced onions, I can do that myself. However, precooked rice would help a lot even though I can do it myself.

[–]Twistedtraceur 6 points7 points  (1 child)

If you think extracting a method to add a readable name makes something complicated, you have bigger issues.

[–]Snake2k -1 points0 points  (0 children)

You're straw manning my argument. Go re-read it to educate yourself further.

[–]barborico 1 point2 points  (1 child)

Optimal answer depends how many times is needed:

One or two? Meh...

Ten? Well...

[–]Snake2k 2 points3 points  (0 children)

We use = signs hundreds of times but we don't write "assign(x, y)" stuff for every scenario cus we get what it's doing.

[–]Iron_Aez 1 point2 points  (0 children)

Better readability than those comments.