immutability

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).

Continue reading…
(~5 min read)