Category Archives: Code

Code Contracts is the next coding practice you should learn and use

Last week I was presenting a session covering some practices and tooling we were using to build NDepend at BuildStuff Lithuania 2013. One of the essential practice we are using is Code Contracts and really I was surprised when I … Continue reading 

Also posted in .NET Fx, Code Contract, Code Coverage, NDepend, Resharper, UI, Unit Test | 18 Comments

Measuring Development Trends

NDepend version 5 has just turned RTM today! Big milestone! Last week I talked of the UI relifting we did, but v5 comes also with several flagship features. One of those new feature is about measuring and visualizing development trends. … Continue reading 

Also posted in Code metrics, NDepend, Trend | Leave a comment

Code Rules are not just about Clean Code

Like any developer tool vendor, we at NDepend are eating our own dogfood. In other words, we use NDepend to develop NDepend. Most of default code rules are activated in our development, and they are preventing us daily from all sorts of … Continue reading 

Also posted in code organization, Code Query, Code Rule, CQL, CQL rule, CQLinq, Dead Code | 3 Comments

The joy of being a programmer

I am programming since I am 10 and I am now 38. Today I measure how much good programming bring to my life, directly and indirectly. I’d like to give credit to aspects I love in my job. Hopefully some … Continue reading 

Also posted in Programming | 5 Comments

A Program to explore Code Diff

Recently I answered the question Generating a diff report using NDepend during build on stackoverflow. As explained in my answer, the easy way to go is to follow the documentation on Reporting Code Diff. But for the user that wants something smarter … Continue reading 

Also posted in Change summary, Changes, Code Diff, CQLinq, LINQ | 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 base snapshot comparison, Code Diff, Code Query, Code Rule, code structure, CQLinq, Full Coverage, Immutability, Lines of Code, LINQ, Maintainability, NDepend, software metric, Software Quality Measurement | 1 Comment

The code is the truth, but it is not the whole truth

In a recent interview from Grady Booch, co-creator of UML, Grady said: When Jim, Ivar, and I began our journey that became manifest in the UML, we never intended it to become a programming language. I think that there’s a … Continue reading 

Also posted in CQL, Grady Booch, Truth | 9 Comments

Return False on the Happy Path

When you call a query method that returns true or false, I highly suggest that you make true results trip conditional logic / guard clauses / etc. I was driving out some code today in an MVC controller that had … Continue reading 

Also posted in Uncategorized | 12 Comments

Lessons learned from the NUnit code base

I recently analyzed NUnit v2.4.8 with NDepend. The first impression is that developers behind NUnit know their job and did an excellent work. This positive feedback comes from many details, the fact that you can seamlessly open the VisualStudio solution and compile everything immediately, the amount of … Continue reading 

Also posted in .NET assemblies, C#, Code Coverage, code organization, CopyLocal syndrome, Partitioning | 10 Comments

Super Models, Part 2: Avoid Mutators

A quick disclaimer: we’re entering religious territory here. I feel strongly about this issue, but it’s certainly my opinion. If you want to get the full sense of how passionate people are about this issue, check out this article at … Continue reading 

Also posted in Uncategorized | 40 Comments