Keeping your classes immutable and stateless makes your code way less prone to bugs. Yet somehow this clean code rule isn’t as popular and as often invoked as SRP, YAGNI, DRY, KISS and others... Maybe it’s because of the lack of a catchy acronym?
Anyways, I’d like to take a look at two examples of when sticking to this rule could save your ass (or at least save you some time debugging).
Yeah, yeah, it’s a nice idea (not theirs though, it’s based on Ingress), it gets people out of their homes, it makes them excercise, explore the world... It’s all fine. But on the other hand, this game annoys me so much that I’ve already given up on it after just three days of playing. Why?