Category Archives: Immutability

Don’t assign a field from many methods

For the next NDepend version, amongst plenty of cool stuff, a new default code rule will be added. It has been named Don’t assign a field from many methods. It falls into the category of Purity – Immutability – Side-Effects rules, one of my preferred set … Continue reading 

Also posted in C#, high cohesion, Maintainability, measurement | Leave a comment

Ruling Code Quality Regression

A prominent characteristic of the software industry is that products are constantly evolving. All modern development methodologies prone that a product should evolve through small iterations. Internally, development teams are using Continuous Integration servers that shrink increment length to a … Continue reading 

Also posted in API usage, CC, Change summary, Code, code base snapshot comparison, Code Diff, Code Query, Code Rule, code structure, CQLinq, Full Coverage, Lines of Code, LINQ, Maintainability, NDepend, software metric, Software Quality Measurement | 1 Comment

Immutable types: understand their benefits and use them

There is a powerful and simple concept in programming that I think is really underused: Immutability Basically, an object is immutable if its state doesn’t change once the object has been created. Consequently, a class is immutable if its instances are immutable. There … Continue reading 

Also posted in code organization, Code Query, Code Rule, code structure | 14 Comments