Discussion about this post

User's avatar
Abelardo's avatar

I use a lot utilities (classes whose methods are all statics) inside my Java classes (i. e.: StringUtil, DateUtil and whatnot). Should this practice be avoided in favour of ID?

They are helpers that don't affect to my code, they only transform the input to generate useful output for my logic. Are they fine?

Expand full comment
Dragos's avatar

Loved the explanation, its very helpful to have the examples that show how avoiding global state in code can make code more maintainable and less prone to bugs!

Expand full comment
3 more comments...

No posts