In case you haven’t seen it, I’ve been diving ever-further down the code research rabbit hole. Today it brings me to the Autofac codebase (found here). But to understand how I’ve arrived here, consider some of the questions that I’ve answered previously.
With each of these studies (and the rest of the series), the research has become more sophisticated. This is because I’ve started working with folks that have a data science and machine learning background. So I’m now having fun assembling measurable codebase properties into broad categories and seeing how my corpus of 500+ open source codebase resolves into patterns.
And that brings me to Autofac.
It caught my eye by ranking in the 85th percentile for what I’m calling “testable” codebases and in the 58th for “readability.” And in general, it scores decently to well in just about every measure. This gave me an idea for a post in the same sort of vein as the one I did about Moq. Let’s do a deep dive into Autofac’s codebase using NDepend.
Continue reading Autofac: A Detailed Look Under the Hood at Its Code Quality
In the spirit of the Agile Manifesto, we’ve reduced our dependence on software documentation.
In some ways, this has improved our lives. And in other ways, it’s been taken too far and had the opposite effect.
In this post, we’ll take a look at the balance of these concerns in relation to a software architecture document. What is this, and when do you need it?
Want to see living documentation of your software architecture, in vivid detail?
Download the NDepend trial for free and check out the powerful dependency graph feature to see what your architecture looks like.
Understanding the Need for Balance
The Agile Manifesto values “working software over comprehensive documentation,” which isn’t to say that documentation isn’t necessary.
All too often, the baby is thrown out with the bathwater, and teams produce little to no documentation at all—including the software architecture document.
So which bits of documentation should we throw out and which should we still deliver?
Indeed, we should prioritize those deliverables like any other user story. Some organizations will place a higher value on certain documents than others. Nearly all should put more priority on creating a software architecture document.
Continue reading Software Architecture Document? Do You Need One?
Design patterns seem to be a controversial topic. On one hand, many developers seem to love them and treat the famous book by the Gang of Four like sacred scripture. On the other hand, many developers loath the very idea of design patterns. It’s not too hard to find posts around the web with titles such as “Design Patterns are Bad Design,” “Following Design Patterns Is A Bad Idea,” and of course, the inevitable “Design Patterns Considered Harmful.”
What can we take from that? Well, as it is with pretty much everything in our industry, it’s really hard to reach some form of consensus on design patterns. My take is this: design patterns are tools. Some are more useful, others less useful. Some may be outright harmful. And others may not make sense for your scenario, but maybe for Joe who sits three desks from you, they’re a gift from heaven.
But that’s not what this post is really about (i.e. deciding whether design patterns are “good” or “bad”). As we’ve seen, such discussion is simplistic and misses the point.
What we’re going to do instead is cover three design patterns that haven’t aged quite well. These design patterns are ones that you no longer go around implementing. And if you do, you probably shouldn’t.
Let’s get started.
Continue reading 3 Design Patterns That Have Aged Poorly
Most people that start programming learn to program in an imperative way. Shortly after, they will probably learn a declarative language too. Many developers go a long way without knowing the difference. Many will probably never know. And they could very well be great developers. But knowing the difference could change the way you write code for the better, so let’s dive in.
Continue reading Declarative Programming in Depth